How to pull / extract the Robot Logs data in CSV format
What are Robot Logs?
Robot logs are time-stamped files that contain informational events, errors and warning messages relevant to the application. You can read more in Understanding Robot Logs.
Extraction of Robot Logs
In order to extract the Robot logs, follow the steps below, based on the type of deployment:
- For On-Premises Deployment:
For extracting logs using API calls you may use Swagger/Postman.
Using Swagger:
-
-
- Log in to the Orchestrator.
- Open a new tab to open the Swagger: Go to <Orchestrator URL>\Swagger
- Refer to Retrieving Robot Logs According to the Robot Name documentation to start calling Robot logs API(s).
-
Pre-requisite:
X-UIPATH-OrganizationUnitId
To extract it, you should call 'odata/Folders' API.
Note: GET requests for Robot logs stored using Elasticsearch only retrieve the first 10000 entries. This is due to an Elasticsearch limitation, and it does not occur if you are using SQL.
Using $top and $skip parameters which go beyond the 10000 limit return the following error message: "Depth of pagination is limited in Elasticsearch by the max_result_window index setting. Make sure skip + take is lower than 10000."
Using Postman:
-
-
- Generate the Bearer token referring to Using OAuth For External Apps documentation.
- Refer to Retrieving Robot Logs According to the Robot Name documentation to start calling Robot logs API(s).
-
Bearer Token: Steps mentioned above.
X-UIPATH-OrganizationUnitId:To extract the same, one should call 'odata/Folders' API.
Extracting logs from the Database:
The Robot logs reside in the "dbo.logs" table and can be extracted using the below approach:
-
-
- Log in to the Database.
- Open a New Query window
- Use the below command in case you are looking to extract all the logs from DBO.Logs table: Select * from [UiPath Database Name].[dbo].[logs]
- From the output, right-click and save the logs in CSV format.
-
- For Automation Cloud Deployment:
Exporting logs via the Cloud User Interface:
To export Robot logs generated in the Orchestrator services to Azure, AWS S3, and Google Cloud Storage, see the specific procedures described in the Exporting Logs documentation.
Extracting logs using API calls:
Using Swagger:
-
-
- Log in to Orchestrator.
- Open a new tab to open the Swagger: Go to <Orchestrator URL>\Swagger
- Refer to Retrieving Robot Logs According to the Robot Name documentation to start calling Robot logs API(s).
-
Pre-requisite:
X-UIPATH-OrganizationUnitId
To extract the same, one should call 'odata/Folders' API.
Note: GET requests for Robot logs stored using Elasticsearch only retrieve the first 10000 entries. This is due to an Elasticsearch limitation, and it does not occur if you are using SQL.
Using $top and $skip parameters which go beyond the 10000 limit return the following error message: Depth of pagination is limited in Elasticsearch by the max_result_window index setting. Make sure skip + take is lower than 10000.
Using Postman:
-
-
- Generate the Bearer token referring to Using OAuth For External Apps document.
- Refer to Retrieving Robot Logs According to the Robot Name documentation to start calling Robot logs API(s).
-
Bearer Token: Steps mentioned above.
X-UIPATH-OrganizationUnitId:To extract the same, one should call 'odata/Folders' API.