01-31-2023 01:54 AM
I need to gather info produced via an NSO Action using JSON formatting.
CLI commands response seems to me not a correct JSON text, as you can see below (a list of value should be reported as array).
cisco@ncs> request Nsdwan CheckSite Tir hcw2 | display json
{
"esito": "success",
"StatoSuController": {
. . .
"af1": {
"nbarCat": "browsing", "business-and-productivity-tools", "backup-and-storage", "epayement",
. . .
I actually need to gather the response via an HTTP POST request using the body below reported
{"jsonrpc":"2.0","id":1,"method":"run_action","params":{"path":"/timsdn-nsdwan:Nsdwan/timsdn-nsdwan:CheckSite","params":{"Tir":"hcw2","Site":"A46bf8024-7934-11ec-b2ce-005056b81955","noSync":""},"th":1}}
How can I request to get the response as JSON?
01-31-2023 04:31 AM
You should get the results to a JSON-RPC in JSON. What do you get when you try that?
01-31-2023 05:30 AM
Is the "nbarCat" a leaf-list?
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