I want to add Queue Item to UiPath orchestrator, can it be done tru 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:

  1. Obtain an access token for the Orchestrator API. You can do this by sending a POST request to the /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.

  1. Send a POST request to the /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.

  1. Check the response to ensure that the queue item was added successfully.

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!