Sitelet https://funapi.dev/docs/streams

Event Streams API — free mock REST API for testing

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.

Example request and response

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)

Open and run this endpoint

What you can practise here

events

stream and replay

All 39 mock REST APIs

Use this response elsewhere

Last updated