Complete reference for the Tannur REST API and SDK methods.
All API requests require authentication using your API key in the Authorization header.
Authorization: Bearer YOUR_API_KEY/eventsAppend a new event to a stream
{
"stream": "orders",
"type": "ORDER_CREATED",
"data": {
"id": "ord_123",
"total": 99.99
}
}/events/:streamRead events from a stream
Query Parameters: limit, offset, after, before
/state/:streamGet the current state of a stream
/deployDeploy a projection or reducer function
await tannur.append(stream: string, event: Event)Append an event to a stream. Returns the event ID.
await tannur.read(stream: string, options?: ReadOptions)Read events from a stream. Returns an array of events.
tannur.subscribe(stream: string, callback: (event) => void)Subscribe to real-time updates on a stream.
await tannur.project(stream: string, reducer: Reducer)Create a projection by reducing events to state.