cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to pass parameters from JSON to Rest POST snap

achava02
New Contributor III

Hi All,

I am trying to send the following JSON values to Rest POST snap. In the JSON the first element is the body to POST and second element is token. Can someone suggest me how can i handle this. Thanks in advance. Following is my JSON document.

[
โ€“ element 1, body to Rest POST
{
โ€œformatโ€:โ€œcsvโ€
โ€œversionโ€:โ€œ1.2โ€
โ€œnameโ€ :โ€œexampleโ€
โ€œqueriesโ€:[{
โ€œnameโ€ : โ€œquery1โ€,
โ€œqueryโ€: โ€œselect id, name from tableAโ€,
โ€œtypeโ€ : โ€œqueryโ€
}]
}

โ€“ element 2, token to Rest POST
{
โ€œtokenโ€: โ€œxxxxxxxxxโ€
โ€œidโ€:โ€œxxxxxxxxxxโ€
}
]

Thanks,
Aj

1 REPLY 1

petar_rajchinos
New Contributor III

Hi Ajay,

I would suggest you to send the token in the header of the POST call. Similar like the picture below. Have you tried that before?
image
Let us know if that helped.

Regards,
Petar