Passing Json body in HTTP request not working

Hi All,
Iam passing below request using through post method http request activity its giving me error.

{
“INSTANCES”: [{
“PROCESS_IID”: “126678918”,
“ACTIVITY_IID”: “297434527”,
“ACTION_PATH”: “SKIP”,
“COMPLETION_PATH”: “none”
}]
}

Error

Can some one help me

1 Like

Hi @thima

I guess you are passing it in string in payload, which should work (PFB)

Also please make sure you also align to the API documentation like passing the right payload parameters

image

If the error is not resolved, please post the screenshot of API documentation for that particular endpoint. This may help.

Thanks
#nK

Hi @thima
I think you can try this way, put the json body in text file and using read text file activity read the text file and then store the result in string variable, then put the string variable in the http request json body parameters.

Hope it helps
Regards,
Nived N
Happy Automation

1 Like

Hi ,

Above both ways are not working


Regards,
Hima

1 Like

Could you please show the documentation screenshot of the API end point you are trying to access from UiPath ?

Hi @thima
checking your json format is not in correct format it seems

may i know one thing, what u are replacing there in the two assign activity?

Hi,
Iam replacing instance id and activity id which i get from db

Regards,
Hima

I dont have API documentaion. only in pdd its mentioned.

image

1 Like

Okay are you adding double quotes to the Id’s explicitly

Something like """" + your_id_var + """"

output : "123"

#nK

Yes iam replacing with variable.

output it gives me instance id=Sucess

1 Like

Okay could you please debug the code and send a snap on the payload value after replacing your id’s

ok.

1 Like

Hi @thima

Only change I can see is none param. Could you please verify that once or just try with Retry once to check API retry is successful.

It will help us debug.

Thanks
#nK

Hi Nithin,

I Have only one data to skip. This is working in post man not working in uipath.

image

1 Like

Okay then please copy this entire body and paste it in notepad.

Please, Read it from notepad in UiPath.

Don’t use any dynamic variables for now, just to make sure it works

Also, are you passing the below things right…

  1. Endpoint
  2. Authentication
  3. Headers if any
  4. HTTP method (POST or anyother)

Could you please check these…

Thanks
#nK

Hi Nithin,

I checked like above api result is coming null.

1 Like

Could you please show me the entire success request in postman ?

you may blur the credentials if any but please show the entire request

Thanks

1 Like

No credentials are used

1 Like

Headers section please…