Reason is because I want to call the API from another system (as an integration), rather than add the queue directly in the UiPath itself
and is there any example on how to do it?
thank you
Reason is because I want to call the API from another system (as an integration), rather than add the queue directly in the UiPath itself
and is there any example on how to do it?
thank you
@Ahmad_Rais yes you can add queue items through API.
Hi @Ahmad_Rais,
To add a queue item through the UiPath Orchestrator API, you can use the /odata/Queues/UiPathODataSvc.AddQueueItem
endpoint. Here are the steps to add a queue item through the API:
/api/Account/Authenticate
endpoint with your Orchestrator credentials.Example POST request:
POST https://cloud.uipath.com/odata/Queues/UiPathODataSvc.AddQueueItem
Content-Type: application/json
Accept: application/json
{
"itemData": {
"Name": "MyQueueItem",
"Priority": "Normal",
"SpecificContent": {
"Key1": "Value1",
"Key2": "Value2"
}
},
"reference": {
"Name": "MyQueue",
"Type": "OrchestratorQueueReference"
}
}
Note: Replace cloud.uipath.com
with your Orchestrator URL, and replace the example values with your own.
/odata/Queues/UiPathODataSvc.AddQueueItem
endpoint with the access token and the queue item data in the request body.Example POST request:
POST https://cloud.uipath.com/odata/Queues/UiPathODataSvc.AddQueueItem
Content-Type: application/json
Authorization: Bearer <access_token>
Accept: application/json
{
"itemData": {
"Name": "MyQueueItem",
"Priority": "Normal",
"SpecificContent": {
"Key1": "Value1",
"Key2": "Value2"
}
},
"reference": {
"Name": "MyQueue",
"Type": "OrchestratorQueueReference"
}
}
Note: Replace <access_token>
with the access token obtained in step 1, and replace the example values with your own.
Example response:
HTTP/1.1 201 Created
Content-Type: application/json
Location: https://cloud.uipath.com/odata/Queues/UiPathODataSvc.QueueItems(123)
{
"@odata.context": "https://cloud.uipath.com/odata/$metadata#QueueItems/$entity",
"Id": 123,
"Priority": "Normal",
"SpecificContent": {
"Key1": "Value1",
"Key2": "Value2"
},
"Status": "New",
"CreationTime": "2022-03-09T12:34:56.789Z",
"StartingProcessingTime": null,
"EndProcessingTime": null,
"DeferDate": null,
"DueDate": null,
"RiskSlaDate": null,
"ProcessingExceptionType": null,
"ReviewStatus": null,
"ReviewerUserId": null,
"OutputData": null,
"AnalyticsData": null,
"RowVersion": "AAAAAAAA7V8="
}
Note: The Id
value in the response is the ID of the queue item that was added.
I hope this helps you add a queue item through the UiPath Orchestrator API!
“{”“itemData”“: {”“Name”“: ““Value1"”,”“Priority””: ““Value2"”,”“SpecificContent”“: {”“Data”“: “”[{"“Key3"”:"“Test"”,"“Key4"”:"“TES8"”,"“Key5"”:"“Test"”,"“Key6"”:"“1234Street"”}]”“}}}”
Pls use this this in the “Body” parameter of “HttpRequest” Post method activity.
End Point:
https://
+ /{Orchestrator_host_server_URL}
+ /{organization_name}
+ /{tenant_name}
+/orchestrator_/odata/QueueItems({Id})’
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.