#PreviewBlogs 2019.4 - SOAP and Swagger-based REST services for Library projects!

Hi @loginerror,

I have followed the above steps, but i am getting the below error in Get Release ID sequence, Get Releases activity is working fine but not able to extract Release ID.

The expression used is getReleaseResponses.Value(0).key.tostring

And there is no intelligence is shown for Key method after Value(0)

image strong text

1 Like

Hi @anil5

It’s most likely due to the in_ProcessName not having the correct value for filtering.

Just as an example, this is how it should look like:

And this is how it looks in Orchestrator:

Thus, the in_ProcessName is actually ProcessName_EnvironmentName

Please let me know if it works then :slight_smile: (and I’ll update the post a bit to reflect that a bit better)

Thanks a lot for testing it! I know it’s not the shortest nor simplest blog out there :slight_smile:

1 Like

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

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.

4 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

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:

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