跳转到内容

API Conventions

Management API and Agent API both use JSON.

Response Shape

Success and failure responses should include a clear message:

json
{
  "success": true,
  "message": "",
  "data": {}
}

Paths

TypeConvention
Management APIAuthenticated by management Session
Agent APIFixed under /api/agent/*
Read-only endpointsGET
Mutating endpointsPOST

Authentication

Management endpoints reuse the existing login, role, and Session system.

Agent requests use the node-specific agent_token. First-time registration can use a global discovery_token. The header is:

http
X-Agent-Token: <token>

Do not log full tokens.

Swagger

After logging in:

text
/swagger/index.html

Released under the Apache License 2.0.