Skip to main content

API Reference

The SecureLink VSM API V2 is a RESTful API that provides programmatic access to all platform functionality.

Base URL​

https://<vsm-host>/api/v2

Authentication​

The API uses header-based authentication.

User Tokens​

For interactive sessions (like the Web UI), the API uses JWT tokens obtained via OIDC exchange.

Authorization: Bearer <jwt_token>

Service Tokens (Machine-to-Machine)​

For external scripts or integrations, use a long-lived Service Token.

  1. Generate a Service Token in the Admin > System Settings page.
  2. Include it in the X-API-Key header.
X-API-Key: <your_service_token>

Response Format​

All API responses follow a standard JSON envelope:

Success​

{
"data": {
// resource fields
},
"meta": {
"page": 1,
"pageSize": 20,
"total": 100
}
}

Error​

{
"error": "ERROR_CODE",
"message": "Human readable error message",
"details": {
// validation errors or additional context
}
}

Common Endpoints​

Edges​

List Edges​

GET /edges

Query Parameters:

  • page: Page number (default 1)
  • pageSize: Items per page (default 20)
  • search: Filter by name or serial

Get Edge Detail​

GET /edges/:id

Create Edge​

POST /edges

{
"name": "Branch-01",
"serialNumber": "VSR-123456",
"site": "New York"
}

Configuration​

Get Edge Config​

GET /edges/:id/config

Returns the current computed configuration for the edge (interfaces, routes, WireGuard peers).

Trigger Sync​

POST /edges/:id/sync

Forces a configuration recalculation and pushes the latest batch to the device via MQTT.

Rate Limiting​

The API enforces rate limits to prevent abuse.

  • Global limit: 1000 requests per minute per IP.
  • Burst: Up to 50 concurrent requests.

If you exceed the limit, you will receive a 429 Too Many Requests response.