How to export the auditlog from orchestrator using the API

How to export the auditlog from orchestrator using the API


The Orchestrator allows users to perform an asynchronous export of audit logs using the API. This option enables background processing of the export request, allowing for more efficient and reliable handling of larger datasets.


Steps to follow:

  1. Initiate an export by calling the appropriate endpoint:
  • For audit logs: POST /odata/AuditLogs/UiPath.Server.Configuration.OData.Export
  • This operation returns an Id that is necessary for the next two steps.

Example:

image.png

  1. Get the status of the report by calling the GET /odata/Exports({key}) endpoint and appending the Id returned at step 1 to it.


Example:

image.png

  1. Once the status is Completed, get a download link for retrieving the exported archive (Uri value), by calling the GET /odata/Exports({key})/UiPath.Server.Configuration.OData.GetDownloadLink endpoint and appending the Id returned at step 1 to it.


Example:

image.png

4. Copy and paste the download link into another tab to download the required log.

Example:

image.png



Note: The same steps can be followed using Postman or any other third-party tool.