03-28-2017 09:45 PM
Hi all,
Running Prime 3.1.5, device pack 8
I'm using the interface errors (statisticsService/interface/errors) API endpoint and I'm getting a response that looks quite different to the example on the doco.
Sample output from the doco:
...
},
"statisticsName" : "DEVICE_TOPN_CPU_UTILIZATION"
}
},
"statisticEntries" : {
"statisticEntry" : {
"attributeName" : "String value",
"displayName" : "String value",
"entryValue" : "String value"
}
},
"statisticsName" : "DEVICE_TOPN_CPU_UTILIZATION"
}
},
"statisticEntries" : {
"statisticEntry" : {
"attributeName" : "String value",
"displayName" : "String value",
"entryValue" : "String value"
}
},
"statisticsName" : "DEVICE_TOPN_CPU_UTILIZATION"
}
...
Not sure why there is CPU utilisation in the sample response for an API call to check interface errors?
Output from my API call
...
"childStatistics": "",
"statisticEntries": {
"statisticEntry": [
{
"attributeName": "labelValue1",
"displayName": "Label Value 1",
"entryValue": "InterfacesInErrors:0"
},
{
"attributeName": "labelValue2",
"displayName": "Label Value 2",
"entryValue": "InterfacesOutErrors:0"
},
{
"attributeName": "timeStamp",
"displayName": "Time Stamp",
"entryValue": 1490760521
...
Also, this is probably obvious and a silly question - but does anyone know how to read the timestamp value? I've searched this forum and elsewhere, but can't find much mention of it.
Solved! Go to Solution.
03-29-2017 08:51 AM
DEVICE_TOPN_CPU_UTILIZATION shows up in the samples because they're auto-generated; the statisticsName parameter is an enum, so the sample generator just picks an arbitrary value from the enum when generating the sample. The samples in our API docs are just for showing an example of the structure, rather than represent actual output.
Time timestamp for this resource is in Unix time (seconds from the Unix epoch). Note that for some of our API resources, timestamps are reported as milliseconds from the Unix epoch.
03-29-2017 08:51 AM
DEVICE_TOPN_CPU_UTILIZATION shows up in the samples because they're auto-generated; the statisticsName parameter is an enum, so the sample generator just picks an arbitrary value from the enum when generating the sample. The samples in our API docs are just for showing an example of the structure, rather than represent actual output.
Time timestamp for this resource is in Unix time (seconds from the Unix epoch). Note that for some of our API resources, timestamps are reported as milliseconds from the Unix epoch.
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