orchestrator
2024.10
true
  • Getting Started
  • Swagger Definition
  • Orchestrator APIs
UiPath logo, featuring letters U and I in white
Orchestrator API Guide
Automation CloudAutomation Cloud Public SectorAutomation SuiteStandalone
Last updated Nov 11, 2024

Queue Items Requests

Important:
/QueueItems endpoints count and return the DTO for every recurrence of a queue item in all the folders the queue is linked to. For example, if you have one (1) queue item for a queue that is linked to three (3) folders, the number of returned queue items and count is three (1x3).
To retrieve the results for a specific folder, use the X-UiPath-OrganizationUnitId header.

Delete the SpecificContent Value From a Queue Item

The following PUT request to the /odata/QueueItems({key}) endpoint allows you to delete the specific content of the specified queue item, identiable by {key}.
Important: You can now delete the specific content of queue items with Successful,Deleted, or Retried statuses as well.

API Endpoint

PUT https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/QueueItems({Id})

To delete the specific content, you need to set the corresponding value as NULL or empty, while all other values in the payload match the ones in the successful state. That is, you only delete the content, while all other request parameters remain the same.

To find out which are the values for the PUT request parameters, make a GET request to/odata/QueueItems. The response displays all the queue items in your tenant.

Identify the queue item you are interested in and copy the values of the following parameters:

  • "OrganizationUnitId" the ID of the folder that contains the queue item
  • "Id" the ID of the queue item. Make sure to select the queue item with a Successful status.

Make a second GET request to /odata/QueueItems({Id}), and replace the {Id} with the queue item ID you copied from the previous GET call. The response displays the data of the desired queue item. Copy the values of the following parameters:
  • "Name" to replace {the_Name_from_the_GET_response} in the sample request
  • "Priority" to replace {the_Priority_from_the_GET_response} in the sample request
  • "DeferDate" to replace {the_DeferDate_from_the_GET_response} in the sample request
  • "DueDate" to replace {the_DueDate_from_the_GET_response} in the sample request
  • "RiskSlaDate" to replace {the_RiskSlaDate_from_the_GET_response} in the sample request
  • "Reference" to replace {the_Reference_from_the_GET_response} in the sample request
  • "Progress" to replace {the_Progress_from_the_GET_response} in the sample request
    Note: You use the above parameter values to populate the PUT request body.

Request Headers

--header 'Authorization: Bearer {access_token}'\)\)
--header 'Content-Type: application/json' \)\)
--header 'X-UIPATH-OrganizationUnitId: {the_ID_of_the_folder_that_contains_the_queue_item}' \)--header 'Authorization: Bearer {access_token}'\)\)
--header 'Content-Type: application/json' \)\)
--header 'X-UIPATH-OrganizationUnitId: {the_ID_of_the_folder_that_contains_the_queue_item}' \)

Path Parameters

Param

Data type

Description

Id

(required)

String

The ID of the queue item you want to delete the specific content from.

Request Body

The request body contains the queue item information you want to update, such as name, priority, or reference.

Note: For this use case, you need to update ONLY the value for the 'SpecificContent` key.
{
      "Name": "{queue_name}", // String, the_name_of_the_container_queue
      "Priority": "{the_Priority_from_the_GET_response}",//String
    "SpecificContent": {}, // or NULL
      "DeferDate": "{the_DeferDate_from_the_GET_response}", // 2022-02-17T13:27:43.895Z
      "DueDate": "{the_DueDate_from_the_GET_response}", // 2022-02-17T13:27:43.895Z
      "RiskSlaDate": "{the_RiskSlaDate_from_the_GET_response}", // 2022-02-17T13:27:43.895Z
      "Reference": "{the_Reference_from_the_GET_response}", // String
      "Progress": "{the_Progress_from_the_GET_response}" // String
}{
      "Name": "{queue_name}", // String, the_name_of_the_container_queue
      "Priority": "{the_Priority_from_the_GET_response}",//String
    "SpecificContent": {}, // or NULL
      "DeferDate": "{the_DeferDate_from_the_GET_response}", // 2022-02-17T13:27:43.895Z
      "DueDate": "{the_DueDate_from_the_GET_response}", // 2022-02-17T13:27:43.895Z
      "RiskSlaDate": "{the_RiskSlaDate_from_the_GET_response}", // 2022-02-17T13:27:43.895Z
      "Reference": "{the_Reference_from_the_GET_response}", // String
      "Progress": "{the_Progress_from_the_GET_response}" // String
}

Example Request

Let's say you gathered all the information needed to build the API call.

Get queue item OrganizationUnitId and Id values

