HTTP workflows and endpoints
Use HTTP for observation ingestion, read-only direct queries, semantic workflows, onboarding, health checks, and administration. Use gRPC for typed streaming results and explicit multimodal transactions.
Examples assume Bash, curl, a running server, and SHRIKEDB_HTTP=http://127.0.0.1:8182 from the guide configuration. Add a bearer token or API key when authentication is enabled. Keep administration endpoints on a trusted network.
Execute a read-only query
POST /api/v1/query/direct
Requires semantic_query.enabled and semantic_query.rest_enabled. The caller needs tenant Read permission. Writes are rejected. The response cap is 1–1,000 rows.
export SHRIKEDB_HTTP='http://127.0.0.1:8182'
curl --fail-with-body "$SHRIKEDB_HTTP/api/v1/query/direct" \
-H 'Content-Type: application/json' \
-d '{"mode":"cypher","query":"RETURN 1 AS ready","limit":10}'
| Field | Type | Meaning |
|---|---|---|
| mode | string | Required. cypher or sparql. |
| query | string | Required, nonempty read-only query text. |
| limit | integer | Optional. Defaults to 100; clamped to 1–1,000. |
| snapshot_version | uint64 | Optional graph snapshot version for operations that support historical snapshots. |
| uids_as_strings | boolean | Optional. Return graph UIDs as decimal strings for exact handling by browser and JSON clients. |
The response contains mode, fields, rows, row_count, returned_rows, limit, truncated, elapsed_ms, query_hash, and read_only. Check truncated before treating the rows as a complete result.
Ask a question about a cloud workspace
POST /api/v1/chat
Send a question with a tenant bearer token or private API key. Create the key in your Cloud workspace’s API endpoints screen, then set SHRIKEDB_API_KEY to that private value. The assistant prepares a bounded read-only query against that tenant’s graph, runs it, and returns an answer with the executed query and row count. The Cloud console’s Chat screen uses this endpoint.
curl --fail-with-body 'https://shrikedb.com/api/v1/chat' \
-H "x-shrikedb-api-key: $SHRIKEDB_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"question":"How many nodes are in this workspace?","history":[]}'
history accepts up to four previous {"question":"…","answer":"…"} pairs. The response contains answer, mode, query, rows, truncated, and elapsed_ms. The service sends the question, schema names, and selected result rows to OpenAI to compose the answer. Its model credential stays on the server. Requests cannot modify workspace data.
Load and search cloud vectors
The Cloud workspace offers the same workflow on its Vectors screen. Use a tenant bearer token or private API key. Vector writes and reads use the database owned by that tenant. Each named index has a fixed dimension; the first batch sets it.
export SHRIKEDB_HTTP='https://shrikedb.com'
export SHRIKEDB_API_KEY='your-private-key'
curl --fail-with-body "$SHRIKEDB_HTTP/api/v1/vector/insert" \
-H "x-shrikedb-api-key: $SHRIKEDB_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"index_name":"incident_text_v3","vectors":[{"entity_id":"10042","vector":[0.18,-0.04,0.61,0.22]}]}'
curl --fail-with-body "$SHRIKEDB_HTTP/api/v1/vector/search" \
-H "x-shrikedb-api-key: $SHRIKEDB_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"index_name":"incident_text_v3","query_vector":[0.17,-0.02,0.60,0.24],"k":10,"ef_search":128}'
GET /api/v1/vector/indexes lists the tenant’s named indexes. Insert accepts up to 256 distinct IDs per batch and 2 MiB per request. IDs are decimal strings so full 64-bit graph UIDs survive JSON clients. Search returns ordered matches with entity_id and metric score. Use the returned IDs in CALL vector.knn(...) and graph patterns in the query editor.
Append geospatial observations
POST /api/v1/spacekey/:index/observations
The caller needs tenant Write permission. Replace :index with a named index, such as events. The first append creates it. Add x-shrikedb-database to select a non-default logical database.
curl --fail-with-body "$SHRIKEDB_HTTP/api/v1/spacekey/events/observations" \
-H 'Content-Type: application/json' \
-d '{
"batch": "example-0001",
"domain": {"start_ms":1672531200000,"end_ms":1704067200000},
"observations": [{
"id":1,"entity":1001,"time_ms":1672531201000,
"position":{"crs":"WGS84","x":-77.0,"y":38.9}
}]
}'
| Field | Contract |
|---|---|
| batch | String idempotency token. Retrying identical normalized contents returns the original generation. Different contents with the same token are rejected. |
| domain | Optional immutable start_ms, end_ms interval. Defaults to 1970–2100. Start inclusive, end exclusive. |
| observations | Required array of 1–10,000 observations. Unknown request fields are rejected. |
| observations[].id | uint64 event ID; new IDs must increase beyond the published maximum. |
| observations[].entity | uint64 entity ID. Repeats are permitted; a graph UID can provide the application-level join. |
| observations[].time_ms | Signed UTC Unix milliseconds within the index domain. |
| observations[].position | Explicit CRS plus numeric x/y or a grid reference. WGS84 uses longitude then latitude; EPSG:4326 uses latitude then longitude. |
A successful response includes generation, run_digest, accepted, normalization receipts, commit_domain: "multimodal-transaction", and grid semantics. The server commits the batch through the same transaction and HA path used by other database writes.
| HTTP status | Meaning |
|---|---|
| 400 | Invalid input, batch, coordinate, domain, or database selection. |
| 401 / 403 | Authentication or authorization failure. |
| 409 | The transaction aborted or conflicted. |
| 429 | Ingestion workers or resources are busy. Retry with backoff and the same batch token. |
| 503 | The required database or HA transaction service is unavailable. |
| 500 | Internal or storage error. Preserve the token while reconciling an ambiguous append. |
Use TransactionInsertSpaceKey when graph, vector, key–value, and geospatial changes need one explicit commit. Read the index through Cypher or SPARQL.
Store and retrieve a payload
Create an appropriate schema first using POST /api/v1/schema with id, name, and fields. The payload API accepts base64-encoded bytes.
curl --fail-with-body "$SHRIKEDB_HTTP/api/v1/kv" \
-H 'Content-Type: application/json' \
-d '{"subject_id":0,"schema_id":1,"key":1001,"value":"aGVsbG8="}'
curl --fail-with-body "$SHRIKEDB_HTTP/api/v1/kv/0/1001"
This local example stores hello under schema 1, subject 0, key 1001. A read returns found and, when present, a base64 value. Use the gRPC methods for typed, bulk, or transactional operations.
Check service health
The guide configuration exposes the admin listener on 127.0.0.1:9190. Check readiness before routing traffic; a live process can still be recovering.
curl --fail-with-body http://127.0.0.1:9190/health/live
curl --fail-with-body http://127.0.0.1:9190/health/ready
Browse registered routes
The inventory below is generated from server route registration. It distinguishes the HTTP and admin listeners and links each family to its workflow documentation. Availability depends on feature configuration and caller permissions.
Data and administration
| Method | Path | Workflow |
|---|---|---|
| POST | /api/v1/admin/graph/predicate_inbound/prewarm | Guide ↗ |
| POST | /api/v1/admin/kv/backfill_u64_raw_keys | Guide ↗ |
| POST | /api/v1/admin/kv/backfill_u64_raw_keys/batch | Guide ↗ |
| GET | /api/v1/admin/kv/namespaces | Guide ↗ |
| GET | /api/v1/admin/lakehouse | Guide ↗ |
| GET | /api/v1/admin/lakehouse/active-mappings | Guide ↗ |
| POST | /api/v1/admin/lakehouse/database-connections | Guide ↗ |
| POST | /api/v1/admin/lakehouse/mapping-workbench | Guide ↗ |
| GET | /api/v1/admin/lakehouse/proposals | Guide ↗ |
| POST | /api/v1/admin/lakehouse/proposals/decision | Guide ↗ |
| POST | /api/v1/admin/lakehouse/query | Guide ↗ |
| GET | /api/v1/admin/lakehouse/sources | Guide ↗ |
| POST | /api/v1/admin/lakehouse/sources | Guide ↗ |
| GET | /api/v1/admin/multimodal/alignment | Guide ↗ |
| GET | /api/v1/admin/query/plan_traces | Guide ↗ |
| GET | /api/v1/admin/query/plan_traces/config | Guide ↗ |
| POST | /api/v1/admin/query/plan_traces/config | Guide ↗ |
| GET | /api/v1/admin/query/plan_traces/live | Guide ↗ |
| GET | /api/v1/admin/query/plan_traces/perfetto | Guide ↗ |
| POST | /api/v1/admin/vector/learned_router/prewarm | Guide ↗ |
| GET | /api/v1/admin/vector/namespaces | Guide ↗ |
| GET | /api/v1/admin/vector/query_traces | Guide ↗ |
| GET | /api/v1/admin/vector/query_traces/config | Guide ↗ |
| POST | /api/v1/admin/vector/query_traces/config | Guide ↗ |
| GET | /api/v1/admin/vector/query_traces/live | Guide ↗ |
| GET | /api/v1/admin/vector/query_traces/perfetto | Guide ↗ |
| GET | /api/v1/connectors/sources | Guide ↗ |
| POST | /api/v1/connectors/sources | Guide ↗ |
| POST | /api/v1/connectors/sources/:source_id/run | Guide ↗ |
| GET | /api/v1/connectors/sources/:source_id/runs | Guide ↗ |
| GET | /api/v1/databases | Guide ↗ |
| POST | /api/v1/graph_block | Guide ↗ |
| GET | /api/v1/health | Guide ↗ |
| POST | /api/v1/kv | Guide ↗ |
| GET | /api/v1/kv/:subject_id/:key_id | Guide ↗ |
| GET | /api/v1/schedules | Guide ↗ |
| POST | /api/v1/schedules | Guide ↗ |
| POST | /api/v1/schema | Guide ↗ |
| POST | /api/v1/semantic_rule | Guide ↗ |
Geospatial
| Method | Path | Workflow |
|---|---|---|
| POST | /api/v1/spacekey/:index/observations | Guide ↗ |
Onboarding
| Method | Path | Workflow |
|---|---|---|
| POST | /api/v1/onboarding/inspect | Guide ↗ |
| POST | /api/v1/onboarding/load | Guide ↗ |
| POST | /api/v1/onboarding/ontology/import | Guide ↗ |
| GET | /api/v1/onboarding/profile/:job_id | Guide ↗ |
| GET | /api/v1/onboarding/profile/latest-by-workflow | Guide ↗ |
| POST | /api/v1/onboarding/profile/run | Guide ↗ |
| POST | /api/v1/onboarding/queryability/semantic | Guide ↗ |
| POST | /api/v1/onboarding/review/decisions | Guide ↗ |
| GET | /api/v1/onboarding/review/receipt/:receipt_id | Guide ↗ |
| GET | /api/v1/onboarding/review/workspace | Guide ↗ |
| GET | /api/v1/onboarding/semantic/:generation_id | Guide ↗ |
| POST | /api/v1/onboarding/semantic/generate | Guide ↗ |
| GET | /api/v1/onboarding/semantic/latest-by-workflow | Guide ↗ |
| POST | /api/v1/onboarding/semantic/publish-profile | Guide ↗ |
| POST | /api/v1/onboarding/source/connect | Guide ↗ |
| GET | /api/v1/onboarding/source/status | Guide ↗ |
| GET | /api/v1/onboarding/status/:job_id | Guide ↗ |
| POST | /api/v1/onboarding/validate | Guide ↗ |
| GET | /api/v1/onboarding/wizard/:workflow_id | Guide ↗ |
| GET | /api/v1/onboarding/wizard/catalog | Guide ↗ |
| POST | /api/v1/onboarding/wizard/start | Guide ↗ |
Semantic workflows and direct queries
| Method | Path | Workflow |
|---|---|---|
| POST | /api/v1/mcp | Guide ↗ |
| POST | /api/v1/query/direct | Guide ↗ |
| POST | /api/v1/semantic/alignment/diff | Guide ↗ |
| POST | /api/v1/semantic/alignment/feedback | Guide ↗ |
| POST | /api/v1/semantic/alignment/get | Guide ↗ |
| POST | /api/v1/semantic/alignment/propose | Guide ↗ |
| POST | /api/v1/semantic/alignment/publish | Guide ↗ |
| GET | /api/v1/semantic/capabilities | Guide ↗ |
| POST | /api/v1/semantic/compile | Guide ↗ |
| GET | /api/v1/semantic/conversations/:workflow_id/stages | Guide ↗ |
| POST | /api/v1/semantic/conversations/fork | Guide ↗ |
| POST | /api/v1/semantic/conversations/join | Guide ↗ |
| POST | /api/v1/semantic/conversations/list | Guide ↗ |
| POST | /api/v1/semantic/conversations/refine | Guide ↗ |
| POST | /api/v1/semantic/domain-pack | Guide ↗ |
| GET | /api/v1/semantic/domains | Guide ↗ |
| POST | /api/v1/semantic/domains/import | Guide ↗ |
| POST | /api/v1/semantic/domains/validate | Guide ↗ |
| POST | /api/v1/semantic/execute | Guide ↗ |
| POST | /api/v1/semantic/explain | Guide ↗ |
| POST | /api/v1/semantic/ontology/import | Guide ↗ |
| POST | /api/v1/semantic/profile/discover | Guide ↗ |
| POST | /api/v1/semantic/profile/probe | Guide ↗ |
| POST | /api/v1/semantic/reason | Guide ↗ |
| POST | /api/v1/semantic/workflows | Guide ↗ |
| GET | /api/v1/semantic/workflows/:workflow_id | Guide ↗ |
| POST | /api/v1/semantic/workflows/:workflow_id/advance | Guide ↗ |
| POST | /api/v1/semantic/workflows/:workflow_id/answers | Guide ↗ |
| POST | /api/v1/semantic/workflows/:workflow_id/probes | Guide ↗ |
Cloud tenant portal
| Method | Path | Workflow |
|---|---|---|
| POST | /api/v1/published/:endpoint_uid/query | Guide ↗ |
| GET | /control/v1/api-keys | Guide ↗ |
| POST | /control/v1/api-keys | Guide ↗ |
| DELETE | /control/v1/api-keys/:key_uid | Guide ↗ |
| GET | /control/v1/endpoints | Guide ↗ |
| POST | /control/v1/endpoints | Guide ↗ |
| DELETE | /control/v1/endpoints/:endpoint_uid | Guide ↗ |
| POST | /control/v1/login | Guide ↗ |
| GET | /control/v1/session | Guide ↗ |
Cloud accounts and platform administration
| Method | Path | Workflow |
|---|---|---|
| POST | / | Guide ↗ |
| POST | /control/v1/cloud-challenge | Guide ↗ |
| GET | /control/v1/cloud-config | Guide ↗ |
| POST | /control/v1/cloud-login | Guide ↗ |
| POST | /control/v1/cloud-logout | Guide ↗ |
| POST | /control/v1/cloud-refresh | Guide ↗ |
| POST | /control/v1/forgot-password | Guide ↗ |
| POST | /control/v1/mfa/setup | Guide ↗ |
| POST | /control/v1/mfa/verify | Guide ↗ |
| GET | /control/v1/operator/session | Guide ↗ |
| POST | /control/v1/operator/suspension | Guide ↗ |
| GET | /control/v1/operator/tenants | Guide ↗ |
| POST | /control/v1/resend-code | Guide ↗ |
| POST | /control/v1/reset-password | Guide ↗ |
| POST | /control/v1/signup | Guide ↗ |
| POST | /control/v1/verify-email | Guide ↗ |
Cloud vector search
| Method | Path | Workflow |
|---|---|---|
| GET | /api/v1/vector/indexes | Guide ↗ |
| POST | /api/v1/vector/insert | Guide ↗ |
| POST | /api/v1/vector/search | Guide ↗ |
Cloud chat
| Method | Path | Workflow |
|---|---|---|
| POST | /api/v1/chat | Guide ↗ |