Orchestrator API - how to trigger a process

Hi

I have deployed a process in orchestrator. I want to trigger the process in orchestrator using API call. I gone through the API document , it asks to use below URL.

https://platform.uipath.com/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs

How to pass process id and any mandatory arguments(for API call) to initiate a job to this URL. Also i want to check how to pass parameters for the RPA process which is initiated. Can any one share any example how to pass this information?

3 Likes

Hello @Tony.u,

Hope this could help you:

UiPath v2017.1 : https://orchestrator.uipath.com/v2017.1/reference#jobs_startjobs
UiPath v2016.2: UiPath Orchestrator API Guide 2016.2

Regards,
Susana

Hi susana

Thanks for reply. I cannot see anything like release key when I check in processes tab in orchestrator, can u let me know where can I get this.

Regards
Tony

Hello @Tony.u,

You can use GET Method https://platform.uipath.com/odata/Releases

Here is an example TEST_ORCHESTRATOR_API.zip (15.8 KB)

Regards,
Susana

1 Like

Me too. Is it supported by the orchestrator API?

Hi Chatur

Parameters( like robot id, process id, header info etc) which are used to initiate RPA processes , yes we can pass as part of API call.
Parameters which drive logic with in RPA process, no we cannot pass the parameters. For example you have a RPA process for flight search, source and destination location information will change the search results. Passing source and destination as parameters in API call is not supported.
You can handle this requirement using assets in orchestrator and also to update assets there is an api call.

regards

Hi Tony,

Thank you for your reply. How can I specify which asset is to be picked by the job? Lets say I want to run multiple instances of the job in different robots or a parallel process within the same robot.

Using Queue transactions is ideal for such scenarios. However, if there is a way to pass parameters or specify to the robot to pick an asset or transaction item in the queue, it will make the application more robust.

Hi @Susana,

For the getRobot call I am getting unauthorized error from uipath studio/postman even after providing the Bearer token. But when I hit it in the browser, I get the result.
Any idea what I am missing here?

Hello @abdult420,

If you have checked your Bearer token try to remove your Cookies in postman and let me know.

Regards,
Susana

2 Likes

Hi @Susana, Thanks :slight_smile: it worked after clearing cookies.
Cheers,
Tamim

1 Like

Hi Susana,

May I know which authorization are you using to setup the account? I am now using basic. However, I still get below error

Hi @dwshowtime,

First of all you need to make a POST request to the https://platform.uipath.com/api/account/authenticate URL
with your Orchestrator login credentials, for getting the token.This bearer code must be used in all future requests.

Then, you have to copy and paste this token from the HTTP response, from the “result” parameter in your requests.

Here is an example postman collection TEST_ORCHESTRATOR_POSTMAN.postman_collection.json (1.2 KB)

Please, go through these links :

https://orchestrator.uipath.com/v2017.1/reference

https://forum.uipath.com/t/require-guidance-in-orchestrator-api

Regards,
Susana

1 Like

Hello Susana,

I still not really clear the picture. I intend to create a robot to use a online booking and then return the 200 / fail message. This part is done. However, can I swap it as REST API in “https://platform.uipath.com/”, so that when someone call that Url with the correct body parameter, it will able call that Robot and do that job? is it possible?.

Trying to understand the Orchestrator API a bit better. For example, About OData and References - is this for starting an existing job (or putting it to the queue as it states “sets to Pending state”)? Name “StartJobs” is a bit contradicting to the description which says “Adds a new job and sets it in Pending state for each robot based on the input parameters and notifies the respective robots about the pending job”. We’ve identified a number of processes where the automation would need to be triggered by user input in some cases (but also scheduled), could Orchestrator API be used for that purpose also with unattended robots? Do I understand correctly that when installed on premise the Orchestrator is deployed to certain URL and this URL would be used for API calls instead of “https://platform.uipath.com” in the examples? Or how does it go?

Hi could you please tell me how to clear the cookie. I removed it but still the cookies are showing

Have a look at this link. This should clear your cookies in Postman.