To find out the folder and queue item IDs, make a GET request to the /odata/QueueItems endpoint:
curl --location --request GET '{OrchestratorURL}/odata/QueueItems' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \curl --location --request GET '{OrchestratorURL}/odata/QueueItems' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \

A sample of the response you may receive:

{
  "value": [
    {
      "QueueDefinitionId": 29200,
      "OutputData": "{\"DynamicProperties\":{\"Prop1\":\"run\"}}",
      "AnalyticsData": null,
      "Status": "New",
      "ReviewStatus": "None",
      "ReviewerUserId": null,
      "Key": "bc4e8fac-dc4b-4f77-8f20-13590e19ff26",
      "Reference": null,
      "ProcessingExceptionType": null,
      "DueDate": null,
      "RiskSlaDate": null,
      "Priority": "Normal",
      "DeferDate": null,
      "StartProcessing": "2022-02-16T15:30:12.13Z",
      "EndProcessing": "2022-02-16T15:30:12.46Z",
      "SecondsInPreviousAttempts": 0,
      "AncestorId": null,
      "RetryNumber": 0,
      "SpecificData": "{\"DynamicProperties\":{\"Prop2\":\"accelerate\"}}",
      "CreationTime": "2022-02-16T15:30:11.753Z",
      "Progress": null,
      "RowVersion": "AAAAAAB2liA=",
      "OrganizationUnitId": 62516,
      "OrganizationUnitFullyQualifiedName": "Banana",
      "Id": 3255808,
      "ProcessingException": null,
      "SpecificContent": {
        "Prop2": "Test demo"
      },
      "Output": {
        "Prop1": "vgdfdf"
      },
      "Analytics": null
    },
// other queue items data
    {
      "QueueDefinitionId": 3899,
      "OutputData": null,
      "AnalyticsData": null,
      "Status": "Successful",
      "ReviewStatus": "None",
      "ReviewerUserId": null,
      "Key": "6ea50a9c-b657-4df3-bfe6-d1893c4f31ec",
      "Reference": "82086",
      "ProcessingExceptionType": null,
      "DueDate": null,
      "RiskSlaDate": "2022-02-17T13:27:43.895Z",
      "Priority": "High",
      "DeferDate": null,
      "StartProcessing": null,
      "EndProcessing": null,
      "SecondsInPreviousAttempts": 0,
      "AncestorId": null,
      "RetryNumber": 0,
      "SpecificData": "{\"DynamicProperties\":{\"EmployeeName\":\"John Kensington\",\"ContactNumber\":\"+4457899\",\"RelocationDistance\":500,\"Description\":\"Home relocation\",\"ExpenseCode\":\"UI234\",\"Amount\":1000,\"RequirePass\":true}}",
      "CreationTime": "2021-03-19T17:37:35.893Z",
      "Progress": null,
      "RowVersion": "AAAAAABQET4=",
      "OrganizationUnitId": 39419,
      "OrganizationUnitFullyQualifiedName": "Shared",
      "Id": 2499339,
      "ProcessingException": null,
      "SpecificContent": {
        "EmployeeName": "John Kensington",
        "ContactNumber": "+4457899",
        "RelocationDistance": 500,
        "Description": "Home relocation",
        "ExpenseCode": "UI234",
        "Amount": 1000,
        "RequirePass": true
      },
      "Output": null,
      "Analytics": null
    }
  ]
}{
  "value": [
    {
      "QueueDefinitionId": 29200,
      "OutputData": "{\"DynamicProperties\":{\"Prop1\":\"run\"}}",
      "AnalyticsData": null,
      "Status": "New",
      "ReviewStatus": "None",
      "ReviewerUserId": null,
      "Key": "bc4e8fac-dc4b-4f77-8f20-13590e19ff26",
      "Reference": null,
      "ProcessingExceptionType": null,
      "DueDate": null,
      "RiskSlaDate": null,
      "Priority": "Normal",
      "DeferDate": null,
      "StartProcessing": "2022-02-16T15:30:12.13Z",
      "EndProcessing": "2022-02-16T15:30:12.46Z",
      "SecondsInPreviousAttempts": 0,
      "AncestorId": null,
      "RetryNumber": 0,
      "SpecificData": "{\"DynamicProperties\":{\"Prop2\":\"accelerate\"}}",
      "CreationTime": "2022-02-16T15:30:11.753Z",
      "Progress": null,
      "RowVersion": "AAAAAAB2liA=",
      "OrganizationUnitId": 62516,
      "OrganizationUnitFullyQualifiedName": "Banana",
      "Id": 3255808,
      "ProcessingException": null,
      "SpecificContent": {
        "Prop2": "Test demo"
      },
      "Output": {
        "Prop1": "vgdfdf"
      },
      "Analytics": null
    },
// other queue items data
    {
      "QueueDefinitionId": 3899,
      "OutputData": null,
      "AnalyticsData": null,
      "Status": "Successful",
      "ReviewStatus": "None",
      "ReviewerUserId": null,
      "Key": "6ea50a9c-b657-4df3-bfe6-d1893c4f31ec",
      "Reference": "82086",
      "ProcessingExceptionType": null,
      "DueDate": null,
      "RiskSlaDate": "2022-02-17T13:27:43.895Z",
      "Priority": "High",
      "DeferDate": null,
      "StartProcessing": null,
      "EndProcessing": null,
      "SecondsInPreviousAttempts": 0,
      "AncestorId": null,
      "RetryNumber": 0,
      "SpecificData": "{\"DynamicProperties\":{\"EmployeeName\":\"John Kensington\",\"ContactNumber\":\"+4457899\",\"RelocationDistance\":500,\"Description\":\"Home relocation\",\"ExpenseCode\":\"UI234\",\"Amount\":1000,\"RequirePass\":true}}",
      "CreationTime": "2021-03-19T17:37:35.893Z",
      "Progress": null,
      "RowVersion": "AAAAAABQET4=",
      "OrganizationUnitId": 39419,
      "OrganizationUnitFullyQualifiedName": "Shared",
      "Id": 2499339,
      "ProcessingException": null,
      "SpecificContent": {
        "EmployeeName": "John Kensington",
        "ContactNumber": "+4457899",
        "RelocationDistance": 500,
        "Description": "Home relocation",
        "ExpenseCode": "UI234",
        "Amount": 1000,
        "RequirePass": true
      },
      "Output": null,
      "Analytics": null
    }
  ]
}

