LibreNMS API: port_id Missing in Device-Specific Endpoint

When using the LibreNMS API to retrieve information about specific device ports, there seems to be an inconsistency in the returned data. The device-specific API does not return the port_id attribute for ports, while the general ports API does.

Issue Details:

  1. Device Specific API:

    • Endpoint: /api/v0/devices/DEVICE_ID/ports
    • Sample Output:
      {
          "status": "ok",
          "ports": [
              {
                  "ifName": "InLoopBack0"
              },
              ...
          ]
      }
      
    • The above output does not include the port_id attribute for the ports.
  2. General Ports API:

    • Endpoint: /api/v0/ports
    • Sample Output:
      {
          "status": "ok",
          "ports": [
              {
                  "port_id": 1,
                  "ifName": "InLoopBack0"
              },
              ...
          ]
      }
      
    • This output includes the port_id attribute, which is missing from the device-specific API.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.