Project User Stats
Get a live snapshot of how many users are actively streaming and how many are waiting in queue for a project.
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
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
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.