#FeatureBlog - 19.4 - SOAP and Swagger (based REST services for Library projects)

Hi @loginerror,

Indeed the issue was with the argument in_processName and after i changed accordingly ProcessName_EnvironmentName the workflow works perfectly and was able to run the job.

This is really cool feature :slight_smile:

2 Likes

Hi @loginerror,

this is a cool feature and I was able to run a process from orchestrator as per the guidelines and special thanks to @anil5, for reminding me to check this new feature and suggesting me in putting the process into work(to be precise helping me).

UiPath always puts community in front and thanks for that.

Regards,
Pavan H

4 Likes

Hello LoginError,

That is an awesome feature. This is really handy if an program expose a wsdl or a swagger-definition which will otherwise be automated through the gui.

May I`m allowed to write a littlebit technical?

In speak of the swagger-definition.

With the use of codegen tools like swagger-codegen may it is possible to add a security definition to the swagger-definition so theses tools can benefit from it?

My current modified definition looks like this:

  "securityDefinitions": {
    "Bearer": {
      "in": "header",
      "type": "apiKey",
      "name": "Authorization"
    }
  },
  "security": [
    {
      "Bearer": []
    }
  ],

The original looks like this:

  "securityDefinitions": {},
  "security": [],

At the moment I have to download this definition manually, add theses lines of json to the definition and run swagger-codegen to produce usefull code for my little self-developed csharp apps.

Adding theses lines to the definition would result in my case in allowing me, and of couse other developer, to simply set an “apikey” which would be consumed by restapi-frameworks. Theses frameworks will then automaticly exposed this key as an http-header like this: “Authorization: Bearer {JWT}”. And I also haven´t to do the download with every new version manually :slight_smile: . Without these lines you have to add the Bearer Token to the header for every single request, which can be nasty.

I hope my english isn´t to bad to understand and I hope it is usefull to improve UiPath futher.

If requested I can also post this in the Idea Section.

Best Regards
Mario (Lunk)

1 Like

Hey @Lunk

Thank you for your suggestion. I added it to our tracker of ideas for now. I’m sure other team members will be better at judging if and when this could be implemented. Maybe @MirceaGrigore can help here :slight_smile:

3 Likes

To try with other than the UiPath Orchestrator, May I know other services those who have the same url link as you you have with swagger.?

1 Like

I will update this guide whenever our team releases the API guidelines for the new authentication method :slight_smile:

EDIT

For anyone looking on how to authenticate, here’s a sample project:

Also, if you already have your new tokens, this is how you should run it from services:

The value of the dictionary looks like this:

new Dictionary(of string,string) from { {"Authorization","Bearer yourAccessToken"}, {"X-UIPATH-TenantName", "yourTenantName"}  }
1 Like

This is awsome :smiley:

2 Likes

This is great and we just finished doing a proof of concept to get this working but didn’t do it as Libraries. I think we will do that.
What i’m working on now is trying to find the end point that will give me the status of all the Robots. Can anyone help me out on this?
Thanks!

1 Like

Hi @tmartin

Would this one be the one you are looking for:

2 Likes

Thanks.

Tracy Martin

2 Likes

Hi @MaxT

The authentication was made more tricky recently, it is because of switch to cloud service. You can see this post here from slightly above:

It goes over how to get the access token that will basically replace the bearer token. It also states how to input this token in the service activities for them to work.

1 Like

Hi @Ioginerror
I want to trigger a UiPath Job with input parameters from another application through API call, I am trying to authenticate with new Cloud orchestrator, I tried with UiPath HTTP request, Postman and Swagger UI. But everywhere I am getting Invalid credentials error. How can I authenticate? How can I get the Robot ID and Release Key?

In Postman I have taken below End Point URL
https://platform.uipath.com/api/account/authenticate

In Swagger, I have taken URL like below
Orchestrator Account URL + /swagger/ui/index#/

{
“tenancyName”: “string”,
“usernameOrEmailAddress”: “string”,
“password”: “string”
}

I followed as mentioned in the https://forum.uipath.com/uploads/short-url/iZsjSYaXMTLLC10NKW2wkVVbUus.zip and executed the GetTokens.xaml, after logging to orchestrator portal, I am getting below error.

Error

Error%202

Looking for your help.

Thank you

1 Like

Hi @Ramprasad

Welcome back! :slight_smile:

The Authenticate endpoint is not relevant any more. Please follow the full procedure and you will generate the access_token that you will use instead of a bearer_token.

1 Like

Which is the full procedure then? Is it the 2019.4 update in academy? Is it the one posted above? Is it somewhere else? This part has become really messy and could use a cleaning.

Regards

1 Like

I agree. Currently, the Academy course and the above blog are both completely accurate for the on-premise installations of Orchestrator.

It is the free Cloud Platform Orchestrator service available at platform.uipath.com that requires some small changes to the process, due to the new, more secure authentication that was introduced with it.

5 Likes

Hi
I am going through the UiPath 2019.4 Updates Course . in the SOAP and Swagger Libraries section, when I am trying to create a new service, as per the video, by specifying this url “https://platform.uipath.com:443/swagger/docs/V2” in the File and Link textbox, I am getting "The document is invalid" error. I am using Uipath 2019.8.0 Community Edition
Please help

1 Like

Hi @AbhayGodbole

Please log in to your Orchestrator instance on Cloud Platform and look at the address. As per my post above yours, you will need to modify some things, including the address. This is the template:
https://platform.uipath.com/<cloudPlatfromName>/<orchestratorInstanceName>:443/swagger/docs/V2

More about here:
https://docs.uipath.com/orchestrator/v2019/reference#about-odata-and-references

And my post here, on how to run the Orchestrator calls via services feature:

2 Likes

Thanks. It worked for me. The Orchestrator URL of cloud is
https://platform.uipath.com/[AccountName]/[ServiceName]/swagger/docs/V2

2 Likes

please help
I have tried https://platform.uipath.com/[My Logical Account Name]/[My Service Name]/swagger/ui/index#/

I got my Logical Account Name from https://docs.uipath.com/cloudplatform/docs/managing-account-settings Site URL I also tried the name because why not

and the service name I got by looking at my services in https://platform.uipath.com/portal_/serviceinstances

what am I doing wrong? it keeps giving me “The document is invalid”

is there anything I need to do first?

I have downloaded and run https://forum.uipath.com/uploads/short-url/iZsjSYaXMTLLC10NKW2wkVVbUus.zip

but I do not know what I should do with my key,

any help will be greatly appreciated,

thanks,

Kevin