Identify the Successful queue item and copy the following values:

  • "OrganizationUnitId" : 39419
  • "Id": 2499339

Get the desired queue item data

Make a GET request to the /odata/QueueItems({Id}) endpoint:
  • Replace {Id} with the value of the ID previously found (i.e, 2499339)
  • Use the X-UIPATH-OrganizationUnitId request header and input the value of the OrganizationUnitId previosuly found (i.e., 39419)
    curl --location --request GET '{OrchestratorURL}/odata/QueueItems(2499339)' \
    --header 'Authorization: Bearer 1234' \
    --header 'Content-Type: application/json' \
    --header 'X-UIPATH-OrganizationUnitId: 39419'curl --location --request GET '{OrchestratorURL}/odata/QueueItems(2499339)' \
    --header 'Authorization: Bearer 1234' \
    --header 'Content-Type: application/json' \
    --header 'X-UIPATH-OrganizationUnitId: 39419'

    A sample of the response you may receive:

    {
      "QueueDefinitionId": 3899,
      "OutputData": null,
      "AnalyticsData": null,
      "Status": "Successful",
      "ReviewStatus": "None",
      "ReviewerUserId": null,
      "Key": "6ea50a9c-b657-4df3-bfe6-d1893c4f31ec",
      "Reference": "82086",
      "ProcessingExceptionType": null,
      "DueDate": null,
      "RiskSlaDate": "2022-02-17T13:27:43.895Z",
      "Priority": "High",
      "DeferDate": null,
      "StartProcessing": null,
      "EndProcessing": null,
      "SecondsInPreviousAttempts": 0,
      "AncestorId": null,
      "RetryNumber": 0,
      "SpecificData": "{\"DynamicProperties\":{\"EmployeeName\":\"John Kensington\",\"ContactNumber\":\"+4457899\",\"RelocationDistance\":500,\"Description\":\"Home relocation\",\"ExpenseCode\":\"UI234\",\"Amount\":1000,\"RequirePass\":true}}",
      "CreationTime": "2021-03-19T17:37:35.893Z",
      "Progress": null,
      "RowVersion": "AAAAAABQET4=",
      "OrganizationUnitId": 39419,
      "OrganizationUnitFullyQualifiedName": null,
      "Id": 2499339,
      "ProcessingException": null,
      "SpecificContent": {
        "EmployeeName": "John Kensington",
        "ContactNumber": "+4457899",
        "RelocationDistance": 500,
        "Description": "Home relocation",
        "ExpenseCode": "UI234",
        "Amount": 1000,
        "RequirePass": true
      },
      "Output": null,
      "Analytics": null
    }{
      "QueueDefinitionId": 3899,
      "OutputData": null,
      "AnalyticsData": null,
      "Status": "Successful",
      "ReviewStatus": "None",
      "ReviewerUserId": null,
      "Key": "6ea50a9c-b657-4df3-bfe6-d1893c4f31ec",
      "Reference": "82086",
      "ProcessingExceptionType": null,
      "DueDate": null,
      "RiskSlaDate": "2022-02-17T13:27:43.895Z",
      "Priority": "High",
      "DeferDate": null,
      "StartProcessing": null,
      "EndProcessing": null,
      "SecondsInPreviousAttempts": 0,
      "AncestorId": null,
      "RetryNumber": 0,
      "SpecificData": "{\"DynamicProperties\":{\"EmployeeName\":\"John Kensington\",\"ContactNumber\":\"+4457899\",\"RelocationDistance\":500,\"Description\":\"Home relocation\",\"ExpenseCode\":\"UI234\",\"Amount\":1000,\"RequirePass\":true}}",
      "CreationTime": "2021-03-19T17:37:35.893Z",
      "Progress": null,
      "RowVersion": "AAAAAABQET4=",
      "OrganizationUnitId": 39419,
      "OrganizationUnitFullyQualifiedName": null,
      "Id": 2499339,
      "ProcessingException": null,
      "SpecificContent": {
        "EmployeeName": "John Kensington",
        "ContactNumber": "+4457899",
        "RelocationDistance": 500,
        "Description": "Home relocation",
        "ExpenseCode": "UI234",
        "Amount": 1000,
        "RequirePass": true
      },
      "Output": null,
      "Analytics": null
    }

