API and Swagger

Hi,
I am a beginner to learn API using Swagger. Are there any examples out there that would walk me through each of the APIs and how to work on them? Can you please provide pointers? Is there a specific version of Swagger that version 2022.10 uses?

thank you,

@A_Learner

Tversion is 16.0 I believe…to know just use yourorchurl/swagger/index.html …version would be displayed on right top

Coming to resources swagger itself is a resource to use api…whichever you see as * in the fields can be filled and you can check the returned values and also you will get curl which can be used as a base api call that is made to get the data

Apart from That can check here

Cheers

2 Likes

Hi @A_Learner you can go through some youtube vidoes you will get an idea how API swagger works also you can try yourself
Go through this documentation
UiPath Add-ins Guide
Thanks
Akash Javalekar

1 Like

Thank you. I am trying to create a folder and trying to run post. ending up with an error. Do I need to provide user id and domain? How do I get them?

Thanks a lot,

Hi @A_Learner , please have a read and come back with any specific questions that you may have.

@A_Learner

  1. First create an external application in orcgestrator admin panel
  2. After that you would get client id and secret which can be used to get bearer token using which you can do further api calls

Note : above steps needs to be done if using api from any external app…if using studio then use orchestrator http request with relative endpoint and it should work

Links on how yo create external application are already provided above

Cheers

Kindly advise why it is giving me 405 error

@A_Learner

If you want to get all folders then get method is to be used and not put

Cheers

Thank you. I am trying to create a new folder.

Regards,

Hey @A_Learner! :slight_smile:

Since your screenshot looks like you’re working in Studio, why don’t you use the Swagger UI first, as you mentioned you want to play around with it?

Here’s how you can get there:

image

Then simply “authorize.”

image

Hope this helps!

Cheers!

@A_Learner

then it should be post

cheers

Can you advise on the Json pay load the activity is expecting?

Thank you,

@Julian_Muhlbauer
Trying Delete from Swagger UI, getting 401 error. What am I missing?

@A_Learner

If you see seagger you would see full load …

Cheers

1 Like

@Anil_G so do I need to fill this up and execute the request?
thank you

@A_Learner

Yes click example values…you can send the required values remaining can be removed

That would be your json payload

Cheers

@Anil_G
For some requests for example, create folder - POST- " /odata/folders"
I update the example with display name and execute. It gives me “404” error. I do not understand, how to sort through the errors. Thank you,

@A_Learner

Can you show a screenshot of response

cheers

@Anil_G

@A_Learner

can you show the json payload you sent as well

may be the values are wrong there

cheers