Question - How to trigger a Specific Process/Job that's available in specific folder on ORCHESTRTAOR? Job trigger required through API/http req, On a Specific Windows VM, using a specific BOT?

Question -
How to trigger a Specific Process/Job that’s available in specific folder on ORCHESTRTAOR?
Expecting Unattended Job an a specific Windows VM using a specific BOT?

Where can I find FolderID, and input the FolderID and Machine Name?

ENVIRONMENT -
I have couple processes Process A, Process B available on Different Folders, Folder "Default "AND Folder “NEW” in Orchestrator.
There are 2 Windows VM’s, 2 Machine Keys, 2 Robots available.

I tried the following way ,

INPUT
“odata/Jobs/UiPath.Server.Configuration.OData.StartJobs”

“{startInfo: { ReleaseKey: ‘XXXXX’, Strategy: ‘Specific’, RobotIds: [121], NoOfRobots: 0 }}”

When tried to trigger a process through HTTP Request using “Default” folder, I don’t see any issues. But, when tried to trigger the same process in a different folder , I do see the following ERROR.
Ref -Same Process / Same Machine / Different Folder

ERROR
{“message”:“You are not authorized!”,“errorCode”:0,“result”:null,“targetUrl”:null,“success”:false,“error”:{“code”:0,“message”:“You are not authorized!”,“details”:"You are not allowed to perform this operation.

@Bot08100802
For accessing resources in a folder, you need to add the FolderId or FolderPath in the HTTP header

  • X-UIPATH-OrganizationUnitId: [FolderId]
  • X-UIPATH-FolderPath : [FolderPath value]

image

Please refer the screenshot for accessing the FioderID

The FolderIID can also be obtained by performing a GET request to the “/odata/Folders” endpoint.

Thanks for the response. Will check this out.

Where can I input the FolderID information to trigger the process?
I don’t see any reference.

Input-JSONPayload*
“{startInfo:
{ ReleaseKey: ‘xxxxxxxxxx’,
Strategy: ‘Specific’,
RobotIds: [121],
NoOfRobots: 0 }}”

Input-Relativeendpoint*
“odata/Jobs/UiPath.Server.Configuration.OData.StartJobs”

Thank You

Hi,
this may interest you:

@Bot08100802
Currently you are using “Orchestractor HTTP Request” activity → you can make calls only to UIPath Orchestrator API.
For example → Call to /odata/Robots —Returns only a Robot Info that is authenticted under a robot it is executed on, Meaning it only returns a robot info which is connected to orchestractor through your machine.

If you use “HTTP Request” activity → it will returns all the available Robots(Attended and Unattended) which are connected from different machines.

Instead use “HTTP Request” activity —> Steps → Authenticate–GetLicense–Get Resources
(And using “HTTP Request” activity try the same as in the above screenshots)
Please refer the link for detailed info → Consuming Cloud API