Fetching jobs log

Hi Everyone,

I need some guidance on retrieving job logs from UiPath Orchestrator.

I would like to fetch the execution logs of a specific job/process programmatically. My requirement is to extract the logs generated during job execution and save them for reporting/auditing purposes.

Could anyone please help with:

  • The recommended approach to retrieve job logs from Orchestrator?
  • Whether this can be done using Orchestrator APIs?
  • Any sample API endpoints, UiPath activities, or documentation references?

Any suggestions or examples would be greatly appreciated.

Thank you!

1. Orchestrator REST API — RobotLogs endpoint (primary method)

This is the standard way to fetch execution logs. The key endpoint is:

GET /odata/RobotLogs

Filter by a specific JobKey (GUID of the job):

GET https://{orchestrator-url}/odata/RobotLogs?$filter=JobKey eq guid'{your-job-key-guid}'

Note: Don’t wrap the GUID in quotes — use guid'...' syntax or just the bare GUID depending on your Orchestrator version. Cloud/modern versions typically accept it without the guid prefix.

Common OData filter parameters:

Parameter Example
JobKey eq Filter by job GUID
RobotName eq Filter by robot name
MachineId eq Filter by machine
Level ge Minimum log level (e.g., Warn)
TimeStamp gt Logs after a given time

Sample response fields:

json

{
  "@odata.context": "...",
  "value": [
    {
      "Level": "Info",
      "WindowsIdentity": "DOMAIN\\user",
      "ProcessName": "MyProcess",
      "TimeStamp": "2026-06-23T10:00:00Z",
      "Message": "Execution started",
      "JobKey": "201d325d-a6cc-4643-97ad-93aeac4622ce",
      "RawMessage": "...",
      "Id": 12345
    }
  ]
}

2. Authentication

You’ll need a Bearer token first. For Cloud Orchestrator:

http

POST https://cloud.uipath.com/identity_/connect/token
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials
&client_id={your-client-id}
&client_secret={your-client-secret}
&scope=OR.Execution.Read OR.Robots.Read

For on-prem, use the /api/account/authenticate endpoint with username/password.


3. Pagination

Logs are paginated — use $top and $skip to page through results:

GET /odata/RobotLogs?$filter=JobKey eq guid'{job-key}'&$top=100&$skip=0&$orderby=TimeStamp asc

4. From within a UiPath automation (HTTP Request activity)

Use the HTTP Request activity or the Orchestrator HTTP Request activity in Studio:

  • Method: GET
  • URL: {OrchestratorURL}/odata/RobotLogs?$filter=JobKey eq guid'{JobKey}'
  • Headers: Authorization: Bearer {token}

Then parse the JSON response and write it to Excel or a database.


5. Log storage considerations

Where your logs are stored affects what the API returns:

  • SQL database (default): API works, but degrades past ~2M entries. Regular cleanup needed.
  • Elasticsearch: Recommended for high volume; API supports the same filters but is capped at 10,000 items per query for Cloud tenants.
  • UiPath Insights: Best for reporting/auditing dashboards — connects directly to your BI layer.

For auditing at scale, Elasticsearch or Insights is the better long-term approach.


Quick Python example

python

import requests

BASE_URL = "https://{your-orchestrator}/odata"
TOKEN = "your_bearer_token"
JOB_KEY = "201d325d-a6cc-4643-97ad-93aeac4622ce"

headers = {"Authorization": f"Bearer {TOKEN}", "Content-Type": "application/json"}
params = {
    "$filter": f"JobKey eq guid'{JOB_KEY}'",
    "$orderby": "TimeStamp asc",
    "$top": 100
}

response = requests.get(f"{BASE_URL}/RobotLogs", headers=headers, params=params)
logs = response.json().get("value", [])

for log in logs:
    print(f"[{log['Level']}] {log['TimeStamp']} — {log['Message']}")

Sources:

Hi @harshal_nath

Use Orchestrator OData API to fetch logs for a job.
Call GET /odata/RobotLogs?$filter=JobKey eq {JobId} to retrieve execution logs for that specific job.
Authenticate first using OAuth or API access (POST /identity/connect/token) and pass the bearer token in headers.

you can use HTTP Request activity to call the above API and parse response with Deserialize JSON activity.
You can also use Orchestrator HTTP Request (UiPath.WebAPI.Activities) for direct integration.

For job details first call GET /odata/Jobs to get JobId, then use it in RobotLogs API.

For more:

If helpful, mark as solution. Happy automation with UiPath

Hii @harshal_nath

Yes, you can retrieve job logs programmatically using the Orchestrator APIs.

A common approach is:

  • Get the Job ID from the Jobs endpoint.
  • Query the RobotLogs endpoint filtered by the JobKey/Job ID.
  • Store the returned logs in a database, CSV, or reporting tool for auditing purposes.

You can use HTTP Request activities within UiPath or call the Orchestrator APIs directly from external applications. Make sure the account used has the required permissions to access logs.

The Orchestrator API documentation provides examples for Jobs and RobotLogs endpoints that can help you get started.
Happy Automation

@harshal_nath

welcome to the community

you have two options…one is a bat script which can be scheduled as well ..the script is given here …Automation Cloud - Exporting logs

second is orchetsrator api..for large logs orch api has a limit of 1000 so you might need to run loops..to check the api you can use swagger <orchestratorURL>/swagger/index.html

preferably going with scripts would be best …but gain that depends on where you want to do the reporting

cheers