08-03-2020 07:17 AM
Hi Team,
While making an API call to the SandBox SDWAN instance(Always On) using Postman response is not coming in JSON, It's coming as html.
In my request header is in Application/JSON only. Am I missing something here ? Thanks
Solved! Go to Solution.
08-04-2020 04:18 AM
Sure see, below. You can grab the same environment file from the code exchange link I posted above. One thing is noticed from your output is you are doing a POST request, where I am trying a GET request,
I tried the POST requested with the following JSON body (Get 10,000 alarms from the previous six hours using the query below) No issues seen here.
{ "query": { "condition": "AND", "rules": [ { "value": [ "6" ], "field": "entry_time", "type": "date", "operator": "last_n_hours" } ] }, "size": 10000 }
08-04-2020 01:05 AM
Hey there, i update this postman collection https://developer.cisco.com/codeexchange/github/repo/CiscoDevNet/Postman-for-AlwaysOn-Cisco-SD-WAN and added the parameter you have (alarms). On my postman client, I have the option of changing the data format. You can do this by clicking on, pretty and updating this to JSON. See below.
Hope this helps!
08-04-2020 03:58 AM
08-04-2020 04:18 AM
Sure see, below. You can grab the same environment file from the code exchange link I posted above. One thing is noticed from your output is you are doing a POST request, where I am trying a GET request,
I tried the POST requested with the following JSON body (Get 10,000 alarms from the previous six hours using the query below) No issues seen here.
{ "query": { "condition": "AND", "rules": [ { "value": [ "6" ], "field": "entry_time", "type": "date", "operator": "last_n_hours" } ] }, "size": 10000 }
08-04-2020 05:24 AM
Hi, Looks like some issue in my local environment only.
I tried in my colleague's system & it seems to be working fine as expected.
Just FYI, I am trying post call only.
Thanks for you support
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide