How to get jobs from all folders using Orchestrator HTTP request activity?

Hi. I used Orchestrator HTTP request activity to get details of jobs. But it’s returning me only the jobs from the folder to which robot is connected.

How can I get jobs from all folders using Orchestrator HTTP request activity?

I searched a lot in forum and google, but unable to get a solution. Can you please tell me if it’s possible? If yes, how to do it?

@qbrandon - Do you have any idea about this?

Hi @Surya_Narayana_Korivipadu
The Orchestrator HTTP Request activity can be configured to run under a specific Folder context using the “Misc / Folder Path” property.
The GET /odata/Jobs endpoint requires to run for a given folder (by default the one the process is running from) but you cannot get all jobs for all folders in one call. You will need to first list up all the folders with the GET /odata/folders endpoint, and query each one with GET /odata/jobs in a for loop.

2 Likes

Hi
Check this link on how to call on each entities

Cheers @Surya_Narayana_Korivipadu

1 Like

@qbrandon
I gave the foldername “Finance” in that property and this folder exists in our orchestrator. Also the robot account has access to all folders in our orchestrator. I’m getting the following error:
“{“message”:“Folder does not exist or the user does not have access to the folder.”,“errorCode”:1100,“resourceIds”:null}”

Then I’ve edited the robot role with View permissions on Folders, but sill I’m getting same error. Can you help me with the solution for this problem?

One more question. Is there any alternative solution which can give me all jobs from all folder at once?

Assuming you are using modern folders, could you test with “/Finance”?
Based on the doc’s mention of Folder Path:
https://docs.uipath.com/activities/docs/get-robot-asset

Is there any alternative solution which can give me all jobs from all folder at once?

I do not know of one I’m afraid…

1 Like

No. I’m using classic folders. I gave"Program" in the folderpath and it worked. May be it worked because my robot is in program folder.

Anyways, I’ll try “/Finance” and I’ll get back

According to the documentation, this will not work for classic folders: in classic folders, robots are limited to the resources available within the folder of the job.

1 Like

@qbrandon - Thanks for your reply. So I understood that ‘Orchestrator HTTP request’ activity cannot get data from other classic folders.

But if I make direct API calls(without Orchestrator HTTP request activity) and mention foldername in headers, will it return me data from other folders? As mentioned in this link:
https://docs.uipath.com/orchestrator/v2019/reference/building-api-requests

I’ve one more question. Can I use OAuth for UiPath orchestrator version 2019.10.16?

if I make direct API calls(without Orchestrator HTTP request activity) and mention foldername in headers, will it return me data from other folders?

Yes, you would be able to make it. The reason is that you would be using a direct authentication (user/password or OAuth) rather than relying on the Robot token (which is what the Orchestrator HTTP request uses)
Unfortunately this means you will need to handle the auth mechanism yourself.

Can I use OAuth for UiPath orchestrator version 2019.10.16?

No, OAuth was implemented in 21.4
In 19.10 you only have /api/Account/Authenticate

1 Like

Thank you. Now I got some clarity