List Streams
https://api.lytics.io/v2/streamList all streams in the account
{
"_meta": {},
"data": [
{
"account_id": "string",
"aid": 0,
"anomaly_rule": {
"aid": 0,
"checks": [
{
"allowable_violations": 0,
"interval": "string",
"lookback_count": 0,
"max_threshold": 0,
"metric_type": "string",
"min_threshold": 0,
"type": "string",
"variance_pct": 0
}
],
"created": "string",
"id": "string",
"subject_id": "string",
"subject_type": "string",
"updated": "string"
},
"avg_event_size": 0,
"channel": "string",
"count": 0,
"created": "2019-08-24T14:15:22Z",
"description": "string",
"hidden": true,
"id": "string",
"internal": true,
"jobs": [
"string"
],
"label": "string",
"last_msg_ts": "2019-08-24T14:15:22Z",
"last_received_ts": "2019-08-24T14:15:22Z",
"last_update_ts": "2019-08-24T14:15:22Z",
"method": "string",
"name": "string",
"providers": [
"string"
],
"slug": "string",
"tables": [
"string"
],
"updated": "2019-08-24T14:15:22Z"
}
],
"request_id": "string",
"status": 0
}List Stream rules
https://api.lytics.io/v2/stream/ruleList all stream rules in the account
{
"_meta": {},
"data": [
{
"account_id": "string",
"active": true,
"aid": 0,
"created": "string",
"expression": "string",
"id": "string",
"input": "string",
"modified": "string",
"name": "string",
"output": "string",
"priority": 0
}
],
"request_id": "string",
"status": 0
}Create stream rule
https://api.lytics.io/v2/stream/ruleCreate a stream rule
{
"account_id": "string",
"active": true,
"aid": 0,
"created": "string",
"expression": "string",
"id": "string",
"input": "string",
"modified": "string",
"name": "string",
"output": "string",
"priority": 0
}{
"_meta": {},
"data": {
"account_id": "string",
"active": true,
"aid": 0,
"created": "string",
"expression": "string",
"id": "string",
"input": "string",
"modified": "string",
"name": "string",
"output": "string",
"priority": 0
},
"request_id": "string",
"status": 0
}Get Stream rule
https://api.lytics.io/v2/stream/rule/{id}Get stream rule by id
{
"_meta": {},
"data": {
"account_id": "string",
"active": true,
"aid": 0,
"created": "string",
"expression": "string",
"id": "string",
"input": "string",
"modified": "string",
"name": "string",
"output": "string",
"priority": 0
},
"request_id": "string",
"status": 0
}Update stream rule
https://api.lytics.io/v2/stream/rule/{id}Update a stream rule
{
"account_id": "string",
"active": true,
"aid": 0,
"created": "string",
"expression": "string",
"id": "string",
"input": "string",
"modified": "string",
"name": "string",
"output": "string",
"priority": 0
}{
"_meta": {},
"data": {
"account_id": "string",
"active": true,
"aid": 0,
"created": "string",
"expression": "string",
"id": "string",
"input": "string",
"modified": "string",
"name": "string",
"output": "string",
"priority": 0
},
"request_id": "string",
"status": 0
}Update stream rule
https://api.lytics.io/v2/stream/rule/{id}Update a stream rule
{
"account_id": "string",
"active": true,
"aid": 0,
"created": "string",
"expression": "string",
"id": "string",
"input": "string",
"modified": "string",
"name": "string",
"output": "string",
"priority": 0
}{
"_meta": {},
"data": {
"account_id": "string",
"active": true,
"aid": 0,
"created": "string",
"expression": "string",
"id": "string",
"input": "string",
"modified": "string",
"name": "string",
"output": "string",
"priority": 0
},
"request_id": "string",
"status": 0
}Delete stream rule
https://api.lytics.io/v2/stream/rule/{id}Delete stream rule by id
{
"_meta": {},
"data": {
"account_id": "string",
"active": true,
"aid": 0,
"created": "string",
"expression": "string",
"id": "string",
"input": "string",
"modified": "string",
"name": "string",
"output": "string",
"priority": 0
},
"request_id": "string",
"status": 0
}Get Stream
https://api.lytics.io/v2/stream/{name}Get stream by name
{
"_meta": {},
"data": {
"account_id": "string",
"aid": 0,
"anomaly_rule": {
"aid": 0,
"checks": [
{
"allowable_violations": 0,
"interval": "string",
"lookback_count": 0,
"max_threshold": 0,
"metric_type": "string",
"min_threshold": 0,
"type": "string",
"variance_pct": 0
}
],
"created": "string",
"id": "string",
"subject_id": "string",
"subject_type": "string",
"updated": "string"
},
"avg_event_size": 0,
"channel": "string",
"count": 0,
"created": "2019-08-24T14:15:22Z",
"description": "string",
"hidden": true,
"id": "string",
"internal": true,
"jobs": [
"string"
],
"label": "string",
"last_msg_ts": "2019-08-24T14:15:22Z",
"last_received_ts": "2019-08-24T14:15:22Z",
"last_update_ts": "2019-08-24T14:15:22Z",
"method": "string",
"name": "string",
"providers": [
"string"
],
"slug": "string",
"tables": [
"string"
],
"updated": "2019-08-24T14:15:22Z"
},
"request_id": "string",
"status": 0
}Get Stream Events
https://api.lytics.io/v2/stream/{name}/eventsGet a list of recent events in the stream
{
"_meta": {},
"data": [
{}
],
"request_id": "string",
"status": 0
}Get Stream Stats
https://api.lytics.io/v2/stream/{name}/statsGet stats for all fields in the stream
{
"_meta": {},
"data": [
{
"avg": 0,
"card": 0,
"columns": [
{
"as": "string",
"table": "string"
}
],
"first_seen": "2019-08-24T14:15:22Z",
"hidden": true,
"is_array": true,
"last_seen": "string",
"name": "string",
"sample": [
"string"
],
"sumlen": 0,
"type": "string",
"usage": 0
}
],
"request_id": "string",
"status": 0
}