Get all streams, paged
Before you begin
-
If you don’t already have any Stream data in your workspace, you can use any Source of our Quix Library to set some up.
-
Get a Personal Access Token to authenticate each request.
Fetching all streams
The /streams
endpoint provides read access to all streams within the
workspace. Sending an empty JSON object in your request body will return all
streams.
Even if you’re not supplying any parameters, you must still send a valid empty object as JSON data in the body of your request. |
Example request
curl "https://${domain}.platform.quix.ai/streams" \
-H "Authorization: bearer ${token}" \
-H "Content-Type: application/json" \
-d "{}"
Example response
The JSON returned consists of an array of Stream objects:
[{
"streamId":"e6545c18-d20d-47bd-8997-f3f825c1a45c",
"name":"cardata",
"topic":"cardata",
"createdAt":"2021-03-31T13:04:43.368Z",
"lastUpdate":"2021-03-31T13:04:44.53Z",
"dataStart":1612191099000000000,
"dataEnd":1612191371000000000,
"status":"Closed",
"metadata":{},
"parents":[],
"location":"/static data/"
}]
Fetching streams page by page
To reduce the size of the response, you should page these results with the
paging
property. Include this in the JSON object you send in the body
of your request. The value of this property is an object with two members,
index
and length
:
index
-
The index of the page you want returned.
length
-
The number of items (i.e. streams) per page.
For example, to group all streams in pages of 10 and receive the 2nd page, use this value:
"paging": {
"index": 1,
"length": 10
}