Endpoints

Entries

List

Return entries within a configured stream.

GET /api/streams/{stream}/entries

{
    "data": [
        {
            "title": "Hello World"
        }
    ],
    "links": {...},
    "meta": {...}
}

Create

Create a new entry.

POST /api/streams/{stream}/entries

curl --location --request POST '/api/streams/{stream}/entries' \
    --form 'id="hello_world"' \
    --form 'title="Hello World"'

Return result:

{
    "data": [
        {
            "id": "hello_world",
            "title": "Hello World"
        }
    ],
    "links": {...},
    "meta": {...}
}

Show

Return a single entry.

GET /api/streams/{stream}/entries/{entry}

{
    "data": [
        {
            "title": "Hello World"
        }
    ],
    "links": {...},
    "meta": {...}
}

Update

To update select values of an entry, use patch.

PATCH /api/streams/{stream}/entries/{entry}

To replace the entry attributes entirely, use put.

PUT /api/streams/{stream}/entries/{entry}

curl --location --request PATCH '/api/streams/{stream}/entries/{entry}' \
    --form 'title="Hello World!"'

Return result:

{
    "data": [
        {
            "id": "hello_world",
            "title": "Hello World!"
        }
    ],
    "links": {...},
    "meta": {...}
}

Delete

Deletes an entry.

DELETE /api/streams/{stream}/entries/{entry}

{
    "data": [],
    "links": {...},
    "meta": {...}
}

Streams

List

Return configured streams.

GET /api/streams/{stream}

{
    "data": {...},
    "links": {...},
    "meta": {...}
}

Create

Create a new stream.

POST /api/streams

curl --location --request POST '/api/streams' \
    --form 'id="contacts"' \
    --form 'name="Contacts"' \
    --form 'fields="{...}"'

Return result:

{
    "data": [
        {
            "id": "contacts",
            "name": "Contacts"
        }
    ],
    "links": {...},
    "meta": {...}
}

Show

Return a single stream.

GET /api/streams/{stream}

{
    "data": [
        {
            "name": "Contacts"
        }
    ],
    "links": {...},
    "meta": {...}
}

Update

To update select values of a stream, use patch.

PATCH /api/streams/{stream}

To replace the attributes entirely, use put.

PUT /api/streams/{stream}

curl --location --request PATCH '/api/streams/{stream}' \
    --form 'description="A simple contacts listing."'

Return result:

{
    "data": [
        {
            "title": "Contacts",
            "description": "A simple contacts listing."
        }
    ],
    "links": {...},
    "meta": {...}
}

Delete

Deletes an stream.

DELETE /api/streams/{stream}

{
    "data": [],
    "links": {...},
    "meta": {...}
}

Querying

You can manipulate the query using criteria parameters in the URI.

Filtering

/api/streams?q={"where": [["id", "LIKE", "%doc%"]]}

Sorting

/api/streams/docs/entries?q={"where": [["enabled", true]]}