Traffic (Read)

GET /api/v1/traffic/links?area_id={areaID}
GET /api/v1/traffic/links?pi_id={piID}
GET /api/v1/traffic/links?rd_id={rdID}
GET /api/v1/traffic/links?network_id={networkID}

Get the max utilization percentage for every link in the given scope that has SNMP traffic data. Used by the "By Utilization" color mode.

Query parameters (exactly one required):

Response: 200 OK

[
  {
    "link_id": "uuid",
    "utilization_pct": 42.7,
    "source_name": "core-1",
    "source_router_id": "198.51.100.150",
    "target_name": "dist-3",
    "target_router_id": "203.0.113.10"
  }
]

Notes:

Error responses:

Get Interface Traffic History

GET /api/v1/traffic/interface/{interfaceID}?from={from}&to={to}&limit={limit}

Get historical traffic statistics for a specific interface.

Path parameters:

Query parameters:

Response: 200 OK

[
  {
    "id": "uuid",
    "interface_id": "uuid",
    "timestamp": "2026-02-18T14:30:00Z",
    "in_octets": 1234567890,
    "out_octets": 987654321,
    "in_rate_bps": 8500000,
    "out_rate_bps": 6200000,
    "in_pps": 12000,
    "out_pps": 9500,
    "utilization_in": 0.085,
    "utilization_out": 0.062,
    "if_speed": 1000000000,
    "if_oper_status": "up",
    "in_errors": 0,
    "out_errors": 0,
    "in_discards": 0,
    "out_discards": 0
  }
]

Notes:

Error responses:

Get Interface Utilization History

GET /api/v1/traffic/interface/{interfaceID}/history?from={from}&to={to}

Get hourly-bucketed utilization history for a specific interface. Data comes from the utilization_history table (populated by the SNMP poller). Used by the UtilizationChart component in LinkDetailDrawer and NodeDetailDrawer.

Path parameters:

Query parameters:

Response: 200 OK

[
  {
    "bucket_time": "2026-03-04T14:00:00Z",
    "max_util": 67.3,
    "avg_util": 42.1,
    "samples": 12
  }
]

Notes:

Error responses:

GET /api/v1/traffic/link/{linkID}

Get the latest traffic statistics for both endpoints of a link.

Path parameters:

Response: 200 OK

{
  "source_stats": {
    "id": "uuid",
    "interface_id": "uuid",
    "timestamp": "2026-02-18T14:30:00Z",
    "in_octets": 1234567890,
    "out_octets": 987654321,
    "in_rate_bps": 8500000,
    "out_rate_bps": 6200000,
    "in_pps": 12000,
    "out_pps": 9500,
    "utilization_in": 0.085,
    "utilization_out": 0.062,
    "if_speed": 1000000000,
    "if_oper_status": "up",
    "in_errors": 0,
    "out_errors": 0,
    "in_discards": 0,
    "out_discards": 0
  },
  "target_stats": null
}

Notes:

Error responses:

Get Device Traffic

GET /api/v1/traffic/device/{deviceID}

Get the latest traffic statistics for all interfaces on a device.

Path parameters:

Response: 200 OK

[
  {
    "id": "uuid",
    "interface_id": "uuid",
    "timestamp": "2026-02-18T14:30:00Z",
    "in_octets": 1234567890,
    "out_octets": 987654321,
    "in_rate_bps": 8500000,
    "out_rate_bps": 6200000,
    "in_pps": 12000,
    "out_pps": 9500,
    "utilization_in": 0.085,
    "utilization_out": 0.062,
    "if_speed": 1000000000,
    "if_oper_status": "up",
    "in_errors": 0,
    "out_errors": 0,
    "in_discards": 0,
    "out_discards": 0
  }
]

Notes:

Error responses:

Boost Traffic Polling

POST /api/v1/traffic/boost

Request the SNMP poller to temporarily accelerate polling for the specified devices. Used by the Link Detail Drawer to get near-real-time traffic stats while the user is viewing them.

Auth: Any authenticated user.

Request body:

{
  "device_ids": ["uuid1", "uuid2"],
  "action": "boost"
}
Field Type Required Description
device_ids string[] Yes Device UUIDs to boost (max 10)
action string Yes "boost" to start fast polling, "unboost" to cancel

Response: 204 No Content

Notes: