API referenceInstance API
GUIDE & REFERENCE

Forgetting

Every registered forgetting 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/forgetting/requestsForgetting list requests
POST/v1/forgetting/requestsForgetting create request
POST/v1/forgetting/requests/:id/approveForgetting approve request
GET/v1/forgetting/proof/:idForgetting get proof
GET/v1/forgetting/policiesForgetting list policies
POST/v1/forgetting/policies/:id/toggleForgetting toggle policy
GET/v1/forgetting/statsForgetting stats

GET /v1/forgetting/requests

List all forgetting requests from the system keyspace. GET /v1/forgetting/requests

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!({
        "requests": 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/forgetting.rs:210. Registration: akasha-daemon/src/forgetting.rs:482.

POST /v1/forgetting/requests

Create a new forgetting request with status "pending". POST /v1/forgetting/requests

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

JsonCreateForgettingRequest

FieldRust typeRequired on inputNotes
reasonStringYesHuman-readable reason for the deletion request
target_keyspaceStringYesThe keyspace containing the target record(s)
target_idsVec<String>YesIDs of the records to be deleted
requesterOption<String>No; optional or defaultedOptional requester identifier
struct CreateForgettingRequest {
    /// Human-readable reason for the deletion request
    reason: String,
    /// The keyspace containing the target record(s)
    target_keyspace: String,
    /// IDs of the records to be deleted
    target_ids: Vec<String>,
    /// Optional requester identifier
    requester: Option<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": record.id,
            "stored_key": stored_id,
            "status": "pending"
        })

Errors and validation

Directly referenced error variants: Internal, InvalidRequest. Middleware and delegated services can return additional errors described in the shared error reference.

Explicit status constants: CREATED.

Source: akasha-daemon/src/forgetting.rs:233. Registration: akasha-daemon/src/forgetting.rs:482.

POST /v1/forgetting/requests/:id/approve

Approve a forgetting request: execute the deletions and generate a proof. POST /v1/forgetting/requests/: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.

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/forgetting.rs:281. Registration: akasha-daemon/src/forgetting.rs:486.

GET /v1/forgetting/proof/:id

Get the deletion proof for a completed forgetting request. GET /v1/forgetting/proof/: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!({
        "id": record.id,
        "status": record.status,
        "proof_hash": proof_hash,
        "algorithm": "sha256-merkle",
        "merkle_leaves": record.merkle_leaves,
        "target_keyspace": record.target_keyspace,
        "target_ids": record.target_ids,
        "approved_at": record.approved_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/forgetting.rs:354. Registration: akasha-daemon/src/forgetting.rs:490.

GET /v1/forgetting/policies

Return default forgetting policies. GET /v1/forgetting/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/forgetting.rs:387. Registration: akasha-daemon/src/forgetting.rs:491.

POST /v1/forgetting/policies/:id/toggle

Toggle a policy's enabled status. POST /v1/forgetting/policies/:id/toggle

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

JsonTogglePolicyReq

FieldRust typeRequired on inputNotes
enabledOption<bool>No; optional or defaulted
struct TogglePolicyReq {
    enabled: Option<bool>,
}

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": p.id,
                "name": p.name,
                "enabled": p.enabled,
                "message": "Policy toggled successfully. Note: policy state is ephemeral in this release."
            })

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/forgetting.rs:401. Registration: akasha-daemon/src/forgetting.rs:492.

GET /v1/forgetting/stats

Count forgetting requests by status. GET /v1/forgetting/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/forgetting.rs:433. Registration: akasha-daemon/src/forgetting.rs:496.

On this page