Reference

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.json

Base URL:

https://api.rawtree.com

Most 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:

ParameterDescription
start_timeInclusive lower bound.
end_timeInclusive upper bound.
limitRows to return. Default 50, max 200.
offsetRows to skip.
searchStructured filter string.

Search filters:

type:select
type:insert
status:success
status:error
table:events,audit

Example:

type:insert status:error table:events

Tables

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-traces

Transforms flatten known source formats before insert.

See Transforms for supported input shapes and emitted rows.

Supported transforms:

  • otlp-traces
  • otlp-logs
  • otlp-metrics
  • cloudwatch-logs
  • cloudtrail

URL ingest uses query parameters:

POST /v1/tables/events?url=https%3A%2F%2Fexample.com%2Fevents.jsonl

Transforms 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:

  • admin
  • read_write
  • write_only
  • read_only

DELETE /v1/keys/{id_or_token}

Delete an API key by UUID or full rw_... token.