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.

ParamTypeDescription
pageintegerPage number (default: 1)
limitintegerItems per page, max 100 (default: 20)
POST /streams

Create a new stream.

Body fieldTypeDescription
namestringUnique stream name (required)
partitionsintegerNumber of partitions (default: 6)
retention_daysintegerEvent retention in days
schema_idstringSchema 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 fieldTypeDescription
eventsarrayArray of event objects
events[].timestampISO8601Event time (defaults to now)
events[].partition_keystringKey for partition routing

Query

POST /query

Execute a SQL query across one or more streams.

Body fieldTypeDescription
sqlstringSQL query string (required)
timeout_msintegerQuery timeout (default: 30000)
formatstring"rows" or "arrow" (default: "rows")

Schemas

POST /schemas

Register a new schema. Supports Avro, Protobuf, and JSON Schema.

Body fieldTypeDescription
namestringSchema name (required)
formatstring"avro" | "protobuf" | "json"
definitionstringSchema definition (required)
compatibilitystring"BACKWARD" | "FORWARD" | "FULL" | "NONE"