List a live channel's sessions
const url = 'https://api.iomza.com/v1/live/channels/example/sessions?limit=20';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.iomza.com/v1/live/channels/example/sessions?limit=20' \ --header 'Authorization: Bearer <token>'Each time an encoder streamed to the channel: when, for how long, and why it ended.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”How many, 1–100 (20 by default).
Responses
Section titled “Responses”The sessions, newest first.
object
One session of a channel: from an encoder connecting to it leaving.
object
null while live.
Its length, in seconds; null while live.
Whether the signal has audio; null until known, in the first minute. Sessions from before it was reported answer null too.
When the stream will be stopped because the organization’s balance is used up; null while it has one.
Whether it was kept whole.
When its files were deleted (DELETE …/sessions/{session_id}); null while kept. Files are kept 24 hours anyway.
Example
{ "object": "list", "data": [ { "object": "live_session", "end_reason": "disconnect", "ingest_protocol": "rtmp" } ]}Invalid fields: details lists each problem with its path.
object
object
Stable: branch on it.
English, for people; may change.
Each problem, as path: message (validation errors).
Example
{ "error": { "code": "validation_error" }}The API key is missing, invalid or revoked.
object
object
Stable: branch on it.
English, for people; may change.
Each problem, as path: message (validation errors).
Example
{ "error": { "code": "validation_error" }}Valid credentials that may not do this (forbidden), your plan doesn’t include the module the route belongs to (module_not_in_plan), or your organization is suspended (organization_suspended).
object
object
Stable: branch on it.
English, for people; may change.
Each problem, as path: message (validation errors).
Example
{ "error": { "code": "validation_error" }}It doesn’t exist in your organization.
object
object
Stable: branch on it.
English, for people; may change.
Each problem, as path: message (validation errors).
Example
{ "error": { "code": "validation_error" }}Too many requests: wait and retry. Answered by the gateway, so the body may differ.
object
object
Stable: branch on it.
English, for people; may change.
Each problem, as path: message (validation errors).
Example
{ "error": { "code": "validation_error" }}Ours: retry, and tell us if it persists.
object
object
Stable: branch on it.
English, for people; may change.
Each problem, as path: message (validation errors).
Example
{ "error": { "code": "validation_error" }}Momentarily unavailable: retry in a few seconds.
object
object
Stable: branch on it.
English, for people; may change.
Each problem, as path: message (validation errors).
Example
{ "error": { "code": "validation_error" }}