Forum Discussion

achava02's avatar
achava02
New Contributor III
6 years ago

How to pass parameters from JSON to Rest POST snap

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

  • petar_rajchinos's avatar
    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?

    Let us know if that helped.

    Regards,
    Petar