How to get queuem count?

Can any one tell me how to get the count of queue items in a queue for the specific folder in UiPath cloud orchestrator ?

You can use get Queue items and apply filter like “New”, Inpogress and etc. Once you get list output, you can get count of the same

can share me the url for that?

Activities - Get Queue Items

Hi @Prabhakaran_Elango

You cannot get queue item count for a specific folder in UiPath Cloud Orchestrator because queues are tenant-level, not folder-level.

Only workaround: use separate queues per folder or filter items via API using Reference/SpecificContent.

Cheers

@Prabhakaran_Elango

you want an api or activity

for both you have to retrieve the items and then you can get count

note: for activity limit is 100 queue items and for api it is 1000. So for both you might need to use loop to get all items

again this is specific to one queue ..if you need from all queue you have to run this end point or activity for each queue

cheers

Hi @Prabhakaran_Elango,

In UiPath Cloud there is no single activity that returns only the queue count. The simple way is to use Get Queue Items for the required folder and queue, then use outputList.Count. For large queues, use the Orchestrator OData API with $count=true and pass the folder ID in the header to get the count without loading all items.

Thank you all. but what i actually need is to api endpoint that can fetch the queue item count for the orchestrator folder. so that i can take the queue items by the postman

Use the Orchestrator OData API with the $count option.

Endpoint:

GET https://cloud.uipath.com/{account}/{tenant}/odata/QueueItems?$count=true&$filter=QueueDefinitionId eq {QueueId}

Headers required:

Authorization: Bearer <access_token>

X-UiPath-OrganizationUnitId:

Call this from Postman.

The response will include @odata.count which gives the total number of queue items for that queue in the specified folder.

If you need count by status, add it to the filter, for example:

$filter=QueueDefinitionId eq {QueueId} and Status eq ‘New’

how can i get QueueDefinitionId?

You can use the below REST API:

GET /odata/QueueItems/$count

If you want the count for a specific queue, apply a filter on the queue name:

GET /odata/QueueItems/$count?$filter=QueueDefinition/Name eq ‘Your_Queue_Name’

If required, you can also filter by queue item status (for example, New / Failed / Successful):

$filter=QueueDefinition/Name eq ‘Your_Queue_Name’ and Status eq ‘New’

Make sure you pass the required headers:

Authorization: Bearer

X-UiPath-TenantName

X-UiPath-OrganizationUnitId (mandatory for modern folders) - You can get it from URL once you navigate to folder in orchestrator

Content-Type: application/json

Go to Orchestrator → Tenant → Queues → open the required queue. The QueueDefinitionId is visible in the browser URL as the id parameter.

GET https://cloud.uipath.com/{account}/{tenant}/odata/QueueDefinitions

Use the same Authorization token and X-UiPath-OrganizationUnitId header.

In the response, find your queue by Name and note its Id value. That Id is the QueueDefinitionId.

Im getting 404 by using this url

https://cloud.uipath.com/aveganvzrrzh/DefaultTenant/odata/58346

https://cloud.uipath.com/aveganvzrrzh/DefaultTenant/odata/QueueDefinitions

From the response, find your queue by name and copy its Id. Use that Id as QueueDefinitionId in the QueueItems API.

@Prabhakaran_Elango

the second link provided is the api itself

as mentioned only to get count there isn’t one.. you need to get items and then count

cheers

1 Like