Starting with REST API

Hi

I have the robot configured in platform.uipath.com and I can connect to the robot with robot key and orchestration URL from local machine.

I have installed the UiPathPlatform.msi with IIS7 and SQL Server. When I try to test the REST API with the following URL, I get the login page with the place holders for tenant name, user name and password.

https://127.0.0.1:443/UiPath/service/agent/IsAlive

Can any one tell why when I enter the tenant ID and username and pwd, the keeps saying Invalid credentials.

Is there anything I am missing ?

Thanks

Jyothi

Hello,

May I know whether you have sovled the problem? I also want to call my robot which deployed to plaform.uipath.com, however, I don’t know how to use REST API to trigger my robot. Do you have any direction?

Hi

I was able to kickoff the robot after I created a schedule job and kickedoff the
scheduler job.

Here are the steps I followed

  1. Get authentication code using the follwing REST API

https://platform.uipath.com/api/account/authenticate

The body of the REST API should have the following.

{
“tenancyName” : “xxxxx”,
“usernameOrEmailAddress” : “username”,
“password” : “passworrd”
}

  1. You can set any asset vakues using the api

https://platform.uipath.com/odata/Assets(8899)

pass the token in the header from previous step, be sure to Add 'Bearer ’ to the
token.

Authorization : Bearer
5W9c8jmd5NcGwwur80Jo7OQ-QW7bVsfBZRgQB-YiiwP7WVWg_E-ngtJg7NmLDtLjs_k176BlVZFQxwHOp9ANca22TLQCepQkHt7fmOHePbZr1n5F9K6ZcDLuwbZRrdHVnLF3_pzxrU1xVg19DcpaB3UqUDD-jBxSBgEDWgn5A6cvEvGNirHLor71MoaQJuLZloNr0rMowwJ2QDnsoiySjfcPt604lrbGiLJCo_k-3138unB3hYvtUEJVV58xQQN6bza79JLVQJm7CCirl4e6gkHP1OwG2CnBIHm7K86x6DIfseg9-T29hhidNYKj_iT6DzAamiWJ3rFIVtL56cF9iHm-W08moZH9s7IfqOOdcTJEgRm6VPInUHhus0WY1Xseceep9S59MpiGv2zom1ELnys9YPAR806IjMHl7qnLmBh-Dn7bRX4vl6-wpXv1MrnBfFV4m4gu9OaZreKNtrvzkNzzXSXX1J3aLgxHvXabhW0Ptsn8uOCjpx3moTICKYo1aeOE_0bN3nWN0VuWmD-rpA

Body of the rest API should contain the following.

2 Likes

thanks for your explanation and the steps. may I know how my robot get the argument from url query?

example. https://platform.uipath.com/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs?date=‘dd/mm/yyyyy’ & name=‘test’&lastname=‘testing’

is it possible to do have a robot to extract the parameters? also is it valid to have above url beside calling the startjobs?

HI

I followed the following document.

It has all the REST APIs we need.

Instead of parameters, I have used the GET/POST Asset API

https://staging.uipath.com/odata/Assets?$filter=Name eq ‘QueueName’

https://staging.uipath.com/odata/Assets.

I have not experimented with parameters to startjob api.

Thanks

1 Like

To call API from SQL you can use

1 Like