Get Audit Logs API returns UnsupportedApiVersion

I just set up an External Application on Automation Suite 2023.10.5,

The address of my orchestrator is https://uipath.mycompany.com/default/DefaultTenant/orchestrator_/?tid=1&fid=2

So I assume the the endpoint for audit logs would be
https://uipath.mycompany.com/default/DefaultTenant/audit_/api/auditlogs

The documentation for Platform Management APIs > Audit Logs > Get Audit Logs is confusing in that they mention https://{yourDomain}//{organization_name}/audit_/api/auditlogs , https://{yourDomain}/audit_/api/auditlogs and https://{yourDomain}/{organizationName}/{tenantName}/audit_/api/auditlogs/. None of them work for me. I tried all, none works for me, but I guess it should be https://uipath.mycompany.com/default/DefaultTenant/audit_/api/auditlogs

I always get 400 Bad Request

curl --location 'https://uipath.mycompany.com/default/DefaultTenant/audit_/api/auditlogs/?language=en&top=2&skip=2&sortBy=createdOn&sortOrder=asc' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer xxxx'
{
    "error": {
        "code": "UnsupportedApiVersion",
        "message": "The HTTP resource that matches the request URI 'http://uipath.mycompany.com/api/auditlogs/' is not supported.",
        "innerError": null
    }
}

the access token I’m using has scope PM.Audit PM.Audit.Read.

Note that the error mentions http://uipath.mycompany.com/api/auditlogs/ which is not the same url I requested (http instead of https and the path should be /default/DefaultTenant/audit_/api/auditlogs/ not /api/auditlogs/).

Any clue as what is going on, is it the wrong url?

@ecerulm

is default your org name?

ideally tenant is not needed as you need audit details at org level and tenant is below that

cheers

Is default your org name

yes, for example I can access the orchestrators with

https://uipath.mycompany.com/default/DefaultTenant/orchestrator_/

so “default” is the orgname and “DefaultTenant” is the tenantName

Also if I use any other “orgName” i’ll get a 302 Moved instead .

ideally tenant is not needed as you need audit details at org level and tenant is below that

https://uipath.xxxx.com/default/audit_/api/auditlogs/?language=en&top=2&skip=2&sortBy=createdOn&sortOrder=asc

give exactly the same error 400 Bad Request

{
    "error": {
        "code": "UnsupportedApiVersion",
        "message": "The HTTP resource that matches the request URI 'http://uipath.int.tele2.com/api/auditlogs/' is not supported.",
        "innerError": null
    }
}

@ecerulm , To fetch audit logs, the request falls under the Open Data Protocol (OData). You may want to review the API response provided below to ensure it aligns with the expected output and troubleshoot any issues.

API Response - ```
https://cloud.uipath.com/{Org}/DefaultTenant/orchestrator_/odata/AuditLogs

@Ajith_Pandi_T , you didn’t include the API response in the post.

I’m using Automation Suite 2023.10 on Linux not Automation Cloud , I don’t know if that changes anything.

The documentation for Orchestrator > Automation Suite > APIs does not have any reference to Get Audit Logs.

The documentation for Automation Suite > Automation Suite > Platform Management APIs is the only thing that seem to apply and there there is nothing about odata.

any update regarding this issue?