langsem
(Langsem)
February 23, 2023, 9:44am
1
Hello i have a robot that is using an URL to fetch some data. I am trying to follow some documentaiton but not sure if the data shall go in the param, header or body or how it shall be formatted
here is the doc i got from the api
I have tested that i have access but the response is not as expected it dont seems that the “filter” is working
curl -X POST https://hcg-{enviroment}-tools.ext-abc.com
-H “Authorization: Bearer {access_token}
Content-Type: application/json
Accept: application/json”
-d ‘{
“workshops”: [
{
“workshop_id”: “1080”,
“start_date”: “2023-01-20”
},
{
“workshop_id”: “1810”,
“start_date”: “2023-01-01”
}
]
}’
ppr
(Peter)
February 23, 2023, 9:49am
2
we assume that the workshops are meant.
Depending on the details on how / what was used for calling the service. In general it would be the payload JSON provided at the body
langsem
(Langsem)
February 23, 2023, 9:51am
3
i have inserted into the body
like this
and set body format as application/json
"workshops": [
{
"workshop_id": "1080",
"start_date": "2023-01-20"
},
{
"workshop_id": "1810",
"start_date": "2023-01-01"
}
]
}'
ppr
(Peter)
February 23, 2023, 10:01am
5
this we will configure at header level
kindly note:
ensure that the JSON is correctly handling the inner " or omit it for the first RnD round for testing the general call without filtering
langsem
(Langsem)
February 23, 2023, 10:14am
6
I created it like this in the body, but it dont seems like its been catchning up
“”“workshops”":[
{
““workshop_id””: "“1080"”,
““start_date””: "“2023-01-20"”
},
{
““workshop_id””: "“1810"”,
““start_date””: "“2023-01-01"”
}
]"
ppr
(Peter)
February 23, 2023, 10:21am
7
langsem:
“”“workshops”":[
perfect here was my doubt
we would recommend to send a Jobject:
{
"workshops": [{
"workshop_id": "1080",
"start_date": "2023-01-20"
},
{
"workshop_id": "1810",
"start_date": "2023-01-01"
}
]
}
kindly note: the begining {
Sometimes it is more quick to read it from a text file (we can ommit the escaping " for ")
OR
Construct the JSON from an empty template and populate later with the details
system
(system)
Closed
February 26, 2023, 10:56am
9
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.