Resource Memory
Every registered resource memory instance operation, with source-derived inputs, outputs, access policy, and errors.
This reference covers 10 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 | /v1/memory/resources | Memory resource store |
GET | /v1/memory/resources/list | Resource list |
POST | /v1/memory/resources/get | Resource get |
POST | /v1/memory/resources/data | Resource data |
POST | /v1/memory/resources/data/exists | Resource data exists |
POST | /v1/memory/resources/data/size | Resource data size |
POST | /v1/memory/resources/type | Resource by type |
POST | /v1/memory/resources/access | Resource record access |
POST | /v1/memory/resources/usage | Resource usage |
POST | /v1/memory/resources/chunks | Resource chunks |
POST /v1/memory/resources
Memory resource store
| Availability | Source contract |
|---|---|
| Registration | config.enable_memory |
| Runtime service | memory |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — ResourceStoreRequest
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
resource | ResourceItem | Yes | |
data_b64 | String | Yes |
struct ResourceStoreRequest {
resource: ResourceItem,
data_b64: 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!({"ok": true})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/main.rs:7552. Registration: akasha-daemon/src/main.rs:4648.
GET /v1/memory/resources/list
Resource list
| Availability | Source contract |
|---|---|
| Registration | config.enable_memory |
| Runtime service | memory |
| 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::to_value(list).unwrap_or(serde_json::json!([])),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/main.rs:3617. Registration: akasha-daemon/src/main.rs:4649.
POST /v1/memory/resources/get
Resource get
| Availability | Source contract |
|---|---|
| Registration | config.enable_memory |
| Runtime service | memory |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — ResourceIdReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
id | String | Yes |
struct ResourceIdReq {
id: 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: InvalidRequest. Middleware and delegated services can return additional errors described in the shared error reference.
Source: akasha-daemon/src/main.rs:3631. Registration: akasha-daemon/src/main.rs:4650.
POST /v1/memory/resources/data
Resource data
| Availability | Source contract |
|---|---|
| Registration | config.enable_memory |
| Runtime service | memory |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — ResourceIdReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
id | String | Yes |
struct ResourceIdReq {
id: 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!({"data_b64": data.map(|d| base64::engine::general_purpose::STANDARD.encode(d))}),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/main.rs:3646. Registration: akasha-daemon/src/main.rs:4651.
POST /v1/memory/resources/data/exists
Resource data exists
| Availability | Source contract |
|---|---|
| Registration | config.enable_memory |
| Runtime service | memory |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — ResourceIdReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
id | String | Yes |
struct ResourceIdReq {
id: 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!({"exists": exists})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/main.rs:3663. Registration: akasha-daemon/src/main.rs:4652.
POST /v1/memory/resources/data/size
Resource data size
| Availability | Source contract |
|---|---|
| Registration | config.enable_memory |
| Runtime service | memory |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — ResourceIdReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
id | String | Yes |
struct ResourceIdReq {
id: 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!({"size": sz})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/main.rs:3678. Registration: akasha-daemon/src/main.rs:4656.
POST /v1/memory/resources/type
Resource by type
| Availability | Source contract |
|---|---|
| Registration | config.enable_memory |
| Runtime service | memory |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — ResourceTypeReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
kind | String | Yes |
struct ResourceTypeReq {
kind: 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::to_value(list).unwrap_or(serde_json::json!([])),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/main.rs:3698. Registration: akasha-daemon/src/main.rs:4657.
POST /v1/memory/resources/access
Resource record access
| Availability | Source contract |
|---|---|
| Registration | config.enable_memory |
| Runtime service | memory |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — ResourceAccessReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
id | String | Yes | |
access | String | Yes |
struct ResourceAccessReq {
id: String,
access: 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!({"ok": true})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/main.rs:3730. Registration: akasha-daemon/src/main.rs:4658.
POST /v1/memory/resources/usage
Resource usage
| Availability | Source contract |
|---|---|
| Registration | config.enable_memory |
| Runtime service | memory |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — ResourceUsageReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
id | String | Yes |
struct ResourceUsageReq {
id: 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::to_value(stats).unwrap_or(serde_json::json!({})),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/main.rs:7608. Registration: akasha-daemon/src/main.rs:4659.
POST /v1/memory/resources/chunks
Resource chunks
| Availability | Source contract |
|---|---|
| Registration | config.enable_memory |
| Runtime service | memory |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Implementation limit: Placeholder implementation: returns an empty JSON array; backend data retrieval is not implemented here.
Json — ResourceChunksReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
resource_id | String | Yes |
struct ResourceChunksReq {
#[allow(dead_code)]
resource_id: 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!([])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:10542. Registration: akasha-daemon/src/main.rs:4702.