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/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=

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.