API Reference
Base URL: https://api.axiom.io/v1. All requests must include Authorization: Bearer <key>. All responses are JSON.
Streams
GET
/streams
List all streams in your account.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number (default: 1) |
| limit | integer | Items per page, max 100 (default: 20) |
POST
/streams
Create a new stream.
| Body field | Type | Description |
|---|---|---|
| name | string | Unique stream name (required) |
| partitions | integer | Number of partitions (default: 6) |
| retention_days | integer | Event retention in days |
| schema_id | string | Schema to enforce (optional) |
DELETE
/streams/:name
Delete a stream and all its events. This is irreversible.
Events
POST
/streams/:name/events
Publish one or more events to a stream. Accepts a JSON array or NDJSON body.
| Body field | Type | Description |
|---|---|---|
| events | array | Array of event objects |
| events[].timestamp | ISO8601 | Event time (defaults to now) |
| events[].partition_key | string | Key for partition routing |
Query
POST
/query
Execute a SQL query across one or more streams.
| Body field | Type | Description |
|---|---|---|
| sql | string | SQL query string (required) |
| timeout_ms | integer | Query timeout (default: 30000) |
| format | string | "rows" or "arrow" (default: "rows") |
Schemas
POST
/schemas
Register a new schema. Supports Avro, Protobuf, and JSON Schema.
| Body field | Type | Description |
|---|---|---|
| name | string | Schema name (required) |
| format | string | "avro" | "protobuf" | "json" |
| definition | string | Schema definition (required) |
| compatibility | string | "BACKWARD" | "FORWARD" | "FULL" | "NONE" |