Skip to main content
GET
Return real-time counts of live users (active streaming sessions) and queued users (waiting for a worker) for a single project. Use this to power live status indicators, capacity dashboards, and autoscaling triggers without pulling the full session list.
Live and queue state is read from Redis, so this endpoint is fast enough to poll on a short interval. A few seconds between polls is plenty — the counts update in near real time.

Typical workflow

1

Authenticate

Pass userId and apikey as query parameters. Both are required.
2

Request the counts

Call GET /projects/userStats/{projectId} for the project you want to inspect.
3

Render or react

Use liveUser and queueUser in your dashboard, or compare against thresholds to trigger alerts.

Prerequisites

Unlike most Streampixel endpoints (which take apiKey in the JSON body), this is a GET request — the API key is passed as the apikey query parameter. Treat the URL as sensitive: prefer server-side calls and avoid logging it in plain text.

Path parameters

string
required
The ID of the project to fetch live and queue user counts for.

Query parameters

string
required
The ID of the account that owns the project. Must match the project’s owner.
string
required
Your Streampixel API key. Note the all-lowercase casing — this parameter is apikey, not apiKey.

Response

number
Number of users currently in an active streaming session for this project. Sessions in Terminated or Terminating state are excluded.
number
Number of users waiting in the project’s queue for a worker to become available.

Error reference

Polling pattern

For a live dashboard, poll on a short interval and stop the timer when the page is hidden. This keeps the UI responsive without hammering the API.
Node.js / Browser
If you only need an aggregate view across many projects, batch your polling on the server and push updates to clients over WebSocket or SSE — this is far cheaper than every browser tab polling directly.

Next

List projects

Enumerate every project so you can fetch stats for each.

Rate limits & errors

Limits per endpoint and the standard error response format.