Skip to content

List a live channel's sessions

GET
/v1/live/channels/{id}/sessions
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.

id
required
string
limit
integer
default: 20 >= 1 <= 100

How many, 1–100 (20 by default).

The sessions, newest first.

Media typeapplication/json
object
object
required
Allowed value: list
data
required
Array<object>

One session of a channel: from an encoder connecting to it leaving.

object
id
required
string
object
required
string
Allowed value: live_session
channel_id
required
string
started_at
required
string format: date-time
ended_at
required

null while live.

string | null format: date-time
end_reason
required
Any of:

Why a session ended, as customers see it.

string
Allowed values: disconnect limit stopped blocked error
duration_seconds
required

Its length, in seconds; null while live.

number | null
has_audio
required

Whether the signal has audio; null until known, in the first minute. Sessions from before it was reported answer null too.

boolean | null
ingest_protocol
required
Any of:

How an encoder reaches ingest.

string
Allowed values: rtmp rtmps srt
stops_for_balance_at
required

When the stream will be stopped because the organization’s balance is used up; null while it has one.

string | null format: date-time
recorded
required

Whether it was kept whole.

boolean
deleted_at
required

When its files were deleted (DELETE …/sessions/{session_id}); null while kept. Files are kept 24 hours anyway.

string | null format: date-time

Example

{
"object": "list",
"data": [
{
"object": "live_session",
"end_reason": "disconnect",
"ingest_protocol": "rtmp"
}
]
}

Invalid fields: details lists each problem with its path.

Media typeapplication/json
object
error
required
object
code
required

Stable: branch on it.

string
Allowed values: validation_error unauthorized quota_exceeded insufficient_balance forbidden module_not_in_plan organization_suspended not_found conflict too_many_requests internal_error service_unavailable
message
required

English, for people; may change.

string
details
required

Each problem, as path: message (validation errors).

Array<string>

Example

{
"error": {
"code": "validation_error"
}
}

The API key is missing, invalid or revoked.

Media typeapplication/json
object
error
required
object
code
required

Stable: branch on it.

string
Allowed values: validation_error unauthorized quota_exceeded insufficient_balance forbidden module_not_in_plan organization_suspended not_found conflict too_many_requests internal_error service_unavailable
message
required

English, for people; may change.

string
details
required

Each problem, as path: message (validation errors).

Array<string>

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).

Media typeapplication/json
object
error
required
object
code
required

Stable: branch on it.

string
Allowed values: validation_error unauthorized quota_exceeded insufficient_balance forbidden module_not_in_plan organization_suspended not_found conflict too_many_requests internal_error service_unavailable
message
required

English, for people; may change.

string
details
required

Each problem, as path: message (validation errors).

Array<string>

Example

{
"error": {
"code": "validation_error"
}
}

It doesn’t exist in your organization.

Media typeapplication/json
object
error
required
object
code
required

Stable: branch on it.

string
Allowed values: validation_error unauthorized quota_exceeded insufficient_balance forbidden module_not_in_plan organization_suspended not_found conflict too_many_requests internal_error service_unavailable
message
required

English, for people; may change.

string
details
required

Each problem, as path: message (validation errors).

Array<string>

Example

{
"error": {
"code": "validation_error"
}
}

Too many requests: wait and retry. Answered by the gateway, so the body may differ.

Media typeapplication/json
object
error
required
object
code
required

Stable: branch on it.

string
Allowed values: validation_error unauthorized quota_exceeded insufficient_balance forbidden module_not_in_plan organization_suspended not_found conflict too_many_requests internal_error service_unavailable
message
required

English, for people; may change.

string
details
required

Each problem, as path: message (validation errors).

Array<string>

Example

{
"error": {
"code": "validation_error"
}
}

Ours: retry, and tell us if it persists.

Media typeapplication/json
object
error
required
object
code
required

Stable: branch on it.

string
Allowed values: validation_error unauthorized quota_exceeded insufficient_balance forbidden module_not_in_plan organization_suspended not_found conflict too_many_requests internal_error service_unavailable
message
required

English, for people; may change.

string
details
required

Each problem, as path: message (validation errors).

Array<string>

Example

{
"error": {
"code": "validation_error"
}
}

Momentarily unavailable: retry in a few seconds.

Media typeapplication/json
object
error
required
object
code
required

Stable: branch on it.

string
Allowed values: validation_error unauthorized quota_exceeded insufficient_balance forbidden module_not_in_plan organization_suspended not_found conflict too_many_requests internal_error service_unavailable
message
required

English, for people; may change.

string
details
required

Each problem, as path: message (validation errors).

Array<string>

Example

{
"error": {
"code": "validation_error"
}
}