cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2045
Views
0
Helpful
1
Replies

Wrong start/end time in response using client health intent API with DNA Center

wwvan
Level 1
Level 1

I would like to know the Health of my Clients, and so I do send to the sandbox DNAC

 

https://{{dnac}}:{{port}}/dna/intent/api/v1/client-health?startTime=1565449472000&endTime=1565622272000

 

The reply gives me the ecutionId : "7f858cfa-a93e-405e-b83c-66bb34a5308e",

With the get https://sandboxdnac.cisco.com/api/dnacaap/v1/dnacaap/management/execution-status/7f858cfa-a93e-405e-b83c-66bb34a5308e

I get following Reply:

{
"bapiKey" : "149a-a93b-4ddb-80dd",
"bapiName" : "Get Overall Client Health",
"bapiExecutionId" : "7f858cfa-a93e-405e-b83c-66bb34a5308e",
"startTime" : "Mon Aug 12 15:13:54 UTC 2019",
"startTimeEpoch" : 1565622834974,
"endTime" : "Mon Aug 12 15:14:01 UTC 2019",
"endTimeEpoch" : 1565622841670,
"timeDuration" : 6696,
"status" : "FAILURE",
"bapiError" : "{\n \"bapiErrorResponse\" : {\n \"bapiKey\" : \"149a-a93b-4ddb-80dd\",\n \"bapiName\" : \"Get Overall Client Health\",\n \"bapiErrorCode\" : \"\",\n \"bapiErrorMessage\" : \"\"\n },\n \"componentErrorResponse\" : [ {\n \"compId\" : \"uuidf8ee428c\",\n \"compName\" : \"Combine Output\",\n \"compErrorCode\" : \"500\",\n \"compErrorMessage\" : \"7f858cfa-a93e-405e-b83c-66bb34a5308e | 0521cce9-f925-4905-9675-dd1d527b3cba | 149a-a93b-4ddb-80dd : JavascriptTransformProcessor Failed with error: SyntaxError: Invalid JSON: <json>:1:0 Expected json literal but found H\\nHttp Error Code:500\\n^ in <eval> at line number 3063\",\n \"componentType\" : \"JAVASCRIPT_TRANSFORM\"\n } ]\n}"
}

 

Questions:

1. Why has the response other start/end time as in the request??

2. Why I receive an error??

 

Thanks in advance

Wim

1 Reply 1

yawming
Cisco Employee
Cisco Employee

I will start investigating from the second question. Looks like there is a "SyntaxError: Invalid JSON:", valid the JSON format first.

Regarding the epoch time is off. If I remember correctly, DNAC takes a snapshot every X min and save to DB. When the API make a query, it's not taking the "real time" snapshot as you requested, but taking from the DB with the time close to your requested time.  

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: