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

Interface errors API endpoint & timestamps

Ben Clifton
Level 1
Level 1

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

https://xxxx/webacs/api/v1/op/statisticsService/interface/errors?range=1&ipAddress=x.x.x.x&ifName=xxxx

        ...

"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.

1 Accepted Solution

Accepted Solutions

Spencer Zier
Cisco Employee
Cisco Employee

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.

View solution in original post

1 Reply 1

Spencer Zier
Cisco Employee
Cisco Employee

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.