Copy the following values:

  • "Priority" : "High"
  • "DeferDate" : null
  • "DueDate" : null
  • "RiskSlaDate": "2022-02-17T13:27:43.895Z"
  • "Reference" : "82086"
  • "Progress" : null

Delete the SpecificContent value

Make the PUT request as follows:

curl --location --request PUT '{OrchestratorURL}/odata/QueueItems(2499339)' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--header 'X-UIPATH-OrganizationUnitId: 39419'\
--data-raw '{
      "Name": "    Queue Demo", 
      "Priority": "High", 
    "SpecificContent": {},
      "DeferDate": null,
      "DueDate": null,
      "RiskSlaDate": "2022-02-17T13:27:43.895Z",
      "Reference": "82086",
      "Progress": null
}'curl --location --request PUT '{OrchestratorURL}/odata/QueueItems(2499339)' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--header 'X-UIPATH-OrganizationUnitId: 39419'\
--data-raw '{
      "Name": "    Queue Demo", 
      "Priority": "High", 
    "SpecificContent": {},
      "DeferDate": null,
      "DueDate": null,
      "RiskSlaDate": "2022-02-17T13:27:43.895Z",
      "Reference": "82086",
      "Progress": null
}'
Note: Notice that the SpecificContent parameter is the only one that changes, by having a NULL or an empty value, while the rest of the values match the values from the GET response.

In the Orchestrator UI, the change is visible in the Transaction details of the corresponding transaction ID.



Exporting queue items

This action requires calls to various endpoints.

Note:

