Is AI recommending you? Ask Contentstack Canoe for free
Is AI recommending your brand? Find out with Contentstack Canoe for free
Contentstack.comAcademyLogin
CS-log-dark.svgCS-log-dark.svg
  • Changelog
  • APIs
  • SDKs

Platform

  • Solution Center
  • Marketplace
  • Changelog
  • Developers & IT
  • Business users
  • Digital leaders
  • Developer Fast Track
  • Plans & Pricing

Solutions

  • Retail
  • Travel and tourism
  • Financial services
  • Technology
  • Manufacturing
  • E-commerce
  • Localization
  • Personalization
  • Portals and knowledge bases

Resources

  • Academy
  • Docs
  • Contentstack for Developers
  • Agents Start Here
  • Product updates
  • Contentstack on Contentstack
  • Blog
  • Insights and analyst reports
  • The Forrester Wave™: Digital Experience Platforms, Q4 2025
  • Webinars
  • Podcasts
  • Glossary
  • Content generative library
  • Community
  • Headless CMS
  • Composable AXP
  • Personalization
  • CDP

Customers

  • Case Studies
  • Customer Care
  • Contentstack Experience Awards
  • Customer support

Partners

  • Overview
  • Find a partner
  • Login

Company

  • About us
  • News
  • Customer support portal
  • Contact

Social

  • Facebook
  • LinkedIn
  • Instagram
  • GitHub
  • YouTube
  • Discord
  • X
LegalTermsPrivacyTrust Center

Cookie settings

Copyright © 2026 Contentstack Inc. All rights reserved.
/
  1. Home
  2. APIs
  3. Lytics API
  4. Streams

Streams

markdownView as Markdown

Get metrics and events for data streams in your Lytics account.

List Streams

GEThttps://api.lytics.io/v2/stream

List all streams in the account

Hide Parameters

Query Parameters

account_idoptionalstring

The account ID. Defaults to the user's default account.

Headers

Authorizationoptionalstring

Sample Response
Status|200 OK
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
{
  "_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

GEThttps://api.lytics.io/v2/stream/rule

List all stream rules in the account

Hide Parameters

Query Parameters

account_idoptionalstring

The account ID. Defaults to the user's default account.

Headers

Authorizationoptionalstring

Sample Response
Status

Create stream rule

POSThttps://api.lytics.io/v2/stream/rule

Get Stream rule

GEThttps://api.lytics.io/v2/stream/rule/{id}

Get stream rule by id

Hide Parameters

URL Parameters

idrequiredstring

Stream rule id

Query Parameters

account_idoptionalstring

The account ID. Defaults to the user's default account.

Headers

Authorizationoptionalstring

Sample Response
Status|

Update stream rule

POSThttps://api.lytics.io/v2/stream/rule/{id}

Update stream rule

PUThttps://api.lytics.io/v2/stream/rule/{id}

Delete stream rule

DELETEhttps://api.lytics.io/v2/stream/rule/{id}

Delete stream rule by id

Hide Parameters

URL Parameters

idrequiredstring

Stream rule id

Query Parameters

account_idoptionalstring

The account ID. Defaults to the user's default account.

Headers

Authorizationoptionalstring

Sample Response
Status|

Get Stream

GEThttps://api.lytics.io/v2/stream/{name}

Get Stream Events

GEThttps://api.lytics.io/v2/stream/{name}/events

Get a list of recent events in the stream

Hide Parameters

URL Parameters

namerequiredstring

The Stream Name

Query Parameters

account_idoptionalstring

The account ID. Defaults to the user's default account.

Headers

Authorizationoptionalstring

Sample Response
Status|200 OK
12345678
{
  "_meta": {},
  "data": [
    {}
  ],
  "request_id": "string",
  "status": 0
}

Get Stream Stats

GEThttps://api.lytics.io/v2/stream/{name}/stats

Get stats for all fields in the stream

Hide Parameters

URL Parameters

namerequiredstring

The Stream Name

Query Parameters

account_idoptionalstring

The account ID. Defaults to the user's default account.

Headers

Authorizationoptionalstring

|
200 OK
1234567891011121314151617181920
{
  "_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 a stream rule

Sample Request
12345678910111213
{
  "account_id": "string",
  "active": true,
  "aid": 0,
  "created": "string",
  "expression": "string",
  "id": "string",
  "input": "string",
  "modified": "string",
  "name": "string",
  "output": "string",
  "priority": 0
}
Sample Response
Status|201 Created
123456789101112131415161718
{
  "_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
}
200 OK
123456789101112131415161718
{
  "_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 a stream rule

Sample Request
12345678910111213
{
  "account_id": "string",
  "active": true,
  "aid": 0,
  "created": "string",
  "expression": "string",
  "id": "string",
  "input": "string",
  "modified": "string",
  "name": "string",
  "output": "string",
  "priority": 0
}
Sample Response
Status|200 OK
123456789101112131415161718
{
  "_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 a stream rule

Sample Request
12345678910111213
{
  "account_id": "string",
  "active": true,
  "aid": 0,
  "created": "string",
  "expression": "string",
  "id": "string",
  "input": "string",
  "modified": "string",
  "name": "string",
  "output": "string",
  "priority": 0
}
Sample Response
Status|200 OK
123456789101112131415161718
{
  "_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
}
200 OK
123456789101112131415161718
{
  "_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 by name

Sample Response
Status|200 OK
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
{
  "_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
}
Sample Response
Status|200 OK
12345678910111213141516171819202122232425262728
{
  "_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
}
Hide Parameters

Query Parameters

account_idoptionalstring

The account ID. Defaults to the user's default account.

Headers

Authorizationoptionalstring

Body Parameters

account_idoptionalstring
activeoptionalboolean
aidoptionalinteger
createdoptionalstring
expressionoptionalstring

qlbridge expression

idoptionalstring
inputoptionalstring
modifiedoptionalstring
nameoptionalstring
outputoptionalstring
priorityoptionalinteger
Hide Parameters

URL Parameters

idrequiredstring

Stream rule id to update

Query Parameters

account_idoptionalstring

The account ID. Defaults to the user's default account.

Headers

Authorizationoptionalstring

Body Parameters

account_idoptionalstring
activeoptionalboolean
aidoptionalinteger
createdoptionalstring
expressionoptionalstring

qlbridge expression

idoptionalstring
inputoptionalstring
modifiedoptionalstring
nameoptionalstring
outputoptionalstring
priorityoptionalinteger
Hide Parameters

URL Parameters

idrequiredstring

Stream rule id to update

Query Parameters

account_idoptionalstring

The account ID. Defaults to the user's default account.

Headers

Authorizationoptionalstring

Body Parameters

account_idoptionalstring
activeoptionalboolean
aidoptionalinteger
createdoptionalstring
expressionoptionalstring

qlbridge expression

idoptionalstring
inputoptionalstring
modifiedoptionalstring
nameoptionalstring
outputoptionalstring
priorityoptionalinteger
Hide Parameters

URL Parameters

namerequiredstring

The Stream Name

Query Parameters

account_idoptionalstring

The account ID. Defaults to the user's default account.

Headers

Authorizationoptionalstring