Administration
Every registered administration instance operation, with source-derived inputs, outputs, access policy, and errors.
This reference covers 3 HTTP operations registered by the Akasha daemon. Call these paths on your instance base URL. See authentication, errors, and coverage before integrating.
| Method | Path | Operation |
|---|---|---|
POST | /admin/services/enable | Admin enable service |
POST | /admin/services/disable | Admin disable service |
GET | /admin/services/status | Admin service status |
POST /admin/services/enable
Admin API: Enable service(s) at runtime (hot-loading)
| Availability | Source contract |
|---|---|
| Registration | always registered |
| Runtime service | No prefix-level service check; handler dependencies still apply. |
| Handler dependencies | See handler source and return expressions. |
Access: Admin middleware: source IP allowlist and x-akasha-admin-token; see authentication. Instance owner credentials alone do not grant daemon-global administration.
Request
Json — EnableServiceRequest
enum EnableServiceRequest {
/// Enable single service: {"service": "analytics"}
Single { service: String },
/// Enable multiple services: {"services": ["analytics", "graph"]}
Multiple { services: Vec<String> },
}Response
Declared return: Result<Json<EnableServiceResponse>, DaemonError>
The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.
EnableServiceResponse {
success: failed.is_empty(),
updates,
failed_services: failed,
}Errors and validation
Directly referenced error variants: Internal. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:9983. Registration: akasha-daemon/src/main.rs:4333.
POST /admin/services/disable
Admin API: Disable service(s) at runtime
| Availability | Source contract |
|---|---|
| Registration | always registered |
| Runtime service | No prefix-level service check; handler dependencies still apply. |
| Handler dependencies | See handler source and return expressions. |
Access: Admin middleware: source IP allowlist and x-akasha-admin-token; see authentication. Instance owner credentials alone do not grant daemon-global administration.
Request
Json — DisableServiceRequest
enum DisableServiceRequest {
Single { service: String },
Multiple { services: Vec<String> },
}Response
Declared return: Result<Json<DisableServiceResponse>, DaemonError>
The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.
DisableServiceResponse {
success: failed.is_empty(),
updates,
failed_services: failed,
}Errors and validation
Directly referenced error variants: Internal. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:10128. Registration: akasha-daemon/src/main.rs:4334.
GET /admin/services/status
Admin API: Get current service status
| Availability | Source contract |
|---|---|
| Registration | always registered |
| Runtime service | No prefix-level service check; handler dependencies still apply. |
| Handler dependencies | See handler source and return expressions. |
Access: Admin middleware: source IP allowlist and x-akasha-admin-token; see authentication. Instance owner credentials alone do not grant daemon-global administration.
Request
No typed JSON, query, or path extractor is declared in the handler signature. Headers or request objects may still be consumed; the signature below is authoritative.
Response
Declared return: Result<Json<ServiceStatusResponse>, DaemonError>
The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.
ServiceStatusResponse { services }Errors and validation
Directly referenced error variants: none in the handler body. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:10092. Registration: akasha-daemon/src/main.rs:4335.