Getting QueueItems based on Status using Orchestrator API

Hi Experts,

Using Orchestrator API ,I am trying to fetch QueueItems based on their status.Here is my API URL
“/odata/QueueItems?$filter=QueueDefinitionId eq “+QueueID+”&$Status eq UiPath.Core.Model.Queues.ProcessingStatus”+"’"+StatusQryStr+"’"
I am passing QueueID and StatusQryStr as input paramters to this url.But API is fetching all the Queueitems irrespective of StatusQryStr what I sent.For ex. if I send StatusQryStr as ‘New’, it is fetching all the queueitems i.e.Successful,InProgress etc.Is there anything wrong in the URL that I customized?Can u pls help me here to fetch items based on the StatusQryStr(status what I send as i/p).

Thanks In Advance,
Lilly

@lilly - may I know why you are trying to fetch queue items using API and why not from Get Transaction Item activity (with this you don’t have to mention the status, it will take the New items automatically)?

Hi parasmanichauhan,

Thanks for the the reply.Infact I want items with “Inprogress” and “Abandoned” statuses.Can I fetch them using “GetTransaction Item” Activity?

Many thanks,
Lilly

Hi,

You can fetch them with the other activity called “Get Queue Item”. You have some filter options in the property panel of this activity :slight_smile:

Regards

1 Like

Hi Martin,

Cant I get the same using the Orchestrator API with multiple filter options.
“/odata/QueueItems?$filter=QueueDefinitionId eq “+QueueID+”&$Status eq UiPath.Core.Model.Queues.ProcessingStatus”+"’"+StatusQryStr+"’".

Thanks,
Lilly

you got solution for this???

Hi @ajay_sai,

You can simple use Get Queue Items Activity, There is property called QueueItemStates, Click the check box (states), It will return a list of queue items, which you can use further as per requirement in the project.

Warm Regards,
Ranjith Udayakumar

Thanks ranjith but i have condition to use only orchestrator api…is there any solution for that??
i tried /odata/QueueItems?$filter=QueueDefinitionId eq id & $Status eq Failed…but it’s not working

Try this one: {{url}}//odata/QueueItems?$filter=QueueDefinitionId eq id and Status eq ‘Failed’. Instead of URL paste the url of your orchestrator.
Strings must include quotes in filtering, int are without them. Similar topic is linked. You can find there multiple filter condition and also which functions/logic which can be used
https://forum.uipath.com/t/orchestrator-api-query-functions/185719

1 Like