Hi UiPath Family,
Note: Sample Xaml Has Been Attached For Your Refrence
Developed Studio Version:2020.4.3
Please leave a like.
I was having issue with using orchestrator API with Enterprise edition of Orchestrator. I really had a difficult time in resolving the issue. The process to follow in Community edition of orchestrator is entirely different from the method you use for enterprise
Important step to know. YOU DON’T NEED TO ENABLE API LIKE YOU DO IN COMMUNITY EDITION directly you can start from the step 1
So let this post be the refrence in future if you face the issue with Orchestrator API in Enterprise edition.
Please Follow the following steps:
- Generate Access token with following step UiPath Orchestrator API Guide 2016.2
Note: output is json access token with other data you need to use regex to extract the data out of it. I have attached xaml for your reference
- you need to get Releases(Get Request)
https://YourEnterpriseOrchUrl/odata/Releases
In headers give the access token Name = Authorization Direction=In Type=String Value="Bearer "+“Token value returned by 1st step”
take the value mentioned as “KEY” and not “Process key”
https://docs.uipath.com/orchestrator/reference/environments-requests
Note: there will be different keys for different processes that you have published in orchestrator, make sure you choose right key
- you need to get robot Id’s(Get Request)
https://YourEnterpriseOrchUrl/odata/Robots
In headers give the access token Name = Authorization Direction=In Type=String Value="Bearer "+“Token value returned by 1st step”
output will be json. Note down the field “Id” and not “UserId”, id for each bot created in orchestrator varies from one another.
https://docs.uipath.com/orchestrator/reference/robots-requests
If You are done you are almost done it is now you have issues. Because this is not mentioned in the documentation.
- You Need to make final Post request to start job.
the json payload is as follows
{
“startInfo”: {
“ReleaseKey”: “output from the 2nd Step. Your desired Process Key”,
“Strategy”: “Specific”,
“RobotIds”: [output from the 3rd step. Your Desired robot ID]
}
}
Jobs Requests
NOTE: Please note Requests are case sensitive
API.zip (5.9 KB)