Practice event-stream consumers, Last-Event-ID resume behavior, duplicates and out-of-order detection.
The Event Streams API serves Server-Sent Events with replay cursors, heartbeats and guaranteed ordering. Streaming is where test suites usually stop, because a long-lived response is awkward to assert on — this one is built to make that assertable, with a Last-Event-ID cursor you can reconnect from.
Base URL: https://funapi.dev/api/streams/v1 · 3 endpoints · OpenAPI 3.1 spec and Postman collection available. New here? Read the getting started guide.
GET https://funapi.dev/api/streams/v1/events — Read events as JSON or text/event-stream. No token, no signup:
curl -i https://funapi.dev/api/streams/v1/events
answers 200 OK with:
{
"total": 12,
"data": [
{
"id": 1,
"type": "lap.completed",
"lap": 1,
"position": 1
},
{
"id": 2,
"type": "lap.completed",
"lap": 2,
"position": 2
},
{
"id": 3,
"type": "lap.completed",
"lap": 3,
"position": 3
},
{
"id": 4,
"type": "lap.completed",
"lap": 4,
"position": 4
},
{
"id": 5,
"type": "lap.completed",
"lap": 5,
"position": 1
},
{
"id": 6,
"type": "lap.completed",
"lap": 6,
"position": 2
},
{
"id": 7,
"type": "lap.completed",
"lap": 7,
"position": 3
},
{
"id": 8,
"type": "lap.completed",
"lap": 8,
"position": 4
},
{
"id": 9,
"type": "lap.completed",
"lap": 9,
"position": 1
},
{
"id": 10,
"type": "lap.completed",
"lap": 10,
"position": 2
},
{
"id": 11,
"type": "lap.completed",
"lap": 11,
"position": 3
},
{
"id": 12,
(truncated — the full response comes back when you run it)
stream and replay
GET /streams/v1/events — Read events as JSON or text/event-stream · Responds with 200 Link to this endpointGET /streams/v1/events/{id} — Replay one event by id · Responds with 200 404 Link to this endpointPOST /streams/v1/events — Publish a custom event (requires Bearer auth) · Responds with 202 Link to this endpointLast updated