Base path: /api/v1
OpenAPI spec served at /api/v1/docs (Swagger UI) when enabled.
Authorization: Bearer <access_jwt>
X-Organization-ID: <uuid> # when not implicit in routeEd25519 signed requests per agent-protocol.md. No Bearer-only auth.
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /auth/register |
none | Create user + org |
| POST | /auth/login |
none | Returns access + refresh tokens |
| POST | /auth/refresh |
refresh body | New access token |
| POST | /auth/logout |
Bearer | Revoke refresh session |
{
"email": "ops@example.com",
"password": "…",
"organization_name": "Acme Corp"
}Response 201:
{
"user": {"id": "uuid", "email": "…"},
"organization": {"id": "uuid", "name": "…", "slug": "acme-corp"},
"tokens": {
"access_token": "…",
"refresh_token": "…",
"expires_in": 900
}
}{"email": "…", "password": "…"}| Method | Path | Role | Description |
|---|---|---|---|
| GET | /organizations/current |
viewer+ | Current org details |
| PATCH | /organizations/current |
admin+ | Update org settings |
| Method | Path | Role | Description |
|---|---|---|---|
| GET | /servers |
viewer+ | List servers (paginated) |
| POST | /servers |
operator+ | Create server |
| GET | /servers/{id} |
viewer+ | Get server |
| PATCH | /servers/{id} |
operator+ | Update server |
| DELETE | /servers/{id} |
admin+ | Soft delete |
| POST | /servers/{id}/enrollment-token |
operator+ | Generate enrollment token |
Response:
{
"token": "aether_enr_…",
"expires_at": "2026-07-23T14:00:00Z"
}Token shown once; only hash stored.
| Method | Path | Role | Description |
|---|---|---|---|
| GET | /agents |
viewer+ | List agents |
| GET | /agents/{id} |
viewer+ | Agent details + status |
| POST | /agents/{id}/revoke |
admin+ | Revoke credential |
| POST | /agents/{id}/config |
operator+ | Push new config version |
| Method | Path | Role | Description |
|---|---|---|---|
| GET | /monitors |
viewer+ | List monitors |
| POST | /monitors |
operator+ | Create monitor |
| GET | /monitors/{id} |
viewer+ | Get monitor |
| PATCH | /monitors/{id} |
operator+ | Update monitor |
| DELETE | /monitors/{id} |
admin+ | Soft delete |
| GET | /monitors/{id}/checks |
viewer+ | Recent check results |
| Method | Path | Role | Description |
|---|---|---|---|
| GET | /incidents |
viewer+ | List incidents |
| GET | /incidents/{id} |
viewer+ | Incident + events |
| POST | /incidents/{id}/acknowledge |
operator+ | Ack incident |
| Method | Path | Role | Description |
|---|---|---|---|
| GET | /servers/{id}/metrics |
viewer+ | Query system metrics |
| GET | /servers/{id}/uptime |
viewer+ | Uptime percentages |
Query params: from, to, resolution (raw, 1m).
All require Ed25519 signing.
| Method | Path | Description |
|---|---|---|
| POST | /agent/enroll |
Initial enrollment (token auth) |
| GET | /agent/config |
Fetch signed remote config |
| POST | /agent/config/ack |
Acknowledge config apply |
| POST | /agent/heartbeat |
Periodic heartbeat |
| POST | /agent/metrics |
Batch metric ingestion |
| POST | /agent/inventory |
Inventory snapshot |
List endpoints support:
?cursor=<opaque>&limit=50
Response:
{
"data": [],
"pagination": {
"next_cursor": "…",
"has_more": true
}
}Default limit: 50. Max: 200.
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Human readable message",
"details": [{"field": "email", "message": "invalid format"}],
"request_id": "uuid"
}
}| Resource | viewer | operator | admin | owner |
|---|---|---|---|---|
| Read servers/monitors | ✓ | ✓ | ✓ | ✓ |
| Create/update servers | ✓ | ✓ | ✓ | |
| Delete servers | ✓ | ✓ | ||
| Manage users | ✓ | ✓ | ||
| Delete organization | ✓ | |||
| Revoke agents | ✓ | ✓ | ||
| Push agent config | ✓ | ✓ | ✓ |
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /health |
none | Liveness |
| GET | /ready |
none | DB connectivity |
| Scope | Limit |
|---|---|
| Auth endpoints | 10/min per IP |
| Agent endpoints | 120/min per agent |
| User API | 300/min per user |
Returns 429 with Retry-After header.