Http request with URL segment, working in postman, but not in uipath

Hi,

I am using http request and I need to do a request with a custom url segment.
I’ve been looking around for the solution, but whatever I tried, it didn’t work until now.

The URL works in postman, but it doens’t work in uipath.
I’ve been experimenting with parameters, adding url segment, assembling the url before the http request… all unsuccesful…

URL working in postman:

URL in uipath:

Thank you all in advance!

Check this solution Dynamic endpoint in HTTP Request - #4 by marian.platonov

Hej Marian…
I tried the method.
I think… there is some progres. I get a response status of 0. Before I was getting 400/401 and os on.

But it doesn’t work yet, with a result of 0 thou

I think you made a mistake in the Request URL as it should be finalURL, not a http://finalURL

In the initialURL the variable should hold this value “http://my_endpoint…?caseNumber=”

Also, check if you need to specify some values in the Headers. For that, check the Headers in the Postman request.

Also, you may try to set the Enable SSL certificate verification to False.

Let us know if this helped.

Add a write line activity before the HTTP Request activity and get the value of the finalURL.

After you extracted this value, try to perform the same in Postman again.

I tried all those. The only thing I need to add are the headers from postman. But in postman I only specified endpoint, method (get), authorisation and the URL segment (variableToSearch).

I’ll try to add the headers

You mean to check if the value resulted in my Write Line (final URL) will also work in postman?
It does. I checked that out.

So I mean that I checked the exact link that I underlined bellow. I copy paste that in postman and it works in postman.

In the initial Postman request, I saw that you didn’t use Authentification, but in the HTTP Request activity, you are using it.

Definitely, you are not configuring correctly the HTTP Request activity as in Postman.
Try to put back the SSL verification to True and increase the Timeout to 2 minutes and then decrease gradually its value to match your system network latency.

Did you install the UiPath Studio in Service Mode?
Are you having a proxy in the Studio machine?

In postman I inheritted the authorisation from the the folder I gather the requests under.
I will put SSL verification back to true.

The uipath was installed on my work computer by another department. I guess is servicemode…(?)

Open Studio and check the bottom left side corner

For proxy, go to Internet Options → Connections → LAN settings

3

I guess the only difference is that I still have 2021.4.4 where you have 2022.4.4

We are not supporting anymore the Studio version that you have. Reference: Out of support versions

We recommend these supported versions: 2021.10.8 and 2022.4.4 Reference: https://docs.uipath.com/overview-guide/docs/product-lifecycle

For your case, you may try to decrease or increase the UiPath.WebAPI.Activities package and retry.

I’ll try that now.

We’ll update to 2022.4.4 in a few weeks. Until than, I’ve updated to 21.10.5
But I’ve been incresed and decreased the versions of web.api packages. Still couldn’t succesfully do this http request.
I’ve not update to 21.10.95 and it still doesn’t work.
I’ll experiment a bit more and if I find the solution soon, I’ll write it here.
Else I’ll give up today…

If you have some new suggestions, I’ll be happy to hear them.
Anyway thank you a lot for your support.
Much appreciated!
Andreea

There was no solution.
Some partners reached to the owner of the api and found that, when making the call to the api, the api was redirecting to another link and couldn’t take the token with it.
I found a different solution, and that was to add the letter “q” at the end of the call:
https://{rest}/cases?q={casenumber}

Thanks for the help thou!!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.