API - insert string into body


I am trying to include below string into Body in Uipath HTTP request

{“Status”: [“new”,“open”]}

Passing Array as Parameter doesn’t work so I am trygin to pass this as raw value in Body.

It works in postman, however in Uipath i am not able to do this.

Any ideas how to pass this value and what it should look like?

hi welcome to the community!
you can send it as string like this:
"{""Status"": [""new"",""open""]}"

I tried this one but it returns completely different results that postman.

Not sure if any additional formatting is needed.

Should anything be changed in HTTP request?

that i couldnt know, every request will be different…

In Postman request looks like this and it works:

Not sure if maybe the string shoulb be converted to Json or JsonArray and then passed into body.

Any ideas ? :slight_smile:

you should change your body format to json, but the string should be ok like that…

I changed it to application/json and still nothing… Results are completetely different.
It seems that request is not using States array at all…

How does Body from Uipath HTTP request differ from Body from Postman?

Am I missing something while passing the exact same values?

well, its is not very different, only the way you build the json body is easier on postman… try like this:
"{'Status': ['new','open']}"

1 Like

Hello again :slight_smile:

Still nothing, it seems that array is not being used.

Not sure if format is incorrect of sth else…

On someone else API question here: Http Request activity to send body using POST method - #10 by raviranjan
Request format looks like this:
”“f”“:”“json”“,”“token”“:”“XXXX-XXXX-XXXX-XXXX”“,”“adds”“:”“{”“attributes”“:”“{”“Name”“:”“West Trail”“,”“type”“:”“Hiking Path”“,”“altitude”“:”“542.34"”}“”}"

I added this part: “{”“f”“:”“json”" to my request but it has not changed anything…

Still looking for sulution. Any ideas ?:slight_smile: