According to Orchestrator API Guide (UiPath Orchestrator API Guide 2016.2) , I can use the following HTTP POST request to start a job. I need to provide both “ReleaseKey” and “RobotIds” to make it work. Question: How can I start a job dynamically without providing a specific “RobotIds”? I tried to replace “Specific” with “Dynamic”. However, it doesn’t work.
Thank you for answer, @MickeyFireMouse. I have tried change “NoOfRobots”, but I got an error response message that tells me I cannot set “NoOfRobots” as other numbers when “Strategy” is “Specific”. So I believe we need to change “Strategy” first.
Here is my HTTP Request Body when I set “NoOfRobots” as 2:
http_body = {
“startInfo”: {
“ReleaseKey”: release_key,
“RobotIds”:[robot_id],
“NoOfRobots”: 2,
“Strategy”: “Specific”
}}
Here is the response:
{“message”:“NoOfRobots should be 0”,“errorCode”:0,“resourceIds”:null}
Using Strategy:Specific or a number seems to require a RobotID. Strategy:All appears to be valid, but again, NoOfRobots does not appear to allow anything other than zero. My environment only has one bot running, so I cannot confirm whether Strategy:“All” results in the process running on all bots, or whether it simply runs it dynamically on the next available bot. If anyone could confirm, I’d be grateful. It would be great if the fields were documents, rather than trying to extrapolate from the provided examples.
I’ve found the solution, thanks to some guidance on Bizagi’s website. The strategy needs to be set to RobotCount, and then you can set NoOfRobots. JSON payload looks like this: {"startInfo":{"ReleaseKey":"[ReleaseKey]","Strategy":"RobotCount","RobotIds":[],"NoOfRobots":1}}