[Rest API] invalid Device interfaces in the responses of "getInterfaces" method

[Rest API] invalid Device interfaces in the responses of "getInterfaces" method

Hi,

There's a starnge behavior when I try to fetch the list of interfaces of a Device in OPManager via getInterfaces method of REST API. (The OPManager instance has a Central-probe structure)

I get the list of interfaces of a device with this API endpoint:
  1. http://IP:8060/api/json/device/getInterfaces?apiKey=<API-KEY>&name=<DEVICE-NAME>.<PROBE-ID>
it gives me a list of interfaces:
  1. {
  2.  "interfaceCount": "58",
  3.   "downCount": "43",
  4.   "interfaces": [
  5.     {...},    # The interfaces are distorted intentionally
  6.      ...
  7.    ]
  8. }
But when I go to the Device page in OPManager console (Interfaces Tab), The number of interfaces is listed (22/29) - Instead of 43/58 which I got from API response.

As regards the invalid interfaces are given inside API response, This is the pattern:

For most interfaces, there's an invalid duplicated interface with the same trimmedDispName and displayName values as its valid reference interface, but with different moId and disordered interface moid, probe id in the name field.

Here's an example:

Valid interface:
  1.     {
  2.       "trimmedDispName": "FastEthernet0/12-Fa0/12",
  3.       "inTraffic": "NA",
  4.       "status": "2",
  5.       "imagePath": "/apiclient/ember/images/intfTypes/ifType6.gif",
  6.       "ifOperStatus": "2",
  7.       "statusStr": "Trouble",
  8.       "statusString": "Trouble",
  9.       "ifIndex": "10012",
  10.       "nfEnabled": "false",
  11.       "type": "Interface",
  12.       "moid": "<if moid>",
  13.       "bgColor": "ff8000",
  14.       "ifAdminStatus": "1",
  15.       "RouterPortType": "",
  16.       "errors": "NA",
  17.       "ifType": "Ethernet",
  18.       "outSpeed": "10 M",
  19.       "inSpeed": "10 M",
  20.       "name": "IF-xxxxx.yyy.com.<probe id>-<if moid>",
  21.       "displayName": "FastEthernet0/12-Fa0/12",
  22.       "outTraffic": "NA",
  23.       "statusNum": "2"
  24.     }
Invalid Interface:
  1.     {
  2.       "trimmedDispName": "FastEthernet0/12-Fa0/12",
  3.       "inTraffic": "NA",
  4.       "status": "2",
  5.       "imagePath": "/apiclient/ember/images/intfTypes/ifType6.gif",
  6.       "ifOperStatus": "2",
  7.       "statusStr": "Trouble",
  8.       "statusString": "Trouble",
  9.       "ifIndex": "10012",
  10.       "nfEnabled": "false",
  11.       "type": "Interface",
  12.       "moid": "<if moid>",
  13.       "bgColor": "ff8000",
  14.       "ifAdminStatus": "1",
  15.       "RouterPortType": "",
  16.       "errors": "NA",
  17.       "ifType": "Ethernet",
  18.       "outSpeed": "10 M",
  19.       "inSpeed": "10 M",
  20.       "name": "IF-xxxx.yyy.com-<if moid>.<probe id>",
  21.       "displayName": "FastEthernet0/12-Fa0/12",
  22.       "outTraffic": "NA",
  23.       "statusNum": "2"
  24.     }

The invalid interface (with the name schema like: IF-xxxx.yyy.com-<if moid>.<probe id>) returns error when trying to get its details via API endpoint:

http://IP:8060/api/json/device/getInterfaceSummary?apiKey=<API-KEY>&interfaceName=IF-xxxx.yyy.com-<if moid>.<probe id>

error response:
  1. {"error":{"message":"The value specified for parameter[interfaceName] is wrong.","code":5009}}
How to get rid of these apparently fake interfaces in API response and Why do they exist at all?

Thanks

                New to ADManager Plus?

                  New to ADSelfService Plus?