Entries represent the data within your configured Streams. Use the Entries API to interact with streams data.
Return paginated entries from a configured stream:
GET
/api/streams/{stream}/entries
curl --location --request GET 'http://127.0.0.1:8000/api/streams/{stream}/entries'
{
"errors": [],
"links": {
"self": "http://127.0.0.1:8000/api/streams/examples/entries",
"streams": "http://127.0.0.1:8000/api/streams",
"stream": "http://127.0.0.1:8000/api/streams/examples",
"entries": "http://127.0.0.1:8000/api/streams/examples/entries",
"first_page": "http://127.0.0.1:8000/api/streams/examples/entries?page=1",
"next_page": null,
"previous_page": null
},
"meta": {
"parameters": {
"stream": "examples"
},
"stream": "examples",
"total": 2,
"per_page": 100,
"last_page": 1,
"current_page": 1
},
"data": [
{
"id": "454eddee-5e72-3f40-ae98-99d4bc88410a",
"user": "6bab6d9d-44c8-379f-842b-16b0ebb6fd71",
"name": "Test Example"
},
{
"id": "a2f2647d-8232-403b-b266-f333c8c3f6cb",
"user": "7e947900-2be1-315b-89b8-c28ae715969f",
"name": "Another Test"
}
]
}
Use the per_page
and page
options to control the amount of entries per page and specific page to return.
curl --location --request GET 'http://127.0.0.1:8000/api/streams/{stream}/entries?per_page=15&page=5'
You may filter entries by providing field constraint options.
curl --location --request GET '/api/streams/{stream}/entries?where[field]=value&constraint[fiel]=operator'
You may specify sorting and ordering within the JSON array of criteria parameters.
curl --location --request GET '/api/streams/{stream}/entries?orderBy[field]=asc|desc'
Create a new entry for a configured stream:
POST
/api/streams/{stream}/entries
curl --location --request POST '/api/streams/{stream}/entries' \
-H 'Content-Type: application/json' \
-d '{"user": "7e947900-2be1-315b-89b8-c28ae715969f", "name": "Example Entry"}'
{
"errors": [],
"links": {
"self": "http://127.0.0.1:8000/api/streams/examples/entries",
"streams": "http://127.0.0.1:8000/api/streams",
"stream": "http://127.0.0.1:8000/api/streams/examples",
"entries": "http://127.0.0.1:8000/api/streams/examples/entries",
"location": "http://127.0.0.1:8000/api/streams/examples/entries/2b91e2fd-fc16-4f5a-becb-5b74b07ac48d"
},
"meta": {
"payload": {
"user": "7e947900-2be1-315b-89b8-c28ae715969f",
"name": "Example Entry"
},
"parameters": {
"stream": "examples"
},
"stream": "examples"
},
"data": {
"id": "2b91e2fd-fc16-4f5a-becb-5b74b07ac48d",
"user": "7e947900-2be1-315b-89b8-c28ae715969f",
"name": "Example Entry"
}
}
Return a single entry for a configured stream:
GET
/api/streams/{stream}/entries/{entry}
curl --location --request GET 'http://127.0.0.1:8000/api/streams/{stream}/entries/{entry}'
{
"errors": [],
"links": {
"self": "http://127.0.0.1:8000/api/streams/examples/entries/2b91e2fd-fc16-4f5a-becb-5b74b07ac48d",
"streams": "http://127.0.0.1:8000/api/streams",
"stream": "http://127.0.0.1:8000/api/streams/examples",
"entries": "http://127.0.0.1:8000/api/streams/examples/entries",
"user": "http://127.0.0.1:8000/api/streams/users/entries/7e947900-2be1-315b-89b8-c28ae715969f"
},
"meta": {
"parameters": {
"stream": "examples",
"entry": "2b91e2fd-fc16-4f5a-becb-5b74b07ac48d"
},
"stream": "examples"
},
"data": {
"id": "2b91e2fd-fc16-4f5a-becb-5b74b07ac48d",
"user": "7e947900-2be1-315b-89b8-c28ae715969f",
"name": "Example Entry"
}
}
Update specific values of an entry in a configured stream:
PATCH
/api/streams/{stream}/entries/{entry}
If the entry does not exist the API will attempt to create one with the given values.
curl --location --request PATCH '/api/streams/{stream}/entries/{entry}' \
-H 'Content-Type: application/json' \
-d '{"name": "Updated Entry"}'
{
"errors": [],
"links": {
"self": "http://127.0.0.1:8000/api/streams/examples/entries/2b91e2fd-fc16-4f5a-becb-5b74b07ac48d",
"streams": "http://127.0.0.1:8000/api/streams",
"stream": "http://127.0.0.1:8000/api/streams/examples",
"entries": "http://127.0.0.1:8000/api/streams/examples/entries"
},
"meta": {
"payload": {
"name": "Updated Entry"
},
"parameters": {
"stream": "examples",
"entry": "2b91e2fd-fc16-4f5a-becb-5b74b07ac48d"
},
"stream": "examples"
},
"data": {
"id": "2b91e2fd-fc16-4f5a-becb-5b74b07ac48d",
"user": "7e947900-2be1-315b-89b8-c28ae715969f",
"name": "Updated Entry"
}
}
Replace values of an entry in a configured stream:
PUT
/api/streams/{stream}/entries/{entry}
If the entry does not exist the API will attempt to create one with the given values.
curl --location --request PUT '/api/streams/{stream}/entries/{entry}' \
-H 'Content-Type: application/json' \
-d '{"name": "Updated Entry"}'
{
"errors": [],
"links": {
"self": "http://127.0.0.1:8000/api/streams/examples/entries/2b91e2fd-fc16-4f5a-becb-5b74b07ac48d",
"streams": "http://127.0.0.1:8000/api/streams",
"stream": "http://127.0.0.1:8000/api/streams/examples",
"entries": "http://127.0.0.1:8000/api/streams/examples/entries"
},
"meta": {
"payload": {
"name": "Updated Entry"
},
"parameters": {
"stream": "examples",
"entry": "2b91e2fd-fc16-4f5a-becb-5b74b07ac48d"
},
"stream": "examples"
},
"data": {
"id": "2b91e2fd-fc16-4f5a-becb-5b74b07ac48d",
"user": null,
"name": "Updated Entry"
}
}
Deletes an entry from a configured stream. Successful delete requests return an empty 204 response.
DELETE
/api/streams/{stream}/entries/{entry}
curl --location --request DELETE '/api/streams/{stream}/entries' \
-H 'Content-Type: application/json' \
-d '{"name": "Updated Entry"}'
A blank TALL-stack Laravel project with Streams.
The fundamental features and utilities offered by the Streams platform.
A universal and extensible RESTful API for Streams.
Extensible, user-friendly, and performant control panel, components, and services.
Dev tooling for Laravel Streams.