API
Public RawTree API reference.
API reference
This page covers the public RawTree API surface from the OpenAPI spec.
Machine-readable spec:
https://api.rawtree.com/v1/openapi.jsonBase URL:
https://api.rawtree.comMost endpoints use bearer authentication:
Authorization: Bearer rw_...Health
GET /health
Check service health.
Response:
{"status":"ok"}Projects
GET /v1/projects
List projects available to the authenticated user.
POST /v1/projects
Create a project.
{"name":"analytics"}If name is omitted, RawTree generates one.
PATCH /v1/projects/{project}
Rename a project.
{"name":"analytics_v2"}DELETE /v1/projects/{project}
Delete a project and its data.
Query
POST /v1/query
Execute a read-only SQL query.
{"sql":"SELECT * FROM events LIMIT 10"}Response shape:
{
"meta": [{"name":"action","type":"String"}],
"data": [{"action":"click"}],
"rows": 1,
"statistics": {"elapsed": 0.001, "rows_read": 1, "bytes_read": 128},
"hints": []
}Logs
GET /v1/logs
List insert and query logs.
Query parameters:
| Parameter | Description |
|---|---|
start_time | Inclusive lower bound. |
end_time | Inclusive upper bound. |
limit | Rows to return. Default 50, max 200. |
offset | Rows to skip. |
search | Structured filter string. |
Search filters:
type:select
type:insert
status:success
status:error
table:events,auditExample:
type:insert status:error table:eventsTables
GET /v1/tables
List tables in the current project.
GET /v1/tables/{table}
Describe a table.
POST /v1/tables/{table}
Insert data. Send one JSON object or an array of JSON objects.
[{"action":"click","user":"alice"}]Optional transform for JSON body inserts:
POST /v1/tables/traces?transform=otlp-tracesTransforms flatten known source formats before insert.
See Transforms for supported input shapes and emitted rows.
Supported transforms:
otlp-tracesotlp-logsotlp-metricscloudwatch-logscloudtrail
URL ingest uses query parameters:
POST /v1/tables/events?url=https%3A%2F%2Fexample.com%2Fevents.jsonlTransforms are not supported with URL inserts. If you use ?url=, transform the data before hosting it.
DELETE /v1/tables/{table}
Delete a table. Requires admin permission.
API keys
GET /v1/keys
List API keys for the current project.
POST /v1/keys
Create an API key.
{"name":"my-agent","permission":"read_write"}Valid permissions:
adminread_writewrite_onlyread_only
DELETE /v1/keys/{id_or_token}
Delete an API key by UUID or full rw_... token.