BBline-X

Management REST API

The management server exposes a REST API over HTTPS (default :8080) for programmatic control of your mesh. The dashboard is built entirely on this API.

Authentication

All endpoints require a JWT bearer token. An agent receives its JWT when it enrolls with a setup key; administrators obtain one by signing in to the dashboard.

curl https://your-host:8080/api/peers \
  -H "Authorization: Bearer <jwt>"

The JWT encodes the peer ID, WireGuard public key, and account ID. Requests without a valid token receive 401 Unauthorized.

Peers

MethodPathDescription
GET/api/peersList all peers in the account.
PUT/api/peers/:keyUpdate a peer's tags. Body: {"tags":[...]}.
DELETE/api/peers/:keyRemove a peer. Requires an Admin session (a device-token session cannot delete).

:keyis the peer's WireGuard public key. Because keys are base64 and may contain /, the dashboard and router handle URL-encoding of the key.

# Assign tags to a peer
curl -X PUT https://your-host:8080/api/peers/<pubkey> \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  -d '{"tags":["tag:web","tag:prod"]}'

Tags

MethodPathDescription
GET/api/tagsList all tags currently in use across peers.

Setup keys

MethodPathDescription
GET/api/setup-keysList setup keys.
POST/api/setup-keysCreate a new setup key.
DELETE/api/setup-keys/:idRevoke a setup key.
curl -X POST https://your-host:8080/api/setup-keys \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  -d '{"name":"ci-runners","expires_in_days":30}'

Access Control Lists

MethodPathDescription
GET/api/aclsList access policy rules.
POST/api/aclsCreate a rule.
PUT/api/acls/:idUpdate a rule.
DELETE/api/acls/:idDelete a rule.

Account

MethodPathDescription
GET/api/accountRetrieve account details (ID, mesh CIDR, DNS suffix).