curl https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/live-stats \
-H "x-api-key: $STREAMPIXEL_API_KEY"
const { liveUser, queueUser } = await (await fetch(
'https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/live-stats',
{ headers: { 'x-api-key': process.env.STREAMPIXEL_API_KEY } }
)).json();
import os, requests
r = requests.get(
"https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/live-stats",
headers={"x-api-key": os.environ["STREAMPIXEL_API_KEY"]},
)
print(r.json())
{ "liveUser": 3, "queueUser": 1 }
Project Live Stats
Viewers streaming and viewers queued right now.
GET
/
api
/
v1
/
projects
/
{projectId}
/
live-stats
curl https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/live-stats \
-H "x-api-key: $STREAMPIXEL_API_KEY"
const { liveUser, queueUser } = await (await fetch(
'https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/live-stats',
{ headers: { 'x-api-key': process.env.STREAMPIXEL_API_KEY } }
)).json();
import os, requests
r = requests.get(
"https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/live-stats",
headers={"x-api-key": os.environ["STREAMPIXEL_API_KEY"]},
)
print(r.json())
{ "liveUser": 3, "queueUser": 1 }
Real-time counts of viewers in a live session and viewers waiting for a free streaming server. Same numbers as Project User Stats, on the REST path; both are read from the region’s live session store and are cheap to poll every few seconds.
Scope:
read.Path parameters
string
required
The project.
Headers
string
required
Your Streampixel API key.
Response
number
Viewers in an active session.
number
Viewers waiting for a streaming server.
curl https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/live-stats \
-H "x-api-key: $STREAMPIXEL_API_KEY"
const { liveUser, queueUser } = await (await fetch(
'https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/live-stats',
{ headers: { 'x-api-key': process.env.STREAMPIXEL_API_KEY } }
)).json();
import os, requests
r = requests.get(
"https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/live-stats",
headers={"x-api-key": os.environ["STREAMPIXEL_API_KEY"]},
)
print(r.json())
{ "liveUser": 3, "queueUser": 1 }
A non-zero
queueUser for more than a minute means demand exceeds the project’s concurrent-user allowance. Queue Analytics shows how often that happens and how long viewers wait.