Question!How to get Folder Id with orchestator API?

Hi,
There is a question about how to get Folder Id with orchestator?
Is using the method of Get Robot Service - Get Robot Mappings ?
if yes , what is the license key? orchestrator’s license key or robot’s license key?
the endpoint of GetRobotMapping:
{{url}}/api/RobotsService/GetRobotMappings?licenseKey=86753095683&machineName=TESTLAPTOP

1 Like

Hey @S.C

Did you find an answer to your question? I had to look for this today and I ended up on this topic.
In case someone else wants to find the FolderId, here is how to find it.

A typical Orchestrator URL will look like this:
https://cloud.uipath.com/(OrgName)/(TenantName)/orchestrator_/?tid=9999&fid=12345

The FolderId is present in the pair fid=12345 in the above URL.

1 Like

Any idea how to find it within a process? I want to call an API but need to know which folder to call it into based on the folder running the process

Hey @TJ_automates
The folder IDs do not change frequently (yes, they do change, sometimes!).
One approach could be to have a configuration table (e.g. in a database) where the Folder ID can be read to construct the API call.

To get the Folder details use a GET operation for https://cloud.uipath.com/your_org_name/your_tenant_name/orchestrator_/odata/Folders

In order to get process details, use the GET operation for /odata/Releases endpoint.

In order to know the folder id for a job, run a GET request for /odata/Jobs endpoint and look for the OrganizationUnitId parameter value.

2 Likes

My use case may help explain the reasoning - it’s not because folders change but because I have library activity that sets the item reviewer, and this will be called by various processes across the business and in both Prod and UAT. An asset may be useful - it wouldn’t even need to be a table as the get asset would default to the current folder.

1 Like

Hi Ash,
have you found a way to keep Folder ID’s persistent?
My team and I ran into a huge issue when one of our API’s failed for an entire day until someone caught on that API calls were not successful due to an automatic change in our Folder ID.

Hello guys,

don’t know why you are doing all of these. You just need to know the machineName in which the current process is working, or the machineName where you want to execute the job. Get it using → Environment.MachineName

After you have this, you just need to use start job activity, giving the name of the process you want to execute, and giving also the parameter HostMachineName, which is the Environment.MachineName you got before. This will launch the desired job in the same machine or any other you gave in that parameter.

Easy as hell guys. UiPath forum doesn’t allow me to create new topics, don’t know why, but i would create a new one with this, because I saw too many people facing this problem, and it’s easier than people think.