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.
| Method | Path | Operation |
|---|---|---|
GET | /v1/forgetting/requests | Forgetting list requests |
POST | /v1/forgetting/requests | Forgetting create request |
POST | /v1/forgetting/requests/:id/approve | Forgetting approve request |
GET | /v1/forgetting/proof/:id | Forgetting get proof |
GET | /v1/forgetting/policies | Forgetting list policies |
POST | /v1/forgetting/policies/:id/toggle | Forgetting toggle policy |
GET | /v1/forgetting/stats | Forgetting stats |
GET /v1/forgetting/requests
List all forgetting requests from the system keyspace. GET /v1/forgetting/requests
| 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!({
"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
| 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 — CreateForgettingRequest
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
reason | String | Yes | Human-readable reason for the deletion request |
target_keyspace | String | Yes | The keyspace containing the target record(s) |
target_ids | Vec<String> | Yes | IDs of the records to be deleted |
requester | Option<String> | No; optional or defaulted | Optional 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
| 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.
respErrors 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
| 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": 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
| 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/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
| 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"
}Json — TogglePolicyReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
enabled | Option<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
| 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/forgetting.rs:433. Registration: akasha-daemon/src/forgetting.rs:496.