Skip to content

Change a live channel

PATCH
/v1/live/channels/{id}
curl --request PATCH \
--url https://api.iomza.com/v1/live/channels/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "recording": true, "dvr_minutes": 1, "max_duration_minutes": 1, "ingest_allowed_ips": [ "example" ], "ingest_allowed_countries": [ "example" ] }'

Its name and settings. They apply within seconds, also to a session in progress.

id
required
string
Media typeapplication/json
object
name
string
>= 1 characters <= 120 characters
recording

Keep the whole session when it ends: its playback URLs then play it from the start, as video on demand, for 24 hours. true by default; a change applies to a stream on air too.

boolean
dvr_minutes

How far back viewers may rewind on the DVR URLs, in minutes (1–120). 30 by default. A change reaches a stream on air within seconds: a longer window grows from then on, a shorter one drops its oldest part at once.

integer
>= 1 <= 120
max_duration_minutes

The longest session, in minutes: the stream is stopped there. Up to your plan’s longest event (by default, the plan’s). A change applies to a stream on air too, counted from its start.

integer
>= 1 <= 9007199254740991
ingest_allowed_ips

Only encoders at these IPv4 addresses or ranges (CIDR) may stream to this channel: at most 50. Empty, the default: any. Applies from the next connection; a stream on air goes on.

Array
<= 50 items
ingest_allowed_countries

Only encoders in these countries (ISO 3166-1 alpha-2) may stream to this channel: at most 50. Empty, the default: any. An address whose country isn’t known is refused, and countries come from a database that can be wrong or be avoided with a VPN. With addresses too, an encoder must meet both. Applies from the next connection; a stream on air goes on.

Array<string>
<= 50 items

Example generated

{
"name": "example",
"recording": true,
"dvr_minutes": 1,
"max_duration_minutes": 1,
"ingest_allowed_ips": [
"example"
],
"ingest_allowed_countries": [
"example"
]
}

The channel.

Media typeapplication/json

A live channel.

object
id
required
string
object
required
string
Allowed value: live_channel
name
required
string
status
required

preparing: the channel is being set up, which can take a few minutes; its encoder is refused until then. idle: waiting for an encoder. live: streaming now. reconnecting: its encoder dropped during a stream and the stream waits up to 5 minutes for it to come back (viewers keep the DVR). stopped: refusing its encoder (see stopped_until).

string
Allowed values: preparing idle live reconnecting stopped
stopped_until
required

Until when it refuses its encoder after a stop; null with status stopped: until reactivated.

string | null
ingest
required
object
url
required

Where the encoder streams to, encrypted (RTMPS): OBS’s “Server”.

string
rtmp_url
required

The same without encryption (RTMP), for encoders that don’t support RTMPS. The stream key travels in the clear.

string
srt_url
required

Where the encoder streams to over SRT, which holds up better on unstable networks: replace {stream_key} with the stream key, it goes in this address. The stream key travels in the clear.

string
stream_key_hint
required

The stream key’s last characters, to recognize it.

string
stream_key_available
required

Whether GET …/stream-key can show the key; false for an old key: rotate it once to get one that can.

boolean
playback
required

Where a channel is played from: HLS and DASH, live at the edge or with the DVR window.

object
hls
required

HLS at the live edge (the last seconds): for players that only follow the live stream.

string
dash
required

DASH at the live edge.

string
dvr_hls
required

HLS with the DVR window, to rewind (dvr_minutes).

string
dvr_dash
required

DASH with the DVR window.

string
recording
required

Whether sessions are kept whole when they end (the playback URLs then play them from the start).

boolean
dvr_minutes
required

How far back viewers may rewind on the DVR URLs, in minutes (1–120).

number
max_duration_minutes
required

The longest session, in minutes.

number
on_air_since
required

When its session on air started; null when it isn’t on air.

string | null
ingest_allowed_ips
required

Only encoders at these IPv4 addresses or ranges may stream to it; empty: any.

Array<string>
ingest_allowed_countries
required

Only encoders in these countries may stream to it; empty: any.

Array<string>
created_at
required
string format: date-time

Example

{
"object": "live_channel",
"status": "preparing"
}

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"
}
}