Why /odata/QueueItems return only up to 1000 items starting with Orchestrator v2021?

Why /odata/QueueItems return only up to 1000 items starting with Orchestrator v2021?

Recently we’ve upgraded our Orchestrator from 2020.10.X to 2021.4.* and observed that in older Orchestrator versions we don’t have a limitation for displaying queue items.

When we run the /odata/QueueItems we received 33365 @odata.count while only 1000 is provided in the display results, this is expected behavior?

This is expected behavior:

Obtaining a different set is possible with the use of Pagination properties. In this way, UiPath is trying not to impact too much the response header performance.

It is recommended to retrieve a list of up to 100 transactions from an indicated Orchestrator queue in Studio activity and a maximum of 1000 for Rest API calls.

Perform a GET request for https://ORCHESTRATOR_URL/odata/QueueItems?$skip=0&$top=1000&$count=true

  • $skip - Helps skip the first “n” items. This property supports only integers and integer variables. Excludes the specified number of items of the queried collection from the result. (modify only the $skip value)
  • $top - Limits the number of items returned from a collection. The maximum value is 1000. (don't change to a bigger value than 1000)

After every loop request, increment these two fields by 1000.

  • The first run 1 - 1000
  • Second run - 1001-2000, etc.

In the header request, add Content-Type: application/json and X-UIPATH-OrganizationUnitId: {ORCHESTRATOR_FOLDER_ID_VALUE}

Note: To avoid issues between the environments where there is no limit for displaying the QueueItems (this is especially for older environments <v2021.*), use a value that is less than 1000 for the $top parameter (this applies only for Rest API calls).

For Studio activity UiPath.Core.Activities.GetQueueItems, there is another limitation (Top=100):

UiPath.Core.Activities.GetQueueItems -> Enables the retrieval of a list of up to 100 transactions from an indicated Orchestrator queue, according to multiple filters, such as creation date, priority, state, and reference. Obtaining a different set is possible with the use of Pagination properties.

Top - Returns only a specified number of items out of the total. The maximum value is 100. This property supports only integers and integer variables.

2 Likes