API referenceInstance API
GUIDE & REFERENCE

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.

MethodPathOperation
POST/v1/memory/resourcesMemory resource store
GET/v1/memory/resources/listResource list
POST/v1/memory/resources/getResource get
POST/v1/memory/resources/dataResource data
POST/v1/memory/resources/data/existsResource data exists
POST/v1/memory/resources/data/sizeResource data size
POST/v1/memory/resources/typeResource by type
POST/v1/memory/resources/accessResource record access
POST/v1/memory/resources/usageResource usage
POST/v1/memory/resources/chunksResource chunks

POST /v1/memory/resources

Memory resource store

AvailabilitySource contract
Registrationconfig.enable_memory
Runtime servicememory
Handler dependenciesSee handler source and return expressions.

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

Request

JsonResourceStoreRequest

FieldRust typeRequired on inputNotes
resourceResourceItemYes
data_b64StringYes
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

AvailabilitySource contract
Registrationconfig.enable_memory
Runtime servicememory
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::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

AvailabilitySource contract
Registrationconfig.enable_memory
Runtime servicememory
Handler dependenciesSee handler source and return expressions.

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

Request

JsonResourceIdReq

FieldRust typeRequired on inputNotes
idStringYes
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

AvailabilitySource contract
Registrationconfig.enable_memory
Runtime servicememory
Handler dependenciesSee handler source and return expressions.

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

Request

JsonResourceIdReq

FieldRust typeRequired on inputNotes
idStringYes
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

AvailabilitySource contract
Registrationconfig.enable_memory
Runtime servicememory
Handler dependenciesSee handler source and return expressions.

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

Request

JsonResourceIdReq

FieldRust typeRequired on inputNotes
idStringYes
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

AvailabilitySource contract
Registrationconfig.enable_memory
Runtime servicememory
Handler dependenciesSee handler source and return expressions.

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

Request

JsonResourceIdReq

FieldRust typeRequired on inputNotes
idStringYes
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

AvailabilitySource contract
Registrationconfig.enable_memory
Runtime servicememory
Handler dependenciesSee handler source and return expressions.

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

Request

JsonResourceTypeReq

FieldRust typeRequired on inputNotes
kindStringYes
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

AvailabilitySource contract
Registrationconfig.enable_memory
Runtime servicememory
Handler dependenciesSee handler source and return expressions.

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

Request

JsonResourceAccessReq

FieldRust typeRequired on inputNotes
idStringYes
accessStringYes
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

AvailabilitySource contract
Registrationconfig.enable_memory
Runtime servicememory
Handler dependenciesSee handler source and return expressions.

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

Request

JsonResourceUsageReq

FieldRust typeRequired on inputNotes
idStringYes
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

AvailabilitySource contract
Registrationconfig.enable_memory
Runtime servicememory
Handler dependenciesSee 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.

JsonResourceChunksReq

FieldRust typeRequired on inputNotes
resource_idStringYes
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.

On this page