Timeline
POST/api/v1/timeline/events
Authorization
bearer_token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request to create a single event
Response Body
application/json
curl -X POST "https://example.com/api/v1/timeline/events" \ -H "Content-Type: application/json" \ -d '{ "data": null, "stream": "string", "type": "string" }'{ "event_id": "string", "sequence": 0, "stream": "string", "timestamp": 0}GET/api/v1/timeline/events/aggregate
Authorization
bearer_token In: header
Query Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/timeline/events/aggregate?stream=string&start=string&end=string&aggregation=string&field=string"{ "aggregation": "string", "field": "string", "groups": [ { "key": "string", "value": 0.1 } ], "result": 0.1}POST/api/v1/timeline/events/batch
Authorization
bearer_token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request to create multiple events
Response Body
application/json
curl -X POST "https://example.com/api/v1/timeline/events/batch" \ -H "Content-Type: application/json" \ -d '{ "events": [ { "data": null, "type": "string" } ], "stream": "string" }'{ "events": [ { "event_id": "string", "sequence": 0 } ], "stored": 0}GET/api/v1/timeline/events/count
Authorization
bearer_token In: header
Query Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/timeline/events/count?stream=string&start=string&end=string&interval=string"{ "counts": [ { "count": 0, "end": "string", "start": "string", "timestamp": 0 } ], "interval": "string", "total": 0}GET/api/v1/timeline/events/query
Authorization
bearer_token In: header
Query Parameters
Stream name
Conditions as filter[][]=. Conditions on different fields all apply. in (any of) and all (every one of, on fields holding several values) take a comma-separated list (\, for a literal comma). exists takes true or false. Datetimes are RFC 3339, now, or a time before now such as -30m, -6h or -7d.
Comma-separated sort keys, - for descending, at most 1. Keys: timestamp. Default: timestamp.
Rows per page, 1 to 100 (default 25).
1 <= value <= 100The page.next_cursor of the previous page. Cannot be combined with page.
Response Body
application/json
curl -X GET "https://example.com/api/v1/timeline/events/query?stream=string"{ "events": [ { "data": null, "id": "string", "sequence": 0, "stream": "string", "tags": [ "string" ], "timestamp": 0, "type": "string" } ], "page": { "has_more": true, "next_cursor": "string", "page": 0, "total": 0 }}GET/api/v1/timeline/streams
Authorization
bearer_token In: header
Query Parameters
Conditions as filter[][]=. Conditions on different fields all apply. in (any of) and all (every one of, on fields holding several values) take a comma-separated list (\, for a literal comma). exists takes true or false. Datetimes are RFC 3339, now, or a time before now such as -30m, -6h or -7d.
Full-text search over this list's searchable fields.
1 <= length <= 200Comma-separated sort keys, - for descending, at most 1. Keys: event_count, created_at. Default: -created_at.
Rows per page, 1 to 100 (default 25).
1 <= value <= 100The page.next_cursor of the previous page. Cannot be combined with page.
A 1-based page number, for jumping. Cannot be combined with cursor.
1 <= valueSet to true to include the number of matching rows in page.total.
Response Body
application/json
curl -X GET "https://example.com/api/v1/timeline/streams"{ "page": { "has_more": true, "next_cursor": "string", "page": 0, "total": 0 }, "streams": [ { "event_count": 0, "name": "string", "newest_event": 0, "oldest_event": 0, "retention_days": 0, "size_bytes": 0, "tags": [ "string" ] } ]}POST/api/v1/timeline/streams
Authorization
bearer_token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Create stream request
Response Body
curl -X POST "https://example.com/api/v1/timeline/streams" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'DELETE/api/v1/timeline/streams/{name}
Authorization
bearer_token In: header
Path Parameters
Stream name to delete
Response Body
curl -X DELETE "https://example.com/api/v1/timeline/streams/string"GET/api/v1/timeline/streams/{name}/stats
Authorization
bearer_token In: header
Path Parameters
Stream name
Response Body
application/json
curl -X GET "https://example.com/api/v1/timeline/streams/string/stats"nullGET/api/v1/timeline/streams/{stream}/follow
After a successful upgrade the server pushes a [TimelineWebSocketMessage::Event]
for every event appended to the stream from the moment of subscription. The
client may send an unsubscribe control message or close the socket to stop.
Authorization
bearer_token In: header
Path Parameters
Stream name to follow
Query Parameters
JWT token (alternative to the Authorization header for browser clients)
Response Body
curl -X GET "https://example.com/api/v1/timeline/streams/string/follow"