How to add QueueItem using Cloud Orchestrator API

To understand how to authenticate to Cloud Orchestrator, check out this post: How to Authenticate to UiPath Cloud Orchestrator using API?

Follow the steps below to perform AddQueueItem using Cloud Orchestrator API
Endpoint:
https://cloud.uipath.com/[Account Logical Name]/[Tenant Logical Name]/odata/Queues/UiPathODataSvc.AddQueueItem

Method: POST

Header:
You need to pass the access token generated in successful authentication in authorization section as : Bearer {access-token}

Body:

{
“itemData”: {
“Name”: “TestQueue”,
“Priority”: “Normal”,
“SpecificContent”: {
“Type”: “Customer”,
“Name@odata.type”: “#String”,
“Name”: “Some Guy”
}
}
}

Status Code for successful creation: 201

Response:
{
@odata.context”: “https://cloud.uipath.com/tuhinssam/tuhinssam/orchestrator_/odata/$metadata#QueueItems/$entity”,
“QueueDefinitionId”: 124281,
“OutputData”: null,
“AnalyticsData”: null,
“Status”: “New”,
“ReviewStatus”: “None”,
“ReviewerUserId”: null,
“Key”: “6af8090f-7ad0-4c23-b3aa-44f643010c0a”,
“Reference”: null,
“ProcessingExceptionType”: null,
“DueDate”: null,
“RiskSlaDate”: null,
“Priority”: “Normal”,
“DeferDate”: null,
“StartProcessing”: null,
“EndProcessing”: null,
“SecondsInPreviousAttempts”: 0,
“AncestorId”: null,
“RetryNumber”: 0,
“SpecificData”: “{“DynamicProperties”:{“Type”:“Customer”,“Name”:“Some Guy”}}”,
“CreationTime”: “2020-08-06T12:15:14.9538804Z”,
“Progress”: null,
“RowVersion”: “AAAAAAX24VI=”,
“OrganizationUnitId”: 69133,
“OrganizationUnitFullyQualifiedName”: null,
“Id”: 41647784,
“ProcessingException”: null,
“SpecificContent”: {
“Type”: “Customer”,
“Name”: “Some Guy”
},
“Output”: null,
“Analytics”: null
}

To get Organization Unit ID:
Endpoint:
https://cloud.uipath.com/[Account Logical Name]/[Tenant Logical Name]/orchestrator_/api/FoldersNavigation/GetFoldersForCurrentUser

Method: GET

Header:

Response Format:
{
“PageItems”: [
{
“IsSelectable”: false,
“HasChildren”: false,
“Level”: 0,
“Key”: “f81bd046-bfc3-440e-8b2f-393b637bacf6”,
“DisplayName”: “Default”,
“FullyQualifiedName”: “Default”,
“Description”: null,
“IsPersonal”: false,
“ProvisionType”: “Manual”,
“PermissionModel”: “InheritFromTenant”,
“ParentId”: null,
“ParentKey”: null,
“Id”: 69133
},
{
“IsSelectable”: false,
“HasChildren”: false,
“Level”: 0,
“Key”: “1728b722-2b8b-4e2b-bd2d-4163b2c5706f”,
“DisplayName”: “test”,
“FullyQualifiedName”: “test”,
“Description”: null,
“IsPersonal”: false,
“ProvisionType”: “Manual”,
“PermissionModel”: “InheritFromTenant”,
“ParentId”: null,
“ParentKey”: null,
“Id”: 227730
}
],
“Count”: 2
}

1 Like