Streams represent the data structures within your application. Use the Streams API to manage data structures.
If you want to access the data within a configured stream, use the Entries API.
Return a paginated list of configured streams:
GET
/api/streams
curl --location --request GET 'http://127.0.0.1:8000/api/streams'
{
"errors": [],
"links": {
...
},
"meta": {
"total": 2,
"per_page": 100,
"last_page": 1,
"current_page": 1
},
"data": [
...
]
}
Use the per_page
and page
options to control the amount of streams per page and specific page to return.
curl --location --request GET 'http://127.0.0.1:8000/api/streams?per_page=15&page=5'
You may filter streams by providing a JSON array of criteria parameters.
curl --location --request GET '/api/streams' \
-H 'Content-Type: application/json' \
-d '{"parameters": [{"where": ["name", "LIKE", "%Docs%"]}]}'
You may specify sorting and ordering within the JSON array of criteria parameters.
curl --location --request GET '/api/streams' \
-H 'Content-Type: application/json' \
-d '{"parameters": [{"order_by": ["name", "asc"]}]}'
Create a new stream:
POST
/api/streams
curl --location --request POST '/api/streams/{stream}' \
-H 'Content-Type: application/json' \
-d '{"id": "examples", "name": "Examples"}'
{
"errors": [],
"links": {
"self": "http://127.0.0.1:8000/api/streams",
"streams": "http://127.0.0.1:8000/api/streams",
"entries": "http://127.0.0.1:8000/api/streams/examples/entries",
"location": "http://127.0.0.1:8000/api/streams/examples"
},
"meta": {
"payload": {
"id": "examples",
"name": "Examples"
},
"stream": "streams"
},
"data": {
"id": "examples",
"name": "Examples"
}
}
Return a single stream:
GET
/api/streams/{stream}
curl --location --request GET 'http://127.0.0.1:8000/api/streams/{stream}'
{
"errors": [],
"links": {
"self": "http://127.0.0.1:8000/api/streams/examples",
"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": {
"parameters": {
"stream": "examples"
},
"stream": "streams"
},
"data": {
"id": "examples",
"name": "Examples"
}
}
Update specific values of a stream:
PATCH
/api/streams/{stream}
If the stream does not exist the API will attempt to create one with the given values.
curl --location --request PATCH '/api/streams/{stream}' \
-H 'Content-Type: application/json' \
-d '{"description": "Example stream data."}'
{
"errors": [],
"links": {
"self": "http://127.0.0.1:8000/api/streams/examples",
"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": {
"description": "Example stream data."
},
"parameters": {
"stream": "examples"
},
"stream": "streams"
},
"data": {
"id": "examples",
"name": "Updated Name",
"description": "Example stream data."
}
}
Replace values of a streams:
PUT
/api/streams/{stream}
If the stream does not exist the API will attempt to create one with the given values.
curl --location --request PUT '/api/streams/{stream}' \
-H 'Content-Type: application/json' \
-d '{"description": "Example stream data."}'
{
"errors": [],
"links": {
"self": "http://127.0.0.1:8000/api/streams/examples",
"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": {
"description": "Example stream data."
},
"parameters": {
"stream": "examples"
},
"stream": "streams"
},
"data": {
"description": "Example stream data.",
"id": "examples"
}
}
Deletes a stream. Successful delete requests return an empty 204 response.
DELETE
/api/streams/{stream}
curl --location --request DELETE '/api/streams/{stream}' \
-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.