How to add parameters ( existing varaibles ) in HTTP request in UiPath

Hi,

I am trying to call an API using HTTP request.
I need to pass a different parameter which is stored as a variable.

From the screenshots - The For Each loop has the variable (item) which I need to pass to the End Point.

The End Point looks like this - 访问错误-404 cholecy.json.

So from the above the URL I need to replace “lap cholecy” with the variable “item” inside the loop. I tried using item.toString inside the body section, it didn’t work. I also passed item.toString as a parameter, it didn’t give me the result.

Kindly help.

Thanks,
Manu

Hi Manu,

Wouldn’t it work to just modify the endpoint?

https://www.text2codes.com/T2C/home2api/apiSinglePhrase/” + item.tostring

Do you have to send the json file aswell? maybe try to add as attachment, or read the content of the json as a text and put it in the body (?)

Have run this API with something like Postman before trying the UiPath activity?

Hi @RockSolid,

Thanks for your reply.
Yes I need to send the Json file. However, thanks for suggesting to modify the endpoint.
I have modified it this way - “访问错误-404” and it is working.

Appreciate the help.

Manu

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