How to POST data in http request activity via data table

Hello everyone,
I have data in Excel sheet and i am giving this as a variable as dtData and have to convert this is json

Assign= DttoJson → JsonConvert.SerializeObject(dtData)

After this i have created one more variable named(json) where i am giving some format

Assign= json → “{‘data’:'”+DttoJson+“',‘message’:‘Test message’,‘queueName’:‘xyz’,‘statusCode’:‘200’}”

So have to post data via endpoint url in http request activity
So under headers section i have given content type and Authorization
In body i have called the variable json and
in result section created a variable names jsonResult
And in status section making variable as status.

And using log message(jsonResult +status.tostring) for it but I am getting status as 400 bad request.

I am not getting what i am doing it wrong it would be grateful if someone can help me into this

Thank you!

1 Like

Hey @Shreya13

Which endpoint you are trying to use here, what’s the json you want to pass…

Show some snaps please. Because the payload looks not right which you are trying to pass…

Thanks
#nK

Hi @Nithinkrishna
The end point url i can’t share over here but conversion of data table to json is the first image and json format one is the second image


Thank you!

1 Like

Hey @Shreya13

I don’t want the entire URL just the endpoint …

Also, this JSON data which you are passing above in the body of the request ?

Thanks
#nK

@Nithinkrishna with the endpoint what do you mean over there , the endpoint panel where we paste the URL and it’s under webhook

And yes passing that variable under the body of http request

1 Like

Hey @Shreya13

I’m just asking about the Orchestrator endpoint to which you are posting the serialised data table.

Because, no orchestrator API function accept the above formatted payload.

Thanks
#nK

Hey @Shreya13

As discussed, proper Authentication header with escaped JSON in the body of the request will do the job.

Thanks
#nK

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