API referenceInstance API
GUIDE & REFERENCE

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.

MethodPathOperation
GET/v1/quarantine/itemsQuarantine list items
GET/v1/quarantine/items/:idQuarantine get item
POST/v1/quarantine/items/:id/approveQuarantine approve item
POST/v1/quarantine/items/:id/rejectQuarantine reject item
POST/v1/quarantine/test-gateQuarantine run test gate
GET/v1/quarantine/policiesQuarantine list policies
GET/v1/quarantine/statsQuarantine stats

GET /v1/quarantine/items

List quarantined items, optionally filtered by status. GET /v1/quarantine/items?status=pending&limit=100

AvailabilitySource contract
Registrationalways registered; requires database at runtime
Runtime serviceNo prefix-level service check; handler dependencies still apply.
Handler dependenciesSee handler source and return expressions.

Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.

Request

QueryQuarantineListParams

FieldRust typeRequired on inputNotes
statusOption<String>No; optional or defaulted
limitOption<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

AvailabilitySource contract
Registrationalways registered; requires database at runtime
Runtime serviceNo prefix-level service check; handler dependencies still apply.
Handler dependenciesSee handler source and return expressions.

Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.

Request

PathString

{
  "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

AvailabilitySource contract
Registrationalways registered; requires database at runtime
Runtime serviceNo prefix-level service check; handler dependencies still apply.
Handler dependenciesSee handler source and return expressions.

Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.

Request

PathString

{
  "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

AvailabilitySource contract
Registrationalways registered; requires database at runtime
Runtime serviceNo prefix-level service check; handler dependencies still apply.
Handler dependenciesSee handler source and return expressions.

Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.

Request

PathString

{
  "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

AvailabilitySource contract
Registrationalways registered; requires database at runtime
Runtime serviceNo prefix-level service check; handler dependencies still apply.
Handler dependenciesSee handler source and return expressions.

Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.

Request

JsonTestGateRequest

FieldRust typeRequired on inputNotes
item_idStringYes
gateStringYes
thresholdOption<f64>No; optional or defaultedOptional 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

AvailabilitySource contract
Registrationalways registered; requires database at runtime
Runtime serviceNo prefix-level service check; handler dependencies still apply.
Handler dependenciesSee 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

AvailabilitySource contract
Registrationalways registered; requires database at runtime
Runtime serviceNo prefix-level service check; handler dependencies still apply.
Handler dependenciesSee 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.

On this page