Learning Isolation
Every registered learning isolation instance operation, with source-derived inputs, outputs, access policy, and errors.
This reference covers 7 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 |
|---|---|---|
GET | /v1/quarantine/items | Quarantine list items |
GET | /v1/quarantine/items/:id | Quarantine get item |
POST | /v1/quarantine/items/:id/approve | Quarantine approve item |
POST | /v1/quarantine/items/:id/reject | Quarantine reject item |
POST | /v1/quarantine/test-gate | Quarantine run test gate |
GET | /v1/quarantine/policies | Quarantine list policies |
GET | /v1/quarantine/stats | Quarantine stats |
GET /v1/quarantine/items
List quarantined items, optionally filtered by status. GET /v1/quarantine/items?status=pending&limit=100
| Availability | Source contract |
|---|---|
| Registration | always registered; requires database at runtime |
| Runtime service | No prefix-level service check; handler dependencies still apply. |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Query — QuarantineListParams
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
status | Option<String> | No; optional or defaulted | |
limit | Option<usize> | No; optional or defaulted |
struct QuarantineListParams {
status: Option<String>,
limit: Option<usize>,
}Response
Declared return: Result<impl IntoResponse, 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.
serde_json::json!({
"items": results,
"count": results.len()
})Errors and validation
Directly referenced error variants: InvalidRequest. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/quarantine.rs:225. Registration: akasha-daemon/src/quarantine.rs:445.
GET /v1/quarantine/items/:id
Get a single quarantined item with its test gate results. GET /v1/quarantine/items/:id
| Availability | Source contract |
|---|---|
| Registration | always registered; requires database at runtime |
| Runtime service | No prefix-level service check; handler dependencies still apply. |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Path — String
{
"type": "string"
}Response
Declared return: Result<impl IntoResponse, 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.
serde_json::json!({"item": item})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/quarantine.rs:256. Registration: akasha-daemon/src/quarantine.rs:446.
POST /v1/quarantine/items/:id/approve
Approve a quarantined item, setting its status to "approved". POST /v1/quarantine/items/:id/approve
| Availability | Source contract |
|---|---|
| Registration | always registered; requires database at runtime |
| Runtime service | No prefix-level service check; handler dependencies still apply. |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Path — String
{
"type": "string"
}Response
Declared return: Result<impl IntoResponse, 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.
serde_json::json!({
"id": item.id,
"status": "approved",
"updated_at": item.updated_at
})Errors and validation
Directly referenced error variants: InvalidRequest. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/quarantine.rs:272. Registration: akasha-daemon/src/quarantine.rs:447.
POST /v1/quarantine/items/:id/reject
Reject a quarantined item, setting its status to "rejected". POST /v1/quarantine/items/:id/reject
| Availability | Source contract |
|---|---|
| Registration | always registered; requires database at runtime |
| Runtime service | No prefix-level service check; handler dependencies still apply. |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Path — String
{
"type": "string"
}Response
Declared return: Result<impl IntoResponse, 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.
serde_json::json!({
"id": item.id,
"status": "rejected",
"updated_at": item.updated_at
})Errors and validation
Directly referenced error variants: InvalidRequest. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/quarantine.rs:304. Registration: akasha-daemon/src/quarantine.rs:451.
POST /v1/quarantine/test-gate
Run a test gate on a quarantined item and record the result. POST /v1/quarantine/test-gate
| Availability | Source contract |
|---|---|
| Registration | always registered; requires database at runtime |
| Runtime service | No prefix-level service check; handler dependencies still apply. |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — TestGateRequest
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
item_id | String | Yes | |
gate | String | Yes | |
threshold | Option<f64> | No; optional or defaulted | Optional threshold override (defaults per gate type) |
struct TestGateRequest {
item_id: String,
gate: String, // "confidence-score" or "anomaly-detection"
/// Optional threshold override (defaults per gate type)
threshold: Option<f64>,
}Response
Declared return: Result<impl IntoResponse, 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.
serde_json::json!({
"item_id": req.item_id,
"gate": req.gate,
"passed": passed,
"result": result
})Errors and validation
Directly referenced error variants: InvalidRequest. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/quarantine.rs:336. Registration: akasha-daemon/src/quarantine.rs:455.
GET /v1/quarantine/policies
Return quarantine policies. GET /v1/quarantine/policies
| Availability | Source contract |
|---|---|
| Registration | always registered; requires database at runtime |
| Runtime service | No prefix-level service check; handler dependencies still apply. |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
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<impl IntoResponse, 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.
serde_json::json!({
"policies": policies,
"count": policies.len()
})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/quarantine.rs:382. Registration: akasha-daemon/src/quarantine.rs:456.
GET /v1/quarantine/stats
Count quarantined items by status. GET /v1/quarantine/stats
| Availability | Source contract |
|---|---|
| Registration | always registered; requires database at runtime |
| Runtime service | No prefix-level service check; handler dependencies still apply. |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
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.
JSON field accesses in handler: status. Nested lookups are included; this list alone does not establish requiredness.
Response
Declared return: Result<impl IntoResponse, 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.
serde_json::json!(resp)Errors and validation
Directly referenced error variants: InvalidRequest. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/quarantine.rs:396. Registration: akasha-daemon/src/quarantine.rs:457.