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.

ConfigureEnable the feature and establish a connection.
SendChoose the database and encode a JSON body.
CheckInspect status, completeness, and response metadata.

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}'
FieldTypeMeaning
modestringRequired. cypher or sparql.
querystringRequired, nonempty read-only query text.
limitintegerOptional. Defaults to 100; clamped to 1–1,000.
snapshot_versionuint64Optional graph snapshot version for operations that support historical snapshots.
uids_as_stringsbooleanOptional. 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}
    }]
  }'
FieldContract
batchString idempotency token. Retrying identical normalized contents returns the original generation. Different contents with the same token are rejected.
domainOptional immutable start_ms, end_ms interval. Defaults to 1970–2100. Start inclusive, end exclusive.
observationsRequired array of 1–10,000 observations. Unknown request fields are rejected.
observations[].iduint64 event ID; new IDs must increase beyond the published maximum.
observations[].entityuint64 entity ID. Repeats are permitted; a graph UID can provide the application-level join.
observations[].time_msSigned UTC Unix milliseconds within the index domain.
observations[].positionExplicit 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 statusMeaning
400Invalid input, batch, coordinate, domain, or database selection.
401 / 403Authentication or authorization failure.
409The transaction aborted or conflicted.
429Ingestion workers or resources are busy. Retry with backoff and the same batch token.
503The required database or HA transaction service is unavailable.
500Internal 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

MethodPathWorkflow
POST/api/v1/admin/graph/predicate_inbound/prewarmGuide ↗
POST/api/v1/admin/kv/backfill_u64_raw_keysGuide ↗
POST/api/v1/admin/kv/backfill_u64_raw_keys/batchGuide ↗
GET/api/v1/admin/kv/namespacesGuide ↗
GET/api/v1/admin/lakehouseGuide ↗
GET/api/v1/admin/lakehouse/active-mappingsGuide ↗
POST/api/v1/admin/lakehouse/database-connectionsGuide ↗
POST/api/v1/admin/lakehouse/mapping-workbenchGuide ↗
GET/api/v1/admin/lakehouse/proposalsGuide ↗
POST/api/v1/admin/lakehouse/proposals/decisionGuide ↗
POST/api/v1/admin/lakehouse/queryGuide ↗
GET/api/v1/admin/lakehouse/sourcesGuide ↗
POST/api/v1/admin/lakehouse/sourcesGuide ↗
GET/api/v1/admin/multimodal/alignmentGuide ↗
GET/api/v1/admin/query/plan_tracesGuide ↗
GET/api/v1/admin/query/plan_traces/configGuide ↗
POST/api/v1/admin/query/plan_traces/configGuide ↗
GET/api/v1/admin/query/plan_traces/liveGuide ↗
GET/api/v1/admin/query/plan_traces/perfettoGuide ↗
POST/api/v1/admin/vector/learned_router/prewarmGuide ↗
GET/api/v1/admin/vector/namespacesGuide ↗
GET/api/v1/admin/vector/query_tracesGuide ↗
GET/api/v1/admin/vector/query_traces/configGuide ↗
POST/api/v1/admin/vector/query_traces/configGuide ↗
GET/api/v1/admin/vector/query_traces/liveGuide ↗
GET/api/v1/admin/vector/query_traces/perfettoGuide ↗
GET/api/v1/connectors/sourcesGuide ↗
POST/api/v1/connectors/sourcesGuide ↗
POST/api/v1/connectors/sources/:source_id/runGuide ↗
GET/api/v1/connectors/sources/:source_id/runsGuide ↗
GET/api/v1/databasesGuide ↗
POST/api/v1/graph_blockGuide ↗
GET/api/v1/healthGuide ↗
POST/api/v1/kvGuide ↗
GET/api/v1/kv/:subject_id/:key_idGuide ↗
GET/api/v1/schedulesGuide ↗
POST/api/v1/schedulesGuide ↗
POST/api/v1/schemaGuide ↗
POST/api/v1/semantic_ruleGuide ↗

Geospatial

MethodPathWorkflow
POST/api/v1/spacekey/:index/observationsGuide ↗

Onboarding

