HTTP API

JSON over HTTPS. Everything the console and SDKs do goes through it.

Authentication

Authorization: Bearer <key or token>, or HTTP Basic with the database name and secret from its URL.

CredentialLooks likeScope
Server admin keyfrom propus init, /etc/propus/admin-keyEvery database, server endpoints
Database keythe secret in the database's URL, pk_…One database, as admin
Role keypk_…, made with POST keysOne database, a role, a tenant and a user
Tokenpt_…, from POST tokens, 30 s to 1 hThe key it came from; dies with it

Database endpoints live under /v1/db/<name>/. A database's own key may leave the name out: /v1/query.

Errors

{"error": {"code": "23505", "message": "duplicate key value violates unique constraint …"}}

code is a PostgreSQL SQLSTATE; the HTTP status matches (400, 401, 403, 404, 409, …).

Server

MethodPathDoes
GET/v1/healthHealth
GET, POST/v1/databasesList, create ({"name"}; the answer holds the key once)
DELETE/v1/databases/<name>Drop
GET, POST/v1/databases/<name>/urlIts URLs; POST resets the key
GET/v1/stats, /v1/db/<name>/statsLatency, slow queries, engine numbers
GET/v1/loadtestThe load test's state and numbers, and its AI settings with the key hidden (server admin)
POST/v1/loadtest/start, /v1/loadtest/stopStart or stop it. E-commerce: {"workload": "commerce", "users": n, "transactions": n (0 = until stopped), "shoppers", "staff", "managers" (percent, adding to 100), "pace": "realistic" | "maximum", "rampSeconds": n, "budgetUsd": n}; social network: {"workload": "social", "users": n, "transactions": n, "members", "creators", "moderators" (percent, adding to 100), "pace", "rampSeconds"}; simple: {"workload": "simple", "intensity": "light" | "medium" | "heavy"}
POST/v1/loadtest/users{"users": n}: change the users of a running e-commerce test
GET/v1/loadtest/reportThe last e-commerce run's final report (rules, events, operations, timeline)
GET/v1/loadtest/log?after=<seq>Its log lines after a sequence number
PUT, DELETE/v1/loadtest/aiSet ({"url", "model", "key"}; the key is checked with the provider, then sealed) or remove the AI provider
GET/v1/enginesEvery engine checked now (server admin): overall status, and per engine status (ok, idle, warn, error, off), summary, metrics, items per database
GET/metricsPrometheus

SQL and data

MethodPathBody / query
POSTquery{"sql", "params": []}
POSTtransaction{"statements": [{"sql", "params"}]}, all or nothing
POSTtxBegins an interactive transaction; then /v1/tx/<id>/query, /commit, /rollback
GETschemaTables, columns, indexes, policies, grants
POSTverifyIntegrity check
GET, POSTbackupsList, take
GETaudit?limit=Audit log
GET, POSTkeys; DELETE keys/<id>Role keys
POSTtokens{"ttlSeconds"} short-lived token
GETchanges?since=&limit=The change feed; WebSocket at /v1/db/<name>/changes/ws?since=&token=
GETflow?seconds=&after=What moved between the engines in the last seconds (up to 300), events after id after: kind (request, write, change, index, publish, consume, ack, retry, dead, commit), from, to, and the table, row id, columns changed, change number, stream, partition, offset, count and time taken that apply; never row contents (database admin). WebSocket at /v1/db/<name>/flow/ws?token=

FlashCache

MethodPathDoes
GET, DELETEcacheStats, flush
GET, PUT, DELETEcache/<key>Read, write (?ttl=), delete
POSTcache/command{"args": ["HSET", "h", "f", "v"]}, any command

PulseStream

MethodPathDoes
GET, POSTstreamsList, create ({"name", "partitions", "config"})
GET, POST, PATCH, DELETEstreams/<name>Read (?from=&limit=&partition=), publish, change config, delete
GETstreams/<name>/offsetsOffsets per partition
POSTstreams/<name>/compact, streams/<name>/trimCompaction, trimming
GET, DELETEstreams/<name>/groups/<group>Lag, reset
POSTstreams/<name>/groups/<group>/next, /ack, /nackConsume, acknowledge, retry or dead-letter
GETgroups; GET, DELETE groups/<group>Kafka consumer groups
POSTgroups/<group>/join, /heartbeat, /leave, /commit; GET /offsetsGroup membership and offsets
WS/v1/db/<name>/streams/<name>/wsMessages pushed as they arrive

ObjectCore

MethodPathDoes
GET, POSTbucketsList, create ({"name", "public"})
PATCH, DELETEbuckets/<bucket>Change, delete
GETobjects/<bucket>?prefix=&delimiter=List
GET, HEAD, PUT, DELETEobjects/<bucket>/<key>Object
any/s3/…The S3 API (SigV4)
GET/o/<db>/<bucket>/<key>Public buckets, no credentials

TrackSense

MethodPathDoes
GETsearch?q=&table=&limit=Ranked hits with highlights
GET, POSTsearch/indexesStatus and lag, index a table ({"table", "fields", "tenantColumn"})
DELETEsearch/indexes/<table>Remove
POSTsearch/indexes/<table>/rebuildRebuild

Migrations

MethodPathDoes
POSTmigrations/inspect{"source"}: what will carry over
GET, POSTmigrationsList, start ({"source", "follow", "prefix", "tables"})
GET, DELETEmigrations/<id>Progress, remove
POSTmigrations/<id>/cutover, /rollback, /cancelSteps

Run as

An admin can send x-propus-run-as with a role, tenant and user to see exactly what that caller would; the console's Run as uses it.