Tokens
All paths are relative to the base path /api/v1 (same origin as the UI). Authentication, roles, pagination and the error format are described in the overview; the types are on the page Data types.
| Operation | Request | Permission |
|---|---|---|
| List API tokens (without secrets) | GET /tokens | tokens:manage (admin) |
| Create an API token (the secret is returned only once) | POST /tokens | tokens:manage (admin) |
| Revoke an API token | DELETE /tokens/{id} | tokens:manage (admin) |
| List agent enrollment tokens (without secrets) | GET /enrollment-tokens | enrollment:manage (admin) |
| Create an enrollment token for supervisors/myriarch-updaters (secret returned once) | POST /enrollment-tokens | enrollment:manage (admin) |
| Revoke an enrollment token (connected agents are not disconnected; reconnects fail) | DELETE /enrollment-tokens/{id} | enrollment:manage (admin) |
List API tokens (without secrets)
GET /api/v1/tokens
Operation listApiTokens. Permission tokens:manage (lowest role: admin).
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | API tokens | application/json | APITokenList |
| 401 | Not authenticated (code unauthorized) | application/problem+json | Problem |
Create an API token (the secret is returned only once)
POST /api/v1/tokens
Operation createApiToken. Permission tokens:manage (lowest role: admin).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-CSRF-Token | header | string | no | Required for cookie-authenticated mutating requests (value of cookie myriarch_csrf). |
Request body
Content type application/json, required. Type: CreateAPITokenRequest.
{
"name": "string",
"role": "viewer",
"expiresAt": "2026-01-01T00:00:00Z"
}
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
| 201 | Created | application/json | CreatedAPIToken |
| 422 | Validation failed (code validation_failed, details in issues) | application/problem+json | Problem |
Revoke an API token
DELETE /api/v1/tokens/{id}
Operation revokeApiToken. Permission tokens:manage (lowest role: admin).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | Format uuid. |
X-CSRF-Token | header | string | no | Required for cookie-authenticated mutating requests (value of cookie myriarch_csrf). |
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
| 204 | Revoked | - | - |
| 404 | Not found (code not_found) | application/problem+json | Problem |
List agent enrollment tokens (without secrets)
GET /api/v1/enrollment-tokens
Operation listEnrollmentTokens. Permission enrollment:manage (lowest role: admin).
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | Enrollment tokens | application/json | EnrollmentTokenList |
| 401 | Not authenticated (code unauthorized) | application/problem+json | Problem |
Create an enrollment token for supervisors/myriarch-updaters (secret returned once)
POST /api/v1/enrollment-tokens
Operation createEnrollmentToken. Permission enrollment:manage (lowest role: admin).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
X-CSRF-Token | header | string | no | Required for cookie-authenticated mutating requests (value of cookie myriarch_csrf). |
Request body
Content type application/json, required. Type: CreateEnrollmentTokenRequest.
{
"name": "string",
"labels": {
"key": "string"
},
"expiresAt": "2026-01-01T00:00:00Z"
}
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
| 201 | Created | application/json | CreatedEnrollmentToken |
| 422 | Validation failed (code validation_failed, details in issues) | application/problem+json | Problem |
Revoke an enrollment token (connected agents are not disconnected; reconnects fail)
DELETE /api/v1/enrollment-tokens/{id}
Operation revokeEnrollmentToken. Permission enrollment:manage (lowest role: admin).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | Format uuid. |
X-CSRF-Token | header | string | no | Required for cookie-authenticated mutating requests (value of cookie myriarch_csrf). |
Responses
| Status | Description | Content type | Type |
|---|---|---|---|
| 204 | Revoked | - | - |
| 404 | Not found (code not_found) | application/problem+json | Problem |