API Reference
The Backbone Network Agent Gateway API provides programmatic access to network monitoring, BGP route management, and AI-assisted network operations. All API endpoints require authentication via Bearer token unless otherwise noted.
Base URL
https://gw.backbone-ops.internal/api/v1
Authentication
All API requests must include a valid Bearer token in the Authorization header. Tokens can be obtained through the /auth/login endpoint or generated from the admin panel.
# Example request with authentication
curl -H "Authorization: Bearer <your-token>" \
-H "Content-Type: application/json" \
https://gw.backbone-ops.internal/api/v1/query/bgp-routes
Query Endpoints
GET
/query/bgp-routes
Query BGP routing table entries
AUTH
Parameters
| Name | Type | Description |
|---|---|---|
| prefix | string | Filter by IP prefix (e.g. 223.5.5.0/24) |
| origin_as | integer | Filter by origin ASN |
| limit | integer | Max results to return (default: 100, max: 1000) |
| peer | string | Filter by BGP peer address |
Response
{
"status": "ok",
"count": 892341,
"routes": [
{
"prefix": "223.5.5.0/24",
"next_hop": "10.0.0.1",
"origin_as": 4837,
"as_path": [4837, 4808],
"local_pref": 100,
"med": 0
}
]
}
GET
/query/topology
Get current network topology map
AUTH
Response
{
"nodes": 14,
"edges": 23,
"topology": { /* graph data */ }
}
Agent Endpoints
POST
/agent/chat
Send a query to the network operations LLM agent
AUTH
Request Body
{
"message": "Show me the BGP routes for prefix 223.5.5.0/24",
"context": "bgp-analysis",
"stream": false
}
Response
{
"id": "msg_a7f3b2d9",
"response": "Found 3 active routes for 223.5.5.0/24...",
"sources": ["rib_table", "bgp_session_log"],
"latency_ms": 342
}
WS
/agent/chat-stream
WebSocket endpoint for streaming agent responses
AUTH
Connection
# WebSocket connection with auth token
wscat -c "wss://gw.backbone-ops.internal/api/v1/agent/chat-stream" \
-H "Authorization: Bearer <token>"
Rate Limits
API requests are rate limited per token. Default limits are 100 requests/minute for query endpoints and 20 requests/minute for agent endpoints. Rate limit headers (X-RateLimit-Remaining) are included in all responses.
Full API access requires authentication. Sign in or request access to get started.