API referenceInstance API
GUIDE & REFERENCE

Maintenance

Every registered maintenance instance operation, with source-derived inputs, outputs, access policy, and errors.

This reference covers 9 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/backupsBackup create
POST/v1/backups/listBackup list
POST/v1/backups/restoreBackup restore
POST/v1/backups/deleteBackup delete
POST/v1/analyzeAnalyze
POST/v1/compactCompact
POST/v1/reindexReindex
POST/v1/clear_cacheClear cache
POST/v1/search/textCore text search

POST /v1/backups

Backup create

AvailabilitySource contract
Registrationconfig.enable_kv || config.enable_analytics
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

JsonBackupCreateRequest

FieldRust typeRequired on inputNotes
backup_dirStringYes
optionsOption<akasha::CoreBackupOptions>No; optional or defaultedSerde: default
struct BackupCreateRequest {
    backup_dir: String,
    #[serde(default)]
    options: Option<akasha::CoreBackupOptions>,
}

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(info).unwrap_or(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:3067. Registration: akasha-daemon/src/main.rs:4594.

POST /v1/backups/list

Backup list

AvailabilitySource contract
Registrationconfig.enable_kv || config.enable_analytics
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

JsonBackupListRequest

FieldRust typeRequired on inputNotes
backup_dirStringYes
struct BackupListRequest {
    backup_dir: 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:3088. Registration: akasha-daemon/src/main.rs:4595.

POST /v1/backups/restore

Backup restore

AvailabilitySource contract
Registrationconfig.enable_kv || config.enable_analytics
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

JsonBackupRestoreRequest

FieldRust typeRequired on inputNotes
backup_dirStringYes
idStringYes
optionsOption<akasha::CoreRestoreOptions>No; optional or defaultedSerde: default
struct BackupRestoreRequest {
    backup_dir: String,
    id: String,
    #[serde(default)]
    options: Option<akasha::CoreRestoreOptions>,
}

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:3111. Registration: akasha-daemon/src/main.rs:4596.

POST /v1/backups/delete

Backup delete

AvailabilitySource contract
Registrationconfig.enable_kv || config.enable_analytics
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

JsonBackupDeleteRequest

FieldRust typeRequired on inputNotes
backup_dirStringYes
idStringYes
struct BackupDeleteRequest {
    backup_dir: String,
    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!({"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:3130. Registration: akasha-daemon/src/main.rs:4597.

POST /v1/analyze

Analyze

AvailabilitySource contract
Registrationconfig.enable_kv || config.enable_analytics
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::to_value(a).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:3305. Registration: akasha-daemon/src/main.rs:4598.

POST /v1/compact

Compact

AvailabilitySource contract
Registrationconfig.enable_kv || config.enable_analytics
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!({"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:3319. Registration: akasha-daemon/src/main.rs:4599.

POST /v1/reindex

Reindex

AvailabilitySource contract
Registrationconfig.enable_kv || config.enable_analytics
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

JsonReindexRequest

FieldRust typeRequired on inputNotes
keyspaceStringYes
struct ReindexRequest {
    keyspace: 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:3340. Registration: akasha-daemon/src/main.rs:4600.

POST /v1/clear_cache

Clear cache

AvailabilitySource contract
Registrationconfig.enable_kv || config.enable_analytics
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!({"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:3362. Registration: akasha-daemon/src/main.rs:4601.

POST /v1/search/text

Core text search

AvailabilitySource contract
Registrationconfig.enable_kv || config.enable_analytics
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

JsonCoreTextSearchRequest

FieldRust typeRequired on inputNotes
keyspaceStringYes
queryStringYes
limitOption<usize>No; optional or defaulted
struct CoreTextSearchRequest {
    keyspace: String,
    query: 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!({"rows": rows})

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:3380. Registration: akasha-daemon/src/main.rs:4602.

On this page