This endpoint is limited to 100 API requests/day/tenant.

  1. Initiate an export by calling POST https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_//odata/QueueDefinitions. Add any filters as necessary.

    This is what the request body looks like:

    POST https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/QueueDefinitions(27965)/UiPathODataSvc.Export?$filter=((QueueDefinitionId%20eq%2027965))&$expand=Robot,ReviewerUser HTTP/1.1
    
    Authorization: Bearer rt_45D8A3C5FF2AC56A92A906EE14FB0B8B004D76BAC67AE375521C373F23447684-1
    X-Uipath-Organizationunitid: 770643
    Content-Length: 0POST https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/QueueDefinitions(27965)/UiPathODataSvc.Export?$filter=((QueueDefinitionId%20eq%2027965))&$expand=Robot,ReviewerUser HTTP/1.1
    
    Authorization: Bearer rt_45D8A3C5FF2AC56A92A906EE14FB0B8B004D76BAC67AE375521C373F23447684-1
    X-Uipath-Organizationunitid: 770643
    Content-Length: 0

    The response includes an ID that is necessary for the subsequent steps:

    {"@odata.context":"https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Exports/$entity","Id":8657,"Name":"MyQueue12345-items","Type":"Queues","Status":"New","RequestedAt":"2024-01-15T07:38:21.8891311Z","ExecutedAt":null,"Size":null}{"@odata.context":"https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Exports/$entity","Id":8657,"Name":"MyQueue12345-items","Type":"Queues","Status":"New","RequestedAt":"2024-01-15T07:38:21.8891311Z","ExecutedAt":null,"Size":null}
  2. Get the request status by calling GET https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/orchestrator_/odata/Exports(8657), where the text between brackets is the ID returned at step 1.

    This is what the request body looks like:

    GET https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/Exports(8657) HTTP/1.1
    Host: alpha.uipath.com
    Authorization: Bearer rt_45D8A3C5FF2AC56A92A906EE14FB0B8B004D76BAC67AE375521C373F23447684-1
    X-Uipath-Organizationunitid: 770643
    Cookie: __cf_bm=SGYN6zxyBJpmMFjIxBCC8M2eZUvxXaEFqCiZtbidn00-1705304301-1-AUAOuQBjBD1bJQZXFHnyqzGZuBIyHkMpmedMwLZLMtRuGgsyCAsyTOaM8qVoi1meJ0/lRNX6BUZUfV7fWYZc43E=GET https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/Exports(8657) HTTP/1.1
    Host: alpha.uipath.com
    Authorization: Bearer rt_45D8A3C5FF2AC56A92A906EE14FB0B8B004D76BAC67AE375521C373F23447684-1
    X-Uipath-Organizationunitid: 770643
    Cookie: __cf_bm=SGYN6zxyBJpmMFjIxBCC8M2eZUvxXaEFqCiZtbidn00-1705304301-1-AUAOuQBjBD1bJQZXFHnyqzGZuBIyHkMpmedMwLZLMtRuGgsyCAsyTOaM8qVoi1meJ0/lRNX6BUZUfV7fWYZc43E=

    Wait until you get the completed response:

    {"@odata.context":"https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Exports/$entity","Id":8657,"Name":"MyQueue12345-items","Type":"Queues","Status":"Completed","RequestedAt":"2024-01-15T07:37:02.783Z","ExecutedAt":"2024-01-15T07:37:05.553Z","Size":203226}{"@odata.context":"https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#Exports/$entity","Id":8657,"Name":"MyQueue12345-items","Type":"Queues","Status":"Completed","RequestedAt":"2024-01-15T07:37:02.783Z","ExecutedAt":"2024-01-15T07:37:05.553Z","Size":203226}
  3. Obtain the download link by calling GET https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/Exports(8657)/UiPath.Server.Configuration.OData.GetDownloadLink, where the text between brackets is the ID returned at step 1.

    This is what the request body looks like:

    GET https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/Exports(8657)/UiPath.Server.Configuration.OData.GetDownloadLink HTTP/1.1
    Host: alpha.uipath.com
    Authorization: Bearer rt_45D8A3C5FF2AC56A92A906EE14FB0B8B004D76BAC67AE375521C373F23447684-1
    X-Uipath-Organizationunitid: 770643
    Cookie: __cf_bm=SGYN6zxyBJpmMFjIxBCC8M2eZUvxXaEFqCiZtbidn00-1705304301-1-AUAOuQBjBD1bJQZXFHnyqzGZuBIyHkMpmedMwLZLMtRuGgsyCAsyTOaM8qVoi1meJ0/lRNX6BUZUfV7fWYZc43E=GET https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/Exports(8657)/UiPath.Server.Configuration.OData.GetDownloadLink HTTP/1.1
    Host: alpha.uipath.com
    Authorization: Bearer rt_45D8A3C5FF2AC56A92A906EE14FB0B8B004D76BAC67AE375521C373F23447684-1
    X-Uipath-Organizationunitid: 770643
    Cookie: __cf_bm=SGYN6zxyBJpmMFjIxBCC8M2eZUvxXaEFqCiZtbidn00-1705304301-1-AUAOuQBjBD1bJQZXFHnyqzGZuBIyHkMpmedMwLZLMtRuGgsyCAsyTOaM8qVoi1meJ0/lRNX6BUZUfV7fWYZc43E=

    The response includes a URI which you can use to retrieve a CSV export of your data:

    {"@odata.context":"https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UiPath.Server.Configuration.OData.BlobFileAccessDto","Uri":"<Download URI>","Verb":"GET","RequiresAuth":false,"Headers":{"Keys":[],"Values":[]}}{"@odata.context":"https://{yourDomain}/{organizationName}/{tenantName}/orchestrator_/odata/$metadata#UiPath.Server.Configuration.OData.BlobFileAccessDto","Uri":"<Download URI>","Verb":"GET","RequiresAuth":false,"Headers":{"Keys":[],"Values":[]}}
  4. Make a GET request to the URI that was returned at step 3. This triggers the download of the CSV export. See The exported report section in our user guide for details on the format and naming convention.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.