Hi,
I am trying to make an API call but unable to do so in UiPath. Can anyone create a dummy flow to call this API? Here is the CURL command:
Hi,
I am trying to make an API call but unable to do so in UiPath. Can anyone create a dummy flow to call this API? Here is the CURL command:
Looks you need to use “GET” method of the API to get the work order details. But you are using POST in your current request. For RestAPI calls from UiPath you can use RestSharp nuget package with Invoke code activity… that will help.
using RestSharp;
namespace RestSharpExample
{
class Program
{
static void Main(string[] args)
{
var client = new RestClient("https://api.example.com");
var request = new RestRequest("resource", Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
You can use “Chrome Tabbed Postman Extension” to test with the restAPI calls.
@sarathi125 its a POST call.
@sarathi125 can you make a flow and call this endpoint?
Check this
Call_RestAPI.zip (3.0 KB)
Tried your flow. It’s a POST call not get. Still not working.
@Umer_Shahid,
For GET method only we are getting response from the API,
For POST getting exception, I am not sure what you are trying to do with this API, are you going to get WordOrders or create WorkOrders,
Fixed it. Issue was in request body.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.