Download orchestrator logs for a folder for the defined time or date range

Download orchestrator logs: - to get the log file where logs should be available for certain date range - the logs via API call by authenticating the orchestrator using login API method

Follow the steps:

  • create http request POST method with endpoint - "https://[orchestratorUrl]/api/Account/Authenticate" to get the auth token
    • Headers - > Content-type: "application/json"
    • Body-> "{""tenancyName"": ""yourTenantName"",""usernameOrEmailAddress"": """admin"",""password"": ""Welcome123""}"
  • Deserialize json rsponse received from above method to get only access token.
  • Use http request GET method with endpoint:- ""https://[orchestratorURL]/odata/RobotLogs/UiPath.Server.Configuration.OData.Reports" to download the log file.
    • Headers->
      • Content-type: "application/json"
      • X-UIPATH-TenantName: "yourTenantName"
      • Authorization: ""Bearer [Youraccess_token]"
      • X-UIPATH-OrganizationUnitId: "FolderId from orchestrator"
    • Parameters-> $filter: "TimeStamp gt 2021-10-07T10:36:00.000Z and TimeStamp lt 2021-10-07T17:12:49.000Z" (Note:- Modify the timestamp in the same format as mentioned)
    • ResourcePath-> give the output path for your log file in csv format.