API referenceInstance API
GUIDE & REFERENCE

Analytics

Every registered analytics 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/analytics/sqlAnalytics sql
POST/v1/analytics/sources/csvAnalytics register csv
POST/v1/analytics/sources/parquetAnalytics register parquet
POST/v1/analytics/sources/coreAnalytics register core
POST/v1/ingestIngest data
GET/v1/analytics/healthAnalytics health
GET/v1/analytics/viewsAnalytics views list
POST/v1/analytics/viewsAnalytics views create
DELETE/v1/analytics/views/:nameAnalytics views delete

POST /v1/analytics/sql

Analytics sql

AvailabilitySource contract
Registrationconfig.enable_analytics
Runtime serviceanalytics
Handler dependenciesSee handler source and return expressions.

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

Request

JsonSqlRequest

FieldRust typeRequired on inputNotes
sqlStringYes
struct SqlRequest {
    sql: 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!({"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:2210. Registration: akasha-daemon/src/main.rs:4407.

POST /v1/analytics/sources/csv

Analytics register csv

AvailabilitySource contract
Registrationconfig.enable_analytics
Runtime serviceanalytics
Handler dependenciesSee handler source and return expressions.

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

Request

JsonAnalyticsSourceCsv

FieldRust typeRequired on inputNotes
nameStringYes
pathStringYes
struct AnalyticsSourceCsv {
    name: String,
    path: 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:3850. Registration: akasha-daemon/src/main.rs:4408.

POST /v1/analytics/sources/parquet

Analytics register parquet

AvailabilitySource contract
Registrationconfig.enable_analytics
Runtime serviceanalytics
Handler dependenciesSee handler source and return expressions.

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

Request

JsonAnalyticsSourceParquet

FieldRust typeRequired on inputNotes
nameStringYes
pathStringYes
struct AnalyticsSourceParquet {
    name: String,
    path: 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:3868. Registration: akasha-daemon/src/main.rs:4409.

POST /v1/analytics/sources/core

Analytics register core

AvailabilitySource contract
Registrationconfig.enable_analytics
Runtime serviceanalytics
Handler dependenciesSee handler source and return expressions.

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

Request

JsonAnalyticsSourceCore

FieldRust typeRequired on inputNotes
nameStringYes
keyspaceStringYes
collectionStringYes
struct AnalyticsSourceCore {
    name: String,
    keyspace: String,
    collection: 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:3887. Registration: akasha-daemon/src/main.rs:4413.

POST /v1/ingest

Ingest data

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

JsonIngestRequest

FieldRust typeRequired on inputNotes
kindIngestKindYes
content_typeStringYes
struct IngestRequest {
    kind: IngestKind,
    content_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::to_value(out).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:2243. Registration: akasha-daemon/src/main.rs:4414.

GET /v1/analytics/health

Analytics health

AvailabilitySource contract
Registrationconfig.enable_analytics
Runtime serviceanalytics
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>

Serialization is delegated or the handler returns a raw response. Consult the exact handler below; the OpenAPI response intentionally remains unconstrained.

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

GET /v1/analytics/views

Analytics views list

AvailabilitySource contract
Registrationconfig.enable_analytics
Runtime serviceanalytics
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!({"views": entries, "total": entries.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/main.rs:11255. Registration: akasha-daemon/src/main.rs:4416.

POST /v1/analytics/views

Analytics views create

AvailabilitySource contract
Registrationconfig.enable_analytics
Runtime serviceanalytics
Handler dependenciesSee handler source and return expressions.

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

Request

JsonAnalyticsViewCreateReq

FieldRust typeRequired on inputNotes
nameStringYes
queryStringYes
struct AnalyticsViewCreateReq {
    name: String,
    query: 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, "name": req.name})

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

DELETE /v1/analytics/views/:name

Analytics views delete

AvailabilitySource contract
Registrationconfig.enable_analytics
Runtime serviceanalytics
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!({"ok": true, "removed": name})

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

On this page