MethodPathWorkflow
POST/api/v1/onboarding/inspectGuide ↗
POST/api/v1/onboarding/loadGuide ↗
POST/api/v1/onboarding/ontology/importGuide ↗
GET/api/v1/onboarding/profile/:job_idGuide ↗
GET/api/v1/onboarding/profile/latest-by-workflowGuide ↗
POST/api/v1/onboarding/profile/runGuide ↗
POST/api/v1/onboarding/queryability/semanticGuide ↗
POST/api/v1/onboarding/review/decisionsGuide ↗
GET/api/v1/onboarding/review/receipt/:receipt_idGuide ↗
GET/api/v1/onboarding/review/workspaceGuide ↗
GET/api/v1/onboarding/semantic/:generation_idGuide ↗
POST/api/v1/onboarding/semantic/generateGuide ↗
GET/api/v1/onboarding/semantic/latest-by-workflowGuide ↗
POST/api/v1/onboarding/semantic/publish-profileGuide ↗
POST/api/v1/onboarding/source/connectGuide ↗
GET/api/v1/onboarding/source/statusGuide ↗
GET/api/v1/onboarding/status/:job_idGuide ↗
POST/api/v1/onboarding/validateGuide ↗
GET/api/v1/onboarding/wizard/:workflow_idGuide ↗
GET/api/v1/onboarding/wizard/catalogGuide ↗
POST/api/v1/onboarding/wizard/startGuide ↗

Semantic workflows and direct queries

MethodPathWorkflow
POST/api/v1/mcpGuide ↗
POST/api/v1/query/directGuide ↗
POST/api/v1/semantic/alignment/diffGuide ↗
POST/api/v1/semantic/alignment/feedbackGuide ↗
POST/api/v1/semantic/alignment/getGuide ↗
POST/api/v1/semantic/alignment/proposeGuide ↗
POST/api/v1/semantic/alignment/publishGuide ↗
GET/api/v1/semantic/capabilitiesGuide ↗
POST/api/v1/semantic/compileGuide ↗
GET/api/v1/semantic/conversations/:workflow_id/stagesGuide ↗
POST/api/v1/semantic/conversations/forkGuide ↗
POST/api/v1/semantic/conversations/joinGuide ↗
POST/api/v1/semantic/conversations/listGuide ↗
POST/api/v1/semantic/conversations/refineGuide ↗
POST/api/v1/semantic/domain-packGuide ↗
GET/api/v1/semantic/domainsGuide ↗
POST/api/v1/semantic/domains/importGuide ↗
POST/api/v1/semantic/domains/validateGuide ↗
POST/api/v1/semantic/executeGuide ↗
POST/api/v1/semantic/explainGuide ↗
POST/api/v1/semantic/ontology/importGuide ↗
POST/api/v1/semantic/profile/discoverGuide ↗
POST/api/v1/semantic/profile/probeGuide ↗
POST/api/v1/semantic/reasonGuide ↗
POST/api/v1/semantic/workflowsGuide ↗
GET/api/v1/semantic/workflows/:workflow_idGuide ↗
POST/api/v1/semantic/workflows/:workflow_id/advanceGuide ↗
POST/api/v1/semantic/workflows/:workflow_id/answersGuide ↗
POST/api/v1/semantic/workflows/:workflow_id/probesGuide ↗

Cloud tenant portal

MethodPathWorkflow
POST/api/v1/published/:endpoint_uid/queryGuide ↗
GET/control/v1/api-keysGuide ↗
POST/control/v1/api-keysGuide ↗
DELETE/control/v1/api-keys/:key_uidGuide ↗
GET/control/v1/endpointsGuide ↗
POST/control/v1/endpointsGuide ↗
DELETE/control/v1/endpoints/:endpoint_uidGuide ↗
POST/control/v1/loginGuide ↗
GET/control/v1/sessionGuide ↗

Cloud accounts and platform administration

MethodPathWorkflow
POST/Guide ↗
POST/control/v1/cloud-challengeGuide ↗
GET/control/v1/cloud-configGuide ↗
POST/control/v1/cloud-loginGuide ↗
POST/control/v1/cloud-logoutGuide ↗
POST/control/v1/cloud-refreshGuide ↗
POST/control/v1/forgot-passwordGuide ↗
POST/control/v1/mfa/setupGuide ↗
POST/control/v1/mfa/verifyGuide ↗
GET/control/v1/operator/sessionGuide ↗
POST/control/v1/operator/suspensionGuide ↗
GET/control/v1/operator/tenantsGuide ↗
POST/control/v1/resend-codeGuide ↗
POST/control/v1/reset-passwordGuide ↗
POST/control/v1/signupGuide ↗
POST/control/v1/verify-emailGuide ↗

Cloud vector search

MethodPathWorkflow
GET/api/v1/vector/indexesGuide ↗
POST/api/v1/vector/insertGuide ↗
POST/api/v1/vector/searchGuide ↗

Cloud chat

MethodPathWorkflow
POST/api/v1/chatGuide ↗

Health · admin listener

MethodPathWorkflow
GET/healthGuide ↗
GET/health/liveGuide ↗
GET/health/multimodal/alignmentGuide ↗
GET/health/readyGuide ↗
GET/health/startupGuide ↗
GET/health/vector/namespacesGuide ↗