HTTP Script help
Posted: Tue Jul 20, 2021 6:44 am
I am in need of a script to execute some HTTPS calls to a api to get some variables. They return a json but I then have to convert to XML to get the variables out. I have tried using the build in HTTP tool but the calls im using need to have a body statement and also on that is a "Patch" call. I see people referring to using the scripting module but have not been successful and really a example or guidance.
Here is a example of the call
POST 'https://website.com/fmi/data/v1/databas ... DATA/_find' \
--header 'Authorization: Bearer 18cfbff76b81ec11ac6239041444fa618d2c89328ae0f3c6b6f0' \
--header 'Content-Type: application/json' \
--data-raw '{
"query": [
{
"LI_Number": "931142"
}
]
}'
Here is a example of the call
POST 'https://website.com/fmi/data/v1/databas ... DATA/_find' \
--header 'Authorization: Bearer 18cfbff76b81ec11ac6239041444fa618d2c89328ae0f3c6b6f0' \
--header 'Content-Type: application/json' \
--data-raw '{
"query": [
{
"LI_Number": "931142"
}
]
}'