Stream
API for creating stream models. A stream is the same as a [data stream](https://learn.lytics.com/product-docs/data-management/using-data-streams#what-are-data-streams?
) and is consumed for ingestion into a given entity table. It is described by its slug, which is the value used to identify the stream in collection as well as in the FROM statement on a given query.
Retrieve a Single Stream
https://api.lytics.io/api/stream/{id}Get a stream according to its ID.
{
"data": [
{
"account_id": "d8e403de6fbf0090b17b42a2bb37716e",
"aid": 2,
"channel": "email",
"created": "2018-07-31T22:41:21.908Z",
"hidden": false,
"id": "765ed319ddc918e6bb5f9b1d6359a3c4",
"method": "",
"providers": [],
"slug": "hellow",
"tables": [],
"updated": "2018-07-31T22:41:21.908Z"
}
],
"message": "success",
"status": 200
}Update a Stream
https://api.lytics.io/api/stream/{id}Update a stream with a given ID. The parameters listed below provided in the PUT request will overwrite the current parameters in the model.
Stream attributes that a user is able to update:
* *slug* (string) ... raw value of the stream as it appears in both queries and collection
* *channel* (string, optional) ... method by which this stream collects data. Only allowable channel types: web, email, mobile, ad, sms, pos
* *label* (string, optional) ... user assignable label, for display in the UI
* *description* (string, optional) ... user assignable description
* *providers* ([]string, optional) ... names of the providers that send data on this stream
{
"data": [
{
"account_id": "d8e403de6fbf0090b17b42a2bb37716e",
"aid": 2,
"channel": "email",
"created": "2018-07-31T22:41:21.908Z",
"hidden": false,
"id": "765ed319ddc918e6bb5f9b1d6359a3c4",
"method": "",
"providers": [],
"slug": "hellow",
"tables": [],
"updated": "2018-07-31T22:41:21.908Z"
}
],
"message": "success",
"status": 200
}Delete a Stream
https://api.lytics.io/api/stream/{id}Delete a stream with a given ID.
OK
Retrieve a List of Streams from Account
https://api.lytics.io/api/streamGet a list of all the streams for an account
OK
Create a Stream
https://api.lytics.io/api/streamJSON Parameters:
* *slug* (string) ... raw value of the stream as it appears in both queries and collection
* *channel* (string) ... method by which this stream collects data. Only allowable channel types: web, email, mobile, ad, sms, pos
* *label* (string, optional) ... user assignable label, for display in the UI
* *description* (string, optional) ... user assignable description
* *tables* ([]string, optional) ... names of the tables to which this stream writes
* *providers* ([]string, optional) ... names of the providers that send data on this stream
* *hidden* (bool, optional) ... whether stream is hidden in stream stats?
* *method* (string, optional) ... either 'bulk' or 'streaming'
{
"data": [
{
"account_id": "d8e403de6fbf0090b17b42a2bb37716e",
"aid": 2,
"channel": "email",
"created": "2018-07-31T22:41:21.908Z",
"hidden": false,
"id": "765ed319ddc918e6bb5f9b1d6359a3c4",
"method": "",
"providers": [],
"slug": "hellow",
"tables": [],
"updated": "2018-07-31T22:41:21.908Z"
}
],
"message": "success",
"status": 200
}