Correct URI for Orchestrator 2008.4 on-premise API calls after authorisation

Hello,

I am using Orchestrator 2008.4 on-premise
I am able to get my bearer token using a POST to https://subdomain.ourserver.com/api/account/authenticate with the right headers en body.

Now, that I have the bearer-token, I am trying to make a call that just works…

do I have to use https://subdomain.ourserver.com/api/something?
or is it https://subdomain.ourserver.com/odata/something/?
or is it https://subdomain.ourserver.com/swagger/something?

please help!

Hi , welcome to the Uipath community forum
Once you get the authentication token , you need to post it to the same URL

Thanks for yor response but I can’t get it working.

To login I do a POST to https://subdomain.ourserver.com/api/account/authenticate
In de HTTP-Header I have “Content-type: application/json”
The body of the POST is:
{
“tenancyName” : Default",
“usernameOrEmailAddress” : USERNAME",
“password” : XXXXXX"
}

My response is
{
“result”:“ZtNoNCkpdvFdZecHBHs780RsvLAaLMtQnZbhTsty38lsfkj5PgC0RukfrMGShyaTJ6T4-eXkG1Ys2flzhStErZnDAVSnSYaj4GVjXb5q_vPXrk7iyjLvxpNJR2LxRTHGqlFCOPYdBFUBsSEt35hEZ7nmgw6_QnppowUPXtzRVJnGEBfySWYimOr1n8e8ncvHxaEhIOrcNZSWhdtfH0b1vZBki6Va9nyu24Q6uiAJpM8yFb11R_u8NxoIemncaLQK4fyRaTFcwdpt9D012YtVN-LdtfRFqCtarcSXUU04mHCaWfDtnVvLboPB8XtmVoiH69Z7WbX4gWOg-dJvEU7dUmxmdl8sx29LA22vvegFfV7L-zDa_3_6AuwuxcXIR_ZO67dQYuL2N-tBGDYBNUWGfwARX-AMKs_tMsAhL0ukUzK7lZU_Ne_7ouvzfRwljdFVumFL08_0aMnaWpUGhU3DQgSTlXlL-BU-QPrqzzevrGxVu9zrXN6rVTJZ4RkzzvqOcddaxgyOHQ”,
“targetUrl”:null,
“success”:true,
“error”:null,
“unAuthorizedRequest”:false,
“__abp”:true
}

I did a POST again to https://subdomain.ourserver.com/api/account/authenticate
In the HTTP-Header I have
“Content-type: application/json”,
“X-UIPATH-TenantName: Default”,
“Authorization: Bearer [RESULT FROM FIRST REQUEST]”

You did not tell me what to put in the body, so my body is empty…

And my result is {“message”:“loginModel must not be null”,“errorCode”:0,“resourceIds”:null}

What should happen then? Do I get another token?

I got the community edition Cloud API version running, and I am able to start a Job there…
But on On-Premise it is different and documentation is confusing and not clear to me…

I still need help.
Some more information on the URL, header and body for next step would help!

A POST to https://subdomain.ourserver.com/odata/Jobs/UiPath.Server.Configuration.OData.StartJobs
results in:

{“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.”,“validationErrors”:null},“unAuthorizedRequest”:false,“__abp”:true}

I think my account needs some rights to be set…

@krazy

pass the authorization code in headers

Hello Dennis,
IN this video I show how to start the process on Orchestrator on-prem:

Thanks,
Cristian Negulescu

1 Like

@Cristian_Negulescu
Hello. That what is happening when i do the same things as you in video. Is there any options i need to apply - may be enable API use in orch, or something else i dont know?

Hello Aleksandr,
I don’t know what to say. Did you send the content type Json
my Postman has these defaults settings:

Thanks,
Cristian Negulescu

1 Like

@HomaDzz
try to open the swagger like this
The Orchestrator API Swagger definition can be accessed as follows, depending on your deployment type:

  • on-premise - add the following suffix: /swagger/index.html to your Orchestrator URL. For example, https://myOrchestrator.com/swagger/index.html
    and test your commands
    API References
1 Like

Yes. Content type was OK.
This is what i get with swagger due VPN connected:

1 Like