Skip to content
Jobin Lawrance edited this page Jul 3, 2026 · 3 revisions

API

Tinybird-compatible. Existing client code works by changing only TINYBIRD_HOST. Bearer token in Authorization: Bearer <tok>.

Ingest

Method Path Scope
POST /v0/events?name={datasource} APPEND:<ds> / ADMIN
POST /v0/datasources?name={ds}&mode=append|replace&format=ndjson|csv APPEND:<ds> / ADMIN

/v0/events — NDJSON body, batched by the Gatherer, invalid rows quarantined. /v0/datasourcesbatch data import into an existing datasource (unknown → 404; definitions stay git + deploy). mode=replace truncates first. Returns a job you can poll at /v0/jobs/{id}.

Jobs

Method Path Notes
GET /v0/jobs recent jobs, newest first, scope-filtered
GET /v0/jobs/{id} one job's status (copy + import jobs)

Token management (ADMIN)

Method Path Notes
GET /v0/tokens list {name, scopes} — secret values never returned
POST /v0/tokens mint a token — value returned once in the response
DELETE /v0/tokens/{name} revoke

Tokens live in Redis (not git), so managing them over HTTP is fine. CLI equivalent: tinyraven token create / ls / rm.

Query published pipes

Method Path Notes
GET /v0/pipes/{name}.json + .csv, .ndjson, .parquet
POST /v0/pipes/{name}/copy run a copy pipe into its target datasource

Extra query params bind to the pipe's {{Type(param)}} template vars — as ClickHouse query parameters, never string-interpolated. Scope: READ:<pipe>.

Ad-hoc SQL

Method Path Scope
GET / POST /v0/sql ADMIN, read-only (readonly=2)

Introspection

GET /v0/datasources · /v0/datasources/{name} · /v0/pipes · /v0/pipes/{name}

Ops & docs

GET /health · /health/ready · /v0/metrics (Prometheus) · /tr/v1/openapi.json · /tr/v1/docs (when TR_DOCS_ENABLED=1)

Try it fast

Import the ready-made collection into Postman or Bruno: examples/tinyraven.postman_collection.json — set host + token, run.

Clone this wiki locally