Get bandwidth for a stream
https://usages.livepush.io/usage/cdn/streams/{stream_id}
Base URL https://usages.livepush.io — Usage & Bandwidth API
Returns the bandwidth recorded for one stream, resolved through the
hostname it delivers on. Ranges work exactly as they do on
GET /usage/cdn/hostnames.
Check assignment before you trust bytes. Only dedicated means the
figure belongs to this stream alone. shared means the hostname carries
the streams named in sharedWith as well, so the figure covers all of
them. pooled means the stream delivers on the account's primary
hostname, where traffic cannot be attributed per stream: bytes is null
and reason explains why.
A stream with no per-stream tracking is not an error. It returns 200
with assignment: pooled and a reason, because whether a stream has its
own hostname is account configuration rather than a bad request. The only
404 is a stream that does not exist or is not yours.
Add daily=true for the per-day series. Days with no traffic are omitted,
so do not assume one entry per day in the range.
Authorization
Send a valid access token in the Authorization header.
bearerAuth— Bearer token (JWT)
Authorization: Bearer YOUR_API_TOKEN
Try it
Loading the request builder…
GET
https://usages.livepush.io/usage/cdn/streams/{stream_id}
— This call only reads data.
Parameters
Path parameters
-
stream_idstring requiredUnique identifier of the stream.example: st_xxxxxxxxxxxxx
Query parameters
-
fromstring<date>First UTC day to include, asYYYY-MM-DD. Defaults to the start of the current billing term.example: 2026-10-01 -
tillstring<date>Last UTC day to include, asYYYY-MM-DD. Defaults to today.example: 2026-10-15 -
dailybooleanInclude a per-day series. Days with no traffic are omitted.
Code samples
curl -X GET 'https://usages.livepush.io/usage/cdn/streams/st_xxxxxxxxxxxxx' \
-H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://usages.livepush.io/usage/cdn/streams/st_xxxxxxxxxxxxx', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
},
});
if (!response.ok) {
throw new Error(`Livepush API error ${response.status}`);
}
const data = await response.json();
import requests
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
}
response = requests.get('https://usages.livepush.io/usage/cdn/streams/st_xxxxxxxxxxxxx', headers=headers, timeout=30)
response.raise_for_status()
data = response.json()
Responses
Bandwidth for the stream. Also returned when the stream has no
per-stream figure, with bytes: null and a reason.
Headers
Cache-ControlstringAlwaysprivate, max-age=60.
-
enabledbooleanfalsewhen the account has no CDN delivery configured. -
streamIdstring -
assignmentstringHow this stream's traffic is recorded. | Value | Meaning | | --- | --- | |dedicated| It has a hostname to itself, sobytesis its own traffic | |shared| It shares a hostname with other streams;bytescovers all of them, andsharedWithnames them | |pooled| It delivers on the account's primary hostname, so its traffic cannot be separated.bytesisnull| |none| The account has no CDN delivery configured |dedicatedsharedpoolednone -
hostnamestringThe hostname the figure was read from. For apooledstream this is the account's primary hostname, reported so you know where the traffic went.nullable -
labelstringnullable -
sharedWithstring[]The other streams delivering on the same hostname. Non-empty only whenassignmentisshared, and it is whybytesis not this stream alone. -
rangeobjectThe UTC days the figures actually cover, after defaults are applied. Both bounds are inclusive.-
fromstring<date>First UTC day included. -
tillstring<date>Last UTC day included. Today's figure is always partial. -
isCurrentTermbooleantruewhen no dates were sent and the range was filled in from the current billing term. Whentruethe totals come from the stored term rows rather than from summing days, which is what the dashboard shows.
-
-
termobjectThe current CDN billing term.nullwhen the account has no activecdnsubscription and no stored term row to fall back on.nullable-
startstring<date-time>Start of the current term. -
endstring<date-time>End of the current term, ornullwhen the term is open-ended or was recovered from a stored usage row rather than from a subscription.nullable
-
-
bytesinteger<int64>Billable bytes on this stream's hostname across the range.nullwhen the stream ispooledor delivery is not enabled.nullable -
dailyobject[]Per-day series, present only whendaily=truewas sent, and empty for apooledstream. Days with no traffic are omitted rather than zero-filled.-
datestring<date> -
bytesinteger<int64>Billable bytes recorded for this day.
-
-
lastUpdatedstring<date-time>nullable -
reasonstringWhy there is no per-stream figure, ornullwhen there is one. Eitherstream is on the account's primary hostnameorper-stream bandwidth not enabled.nullable
{
"enabled": true,
"streamId": "st_xxxxxxxxxxxxx",
"assignment": "dedicated",
"hostname": "hls-acme-livepush.akamaized.net",
"label": "Acme Channel",
"sharedWith": [],
"range": {
"from": "2026-10-02",
"till": "2026-10-15",
"isCurrentTerm": true
},
"term": {
"start": "2026-10-02T04:03:40.000Z",
"end": "2026-11-02T04:03:40.000Z"
},
"bytes": 1234567890,
"daily": [
{
"date": "2026-10-06",
"bytes": 123456789
}
],
"lastUpdated": "2026-10-15T04:03:20.000Z",
"reason": null
}
invalid_range — see GET /usage/cdn/hostnames.
-
errorstringStable machine-readable code. -
messagestringHuman-readable detail. Present oninvalid_range, which says exactly which parameter was wrong.
{
"error": "invalid_range",
"message": "range is 500 days; the maximum is 400"
}
Unauthorized
stream_not_found — no such stream on this account.
-
errorstringStable machine-readable code. -
messagestringHuman-readable detail. Present oninvalid_range, which says exactly which parameter was wrong.
{
"error": "invalid_range",
"message": "range is 500 days; the maximum is 400"
}