trishul-snmp-suite

API Reference

This is the practical API reference for the current 2.x runtime.

For complete request and response schemas, use the OpenAPI document served by the running app at /docs.

API Surface

All operator-facing routes are under /api/.... There is one unified API — no separate v2 surface for simulator, catalog, runtime, or history.

Public Endpoints

WebSocket

GET /api/ws?token=<session-token> — WebSocket handshake

The browser sends ping keepalives; the server replies with pong.

Server push message types:

Session And Settings

Login request:

{"username": "admin", "password": "admin123"}

All authenticated endpoints require X-Auth-Token: <token> header.

Stats

Simulator

Walk

{
  "target": "127.0.0.1",
  "port": 1061,
  "community": "public",
  "oid": "1.3.6.1.2.1.1",
  "parse": true,
  "use_mibs": true
}

Optional json_format: "current" (default) or "grouped".

Traps

Send request:

{
  "target": "127.0.0.1",
  "port": 1162,
  "community": "public",
  "oid": "IF-MIB::linkDown",
  "varbinds": [
    {"oid": "1.3.6.1.2.1.2.2.1.1.1", "type": "Integer", "value": 1}
  ]
}

MIBs

GET /api/mibs/status returns both the deduplicated effective runtime view and the per-source inventory view:

Source-group export requests keep source-group membership. Global or all-module exports stay deduplicated to the active runtime bundle.

Catalog export request body:

{
  "format": "json",
  "modules": ["IF-MIB"],
  "notifications": ["IF-MIB::linkDown"],
  "source_groups": ["juniper"],
  "export_type": "notifications"
}

Supported export_type values:

Export responses always include summary, filters, and metadata. JSON exports may also include:

For notifications, JSON stays notification-centric and nests the resolved member details under each notification entry. CSV flattens those member details into one row per member while retaining the parent notification identity.

Raw source download request body:

{
  "paths": ["juniper/JUNIPER-MAG-MIB.mib", "juniper/JUNIPER-IF-MIB.mib"]
}

POST /api/mibs/download returns the original source file for a single path, or a zip archive when multiple managed source files are requested.

Upload request (multipart):

MIB Browser