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.
| Method | Path | Operation |
|---|---|---|
POST | /v1/analytics/sql | Analytics sql |
POST | /v1/analytics/sources/csv | Analytics register csv |
POST | /v1/analytics/sources/parquet | Analytics register parquet |
POST | /v1/analytics/sources/core | Analytics register core |
POST | /v1/ingest | Ingest data |
GET | /v1/analytics/health | Analytics health |
GET | /v1/analytics/views | Analytics views list |
POST | /v1/analytics/views | Analytics views create |
DELETE | /v1/analytics/views/:name | Analytics views delete |
POST /v1/analytics/sql
Analytics sql
| Availability | Source contract |
|---|---|
| Registration | config.enable_analytics |
| Runtime service | analytics |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — SqlRequest
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
sql | String | Yes |
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
| Availability | Source contract |
|---|---|
| Registration | config.enable_analytics |
| Runtime service | analytics |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — AnalyticsSourceCsv
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
name | String | Yes | |
path | String | Yes |
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
| Availability | Source contract |
|---|---|
| Registration | config.enable_analytics |
| Runtime service | analytics |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — AnalyticsSourceParquet
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
name | String | Yes | |
path | String | Yes |
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
| Availability | Source contract |
|---|---|
| Registration | config.enable_analytics |
| Runtime service | analytics |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — AnalyticsSourceCore
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
name | String | Yes | |
keyspace | String | Yes | |
collection | String | Yes |
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
| Availability | Source contract |
|---|---|
| Registration | config.enable_analytics |
| 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 — IngestRequest
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
kind | IngestKind | Yes | |
content_type | String | Yes |
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
| Availability | Source contract |
|---|---|
| Registration | config.enable_analytics |
| Runtime service | analytics |
| 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>
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
| Availability | Source contract |
|---|---|
| Registration | config.enable_analytics |
| Runtime service | analytics |
| 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!({"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
| Availability | Source contract |
|---|---|
| Registration | config.enable_analytics |
| Runtime service | analytics |
| Handler dependencies | See handler source and return expressions. |
Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.
Request
Json — AnalyticsViewCreateReq
| Field | Rust type | Required on input | Notes |
|---|---|---|---|
name | String | Yes | |
query | String | Yes |
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
| Availability | Source contract |
|---|---|
| Registration | config.enable_analytics |
| Runtime service | analytics |
| 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!({"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.