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: