How to pass json body for post api call

Hey
Im new to api calls & im stuck at a point where I need to perform a Post API call with json body as input

so after providing the endpoint url & I’m supposed to pass the entire json string in its body right ?
(let me know if I’m doing anything wrong)

But in uipath the Json is not taking directly & showing me this following error

Please help me by providing me the solution

image

@Jiban_Kumar_Das_TcM

Hi @Jiban_Kumar_Das_TcM ,
I am sending you a sample workflow for your reference which might help you.
PassingJsonStringFromAssign.zip (1.9 KB)

The main problem is that, the string needs to be in a single line while you are assigning it to a variable, it can’t be as the body we send in postman.

Thanks & Regards,
Shubham Dutta

1 Like

Check this example Making web API call, Method not found - #7 by marian.platonov

1 Like

understood, thanks for the input

But 2nd doubt will be the body currently exists in a cell value

then i can manipulate the strings to bring all the values into a single line ??

Hey

now my doubt will be, the body currently exists in a cell value( cannt hardcode it as these value changes & are always updated in that excel file as a cell value soo

how i can manipulate the strings to bring all the values into a single line ??

Check here CSV to JSON conversion