Querying Channel Information
Function
Queries channel information. Batch query is supported.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
|
Action |
Access Level |
Resource Type (*: required) |
Condition Key |
Alias |
Dependencies |
|---|---|---|---|---|---|
|
live:ott:listChannel |
List |
- |
- |
- |
- |
URI
GET /v1/{project_id}/ott/channels
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see "Obtaining a Project ID". |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
data_display |
No |
String |
true |
|
domain |
No |
String |
Ingest domain name. |
|
app_name |
No |
String |
Group name or application name. |
|
id |
No |
String |
Channel ID. |
|
limit |
No |
Integer |
Number of records on each page. The value ranges from 1 to 100. The default value is 10. |
|
offset |
No |
Integer |
Offset, which is the position where the query starts. The value must be greater than or equal to 0. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
No |
String |
User token. This parameter is mandatory when token authentication is used. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
|
Authorization |
No |
String |
Authentication information. This parameter is mandatory for AK/SK authentication. |
|
X-Sdk-Date |
No |
String |
Request time. This parameter is mandatory for AK/SK authentication. |
|
X-Project-Id |
No |
String |
Project ID. This parameter is mandatory for AK/SK authentication. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
total |
Integer |
Total number of channels. |
|
channels |
Array of CreateOttChannelInfoReq objects |
Channel information. |
|
Parameter |
Type |
Description |
|---|---|---|
|
domain |
String |
Ingest domain name of a channel. |
|
app_name |
String |
Group name or application name. |
|
id |
String |
(Mandatory) Unique ID of a channel. |
|
name |
String |
Channel name. This parameter is optional. |
|
state |
String |
Channel status. |
|
mode |
String |
Channel mode. ADD_CDN: one-stop service, with origin servers and CDN bound together (default) ONLY_OS: independent origin service, with CDN decoupled from origin servers |
|
region |
String |
This parameter is valid when mode is set to ONLY_OS. It indicates the region where the channel is located. Options: CN North-Beijing4: cn-north-4 CN East-Shanghai1: cn-east-3 AP-Singapore: ap-southeast-3 CN-Hong Kong: ap-southeast-1 ME-Riyadh: me-east-1 AF-Johannesburg: af-south-1 EU-Dublin: eu-west-101 |
|
input |
InputStreamInfo object |
Channel input stream information. |
|
encoder_settings |
Array of encoder_settings objects |
Transcoding template configuration. |
|
record_settings |
record_settings object |
Catch-up TV configuration. |
|
endpoints |
Array of EndpointItem objects |
Channel output stream information. |
|
encoder_settings_expand |
EncoderSettingsExpand object |
Audio output configuration |
|
Parameter |
Type |
Description |
|---|---|---|
|
input_protocol |
String |
Channel input protocol |
|
sources |
Array of SourcesInfo objects |
Information about the primary source stream of a channel. This parameter is optional when the stream input protocol is RTMP_PUSH or SRT_PUSH. In other cases, this parameter is mandatory. |
|
secondary_sources |
Array of SecondarySourcesInfo objects |
Standby input stream array. This parameter is optional. If there is a standby input stream, ensure that the number of channels, codec, and resolution of the primary and standby input streams are the same. If the stream input protocol is RTMP_PUSH, you do not need to specify this parameter. |
|
failover_conditions |
FailoverConditions object |
(Optional) Configuration provided by the channel supplier to switch between the primary and standby media stream URLs. |
|
max_bandwidth_limit |
Integer |
Maximum bandwidth required when the input protocol is HLS_PULL. A streaming URL provided by the user includes the parameter BANDWIDTH for audios/videos with different bitrates.
|
|
ip_port_mode |
Boolean |
When the stream push protocol is SRT_PUSH and streams are pushed to the origin server, the encoder does not support the input of streamid. In this case, set this parameter to true. |
|
ip_whitelist |
String |
IP address whitelist for stream push by customers when the SRT_PUSH type is used |
|
scte35_source |
String |
SCTE-35 signal source of an advertisement. Only HLS_PULL channels support this configuration. Currently, this field can only be set to SEGMENTS. |
|
ad_triggers |
Array of strings |
Configures an ad trigger. Options: |
|
audio_selectors |
Array of InputAudioSelector objects |
Configures an audio selector (a maximum of 8). |
|
Parameter |
Type |
Description |
|---|---|---|
|
url |
String |
Channel source stream URL, which is used for external stream pull. |
|
bitrate |
Integer |
Bitrate. This parameter is mandatory when live transcoding is not required. Unit: bit/s. Value range: (0, 104,857,600] (100 Mbit/s) |
|
width |
Integer |
Width corresponding to the resolution. This parameter is optional. Value range: 0–4096 (4K) |
|
height |
Integer |
Height corresponding to the resolution. This parameter is optional. Value range: 0–2160 (4K) |
|
enable_snapshot |
Boolean |
Whether to use the stream for snapshot capturing. |
|
bitrate_for3u8 |
Boolean |
Whether to use bitrate to fix the bitrate. Default value: false |
|
passphrase |
String |
Encryption information when the protocol is SRT_PUSH. |
|
backup_urls |
Array of strings |
Standby streaming URL list |
|
stream_id |
String |
Stream ID of the streaming URL in an SRT_PULL channel. |
|
latency |
Integer |
Stream pull latency of an SRT_PULL channel. |
|
pbkeylen |
Integer |
SRT encryption algorithm 16 = AES-128 24 = AES-192 32 = AES-256 |
|
Parameter |
Type |
Description |
|---|---|---|
|
url |
String |
Channel source stream URL, which is used for external stream pull. |
|
bitrate |
Integer |
Bitrate. This parameter is mandatory when live transcoding is not required. Unit: bit/s. Value range: (0, 104,857,600] (100 Mbit/s) |
|
width |
Integer |
Width corresponding to the resolution. This parameter is optional. Value range: 0–4096 (4K) |
|
height |
Integer |
Height corresponding to the resolution. This parameter is optional. Value range: 0–2160 (4K) |
|
bitrate_for3u8 |
Boolean |
Whether to use bitrate to fix the bitrate. Default value: false |
|
passphrase |
String |
Encryption information when the protocol is SRT_PUSH |
|
backup_urls |
Array of strings |
Standby streaming URL list |
|
stream_id |
String |
Stream ID of the streaming URL in an SRT_PULL channel. |
|
latency |
Integer |
Stream pull latency of an SRT_PULL channel. |
|
pbkeylen |
Integer |
SRT encryption algorithm 16 = AES-128 24 = AES-192 32 = AES-256 |
|
Parameter |
Type |
Description |
|---|---|---|
|
input_loss_threshold_msec |
Integer |
Duration threshold for stopping input streams. When the threshold is reached, the primary/standby switchover is automatically triggered. Unit: millisecond. Value range: 0–3,600,000 (Optional) The default value is 2,000 ms. |
|
input_preference |
String |
Whether the primary ingest URL has the highest priority (PRIMARY) or the primary and standby URLs are switched equally (EQUAL). In the equal switchover mode, the standby URL is used and will not be automatically switched to the primary URL. (Optional) The default value is EQUAL. |
|
Parameter |
Type |
Description |
|---|---|---|
|
name |
String |
Name of an audio selector. Enter only letters, digits, hyphens (-), and underscores (_). The name of each selector must be unique within the same channel. |
|
selector_settings |
AudioSelectorSettings object |
Configures an audio selector. |
|
Parameter |
Type |
Description |
|---|---|---|
|
audio_language_selection |
AudioSelectorLangSelection object |
Configures a language selector. |
|
audio_pid_selection |
AudioSelectorPidSelection object |
Configures a PID selector. |
|
audio_hls_selection |
AudioSelectorHlsSelection object |
Configures an HLS selector. |
|
Parameter |
Type |
Description |
|---|---|---|
|
name |
String |
HLS audio selector name |
|
group_id |
String |
HLS audio selector GID |
|
Parameter |
Type |
Description |
|---|---|---|
|
rollingbuffer_duration |
Integer |
Maximum catch-up TV recording duration. The recording is continuous in this period. This parameter is mandatory. Unit: second. The value 0 indicates that recording is not supported. The maximum recording duration is 14 days. |
|
Parameter |
Type |
Description |
|---|---|---|
|
hls_package |
Array of HlsPackageItem objects |
HLS packaging information. |
|
dash_package |
Array of DashPackageItem objects |
DASH packaging information. |
|
mss_package |
Array of MssPackageItem objects |
MSS packaging information. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
The package unique identifier ID, created by the service and returned during query. It needs to be included when modifying endpoints. |
|
url |
String |
A customized streaming URL, including the method, domain name, and path. |
|
stream_selection |
Array of StreamSelectionItem objects |
Filters out a stream whose bitrate is in the range of [min, max] from all streams. If bitrate filtering is not required, you do not need to specify this parameter. |
|
hls_version |
String |
HLS version number. |
|
segment_duration_seconds |
Integer |
Output segment duration of a channel. This parameter is mandatory. Unit: second. Value range: 1 to 10
NOTE:
Changing the segment duration will affect time-shifted viewing and catch-up TV of the recorded content. Exercise caution when performing this operation. |
|
playlist_window_seconds |
Integer |
Total output segment duration of a channel. The value is the output segment duration multiplied by the number of segments. There are at least three returned segments. Unit: second. Value range: 0–86,400 (value of converting 24 hours to seconds) |
|
encryption |
Encryption object |
Encryption information. |
|
ads |
Object |
Advertising configuration |
|
ext_args |
Object |
Other additional parameters |
|
request_args |
PackageRequestArgs object |
Playback configuration |
|
ad_marker |
Array of strings |
Advertisement ID. For HLS, the value is ["ENHANCED_SCTE35"]. |
|
enable_access |
Boolean |
When mode is set to ONLY_OS, this parameter specifies whether the output can pull streams from the origin server. The default value is false. true: allowed false: not allowed |
|
allow_all_ip_access |
Boolean |
Whether to allow all IP addresses to access. The default value is false. true: allowed. The ip_whitelist configuration does not take effect. false: not allowed. The ip_whitelist configuration takes effect. Access is allowed only for IP addresses specified in ip_whitelist. |
|
ip_whitelist |
String |
Whitelist of IP addresses that can pull streams from the origin server when mode is set to ONLY_OS. |
|
cdn_identifier_header |
HttpHeader object |
HTTP header CDN authentication header. |
|
origin_domain_master |
String |
Origin domain name – Primary region Same as CreateOttChannelInfoReq.region Regular expression: ^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?.){2,}[a-zA-Z]{2,16}$ Maximum length: 255 characters |
|
origin_domain_slave |
String |
Origin domain name – Standby region Constraints: Huawei Cloud (International) Standby origin server of AP-Singapore: CN-Hong Kong Standby origin server of CN-Hong Kong: AP-Singapore Standby origin server of ME-Riyadh: AP-Singapore Standby origin server of AF-Johannesburg: AP-Singapore |
|
manifest_name |
String |
Name of the index file of the output. Default value: index Length: 0–128 characters Character set: letters, digits, hyphens (-), periods (.), and underscores (_). Paths with slashes (/) are not allowed. |
|
slave_url |
String |
Custom streaming URL, including the method, domain name, and path. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
The package unique identifier ID, created by the service and returned during query. It needs to be included when modifying endpoints. |
|
url |
String |
A customized streaming URL, including the method, domain name, and path. |
|
stream_selection |
Array of StreamSelectionItem objects |
Filters out a stream whose bitrate is in the range of [min, max] from all streams. If bitrate filtering is not required, you do not need to specify this parameter. |
|
segment_duration_seconds |
Integer |
Output segment duration of a channel. This parameter is mandatory. Unit: second. Value range: 1 to 10
NOTE:
Changing the segment duration will affect time-shifted viewing and catch-up TV of the recorded content. Exercise caution when performing this operation. |
|
playlist_window_seconds |
Integer |
Total output segment duration of a channel. The value is the output segment duration multiplied by the number of segments. There are at least three returned segments. Unit: second. Value range: 0–86,400 (value of converting 24 hours to seconds) |
|
encryption |
Encryption object |
Encryption information. |
|
ads |
Object |
Advertising configuration |
|
ext_args |
Object |
Other additional parameters |
|
request_args |
PackageRequestArgs object |
Playback configuration |
|
ad_marker |
String |
Advertisement ID. For DASH, the value is xml+bin. |
|
suggested_presentation_delay |
Integer |
Recommended stream delay Unit: second. Value range: 1 to 120 |
|
minimum_update_period |
Integer |
Shortest index update period Unit: second. Value range: 1 to 120 |
|
min_buffer_time |
Integer |
Minimum buffer time Unit: second. Value range: 1 to 120 |
|
enable_access |
Boolean |
Default value: false true: allowed false: not allowed |
|
allow_all_ip_access |
Boolean |
Whether to allow all IP addresses to access. The default value is false. true: allowed. The ip_whitelist configuration does not take effect. false: not allowed. The ip_whitelist configuration takes effect. Access is allowed only for IP addresses specified in ip_whitelist. |
|
ip_whitelist |
String |
This parameter is valid when allow_all_ip_access is set to false. IP addresses allowed for access. Separate multiple IP addresses with commas (,). The value must be in CIDR format. |
|
cdn_identifier_header |
HttpHeader object |
HTTP header CDN authentication header. |
|
origin_domain_master |
String |
Origin domain name – Primary region Same as CreateOttChannelInfoReq.region Regular expression: ^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?.){2,}[a-zA-Z]{2,16}$ Maximum length: 255 characters |
|
origin_domain_slave |
String |
Origin domain name – Standby region Constraints: Huawei Cloud (International) Standby origin server of AP-Singapore: CN-Hong Kong Standby origin server of CN-Hong Kong: AP-Singapore Standby origin server of ME-Riyadh: AP-Singapore Standby origin server of AF-Johannesburg: AP-Singapore |
|
manifest_name |
String |
Name of the index file of the output. Default value: index Length: 0–128 characters Character set: letters, digits, hyphens (-), periods (.), and underscores (_). Paths with slashes (/) are not allowed. |
|
slave_url |
String |
Custom streaming URL, including the method, domain name, and path. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
The package unique identifier ID, created by the service and returned during query. It needs to be included when modifying endpoints. |
|
url |
String |
A customized streaming URL, including the method, domain name, and path. |
|
stream_selection |
Array of StreamSelectionItem objects |
Filters out a stream whose bitrate is in the range of [min, max] from all streams. If bitrate filtering is not required, you do not need to specify this parameter. |
|
segment_duration_seconds |
Integer |
Output segment duration of a channel. This parameter is mandatory. Unit: second. Value range: 1 to 10
NOTE:
Changing the segment duration will affect time-shifted viewing and catch-up TV of the recorded content. Exercise caution when performing this operation. |
|
playlist_window_seconds |
Integer |
Total output segment duration of a channel. The value is the output segment duration multiplied by the number of segments. There are at least three returned segments. Unit: second. Value range: 0–86,400 (value of converting 24 hours to seconds) |
|
encryption |
Encryption object |
Encryption information. |
|
ext_args |
Object |
Other additional parameters |
|
delay_segment |
Integer |
Playback delay, in seconds. |
|
request_args |
PackageRequestArgs object |
Playback configuration |
|
enable_access |
Boolean |
Default value: false true: allowed false: not allowed |
|
allow_all_ip_access |
Boolean |
Whether to allow all IP addresses to access. The default value is false. true: allowed. The ip_whitelist configuration does not take effect. false: not allowed. The ip_whitelist configuration takes effect. Access is allowed only for IP addresses specified in ip_whitelist. |
|
ip_whitelist |
String |
This parameter is valid when allow_all_ip_access is set to false. IP addresses allowed for access. Separate multiple IP addresses with commas (,). The value must be in CIDR format. |
|
cdn_identifier_header |
HttpHeader object |
HTTP header CDN authentication header. |
|
origin_domain_master |
String |
Origin domain name – Primary region Same as CreateOttChannelInfoReq.region Regular expression: ^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?.){2,}[a-zA-Z]{2,16}$ Maximum length: 255 characters |
|
origin_domain_slave |
String |
Origin domain name – Standby region Constraints: Huawei Cloud (International) Standby origin server of AP-Singapore: CN-Hong Kong Standby origin server of CN-Hong Kong: AP-Singapore Standby origin server of ME-Riyadh: AP-Singapore Standby origin server of AF-Johannesburg: AP-Singapore |
|
manifest_name |
String |
Name of the index file of the output. Default value: index Length: 0–128 characters Character set: letters, digits, hyphens (-), periods (.), and underscores (_). Paths with slashes (/) are not allowed. |
|
slave_url |
String |
Custom streaming URL, including the method, domain name, and path. |
|
Parameter |
Type |
Description |
|---|---|---|
|
key |
String |
Parameter used for bitrate filtering in a streaming URL. |
|
max_bandwidth |
Integer |
Maximum bitrate, in bit/s. Value range: 0-104,857,600 (100 Mbit/s) |
|
min_bandwidth |
Integer |
Minimum bitrate, in bit/s. Value range: 0-104,857,600 (100 Mbit/s) |
|
Parameter |
Type |
Description |
|---|---|---|
|
key_rotation_interval_seconds |
Integer |
Key cache time. If the key remains unchanged, the data is cached for seven days by default. This field is reserved and cannot be configured. |
|
encryption_method |
String |
Encryption mode. This field is reserved and cannot be configured. |
|
level |
String |
The options are as follows: Default value: content |
|
resource_id |
String |
DRM content ID generated by the customer |
|
system_ids |
Array of strings |
Enumerated value of system_id. Options: HLS: FairPlay DASH: Widevine, PlayReady MSS: PlayReady |
|
url |
String |
DRM address for obtaining a key |
|
speke_version |
String |
DRM SPEKE version. Currently, only version 1.0 is supported. |
|
request_mode |
String |
Request mode. Options: direct_http: accessing the DRM using HTTP(S) functiongraph_proxy: accessing the DRM using a FunctionGraph proxy |
|
http_headers |
Array of HttpHeader objects |
Authentication information to be added to the DRM request header. A maximum of five items can be added. Only the direct_http request mode allows configuring http_headers. |
|
urn |
String |
The functiongraph_proxy request mode requires the URN of FunctionGraph. |
|
Parameter |
Type |
Description |
|---|---|---|
|
key |
String |
key field name in the request header |
|
value |
String |
value corresponding to the key in the request header |
|
Parameter |
Type |
Description |
|---|---|---|
|
record |
Array of RecordRequestArgs objects |
Recording configuration |
|
timeshift |
Array of TimeshiftRequestArgs objects |
Time shifting configuration |
|
live |
Array of LiveRequestArgs objects |
Livestreaming configuration |
|
Parameter |
Type |
Description |
|---|---|---|
|
start_time |
String |
Start time |
|
end_time |
String |
End time |
|
format |
String |
Format |
|
unit |
String |
Unit |
|
Parameter |
Type |
Description |
|---|---|---|
|
back_time |
String |
Time shifting duration field name |
|
unit |
String |
Unit |
|
Parameter |
Type |
Description |
|---|---|---|
|
audio_descriptions |
Array of audio_descriptions objects |
Description of an audio output setting |
|
video_descriptions |
VideoDescriptions object |
|
Parameter |
Type |
Description |
|---|---|---|
|
gop_duration_seconds |
Integer |
Custom GOP duration, in seconds. The value ranges from 0 to 10. The default value is 0, indicating that the GOP duration of the source stream is used. The value cannot be 7 or 9. If the value is invalid, the default value is used. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
result_code |
String |
Error code. |
|
result_msg |
String |
Error description. |
|
domain |
String |
Ingest domain name. |
|
app_name |
String |
Group name or application name. This parameter is mandatory. |
|
id |
String |
Unique ID of a channel. This parameter is mandatory. |
Example Requests
GET https://{endpoint}/v1/{project_id}/ott/channels?app_name=ott&domain=push.testott.hls.com&id=test
Example Responses
Status code: 200
Demo Information
{
"total" : 1,
"channels" : [ {
"domain" : "push.testott.hls.com",
"app_name" : "ott",
"id" : "test",
"name" : "testname",
"input" : {
"input_protocol" : "RTMP_PUSH",
"sources" : [ {
"url" : "rtmp://push.testott.hls.com/ott/test_1024?request_source=ott&channel_id=test",
"bitrate" : 1024,
"width" : 100,
"height" : 100
} ],
"failover_conditions" : {
"input_loss_threshold_msec" : 100,
"input_preference" : "EQUAL"
}
},
"record_settings" : {
"rollingbuffer_duration" : 86400
},
"endpoints" : [ {
"hls_package" : [ {
"url" : "pull.testott.hls.com/ott/test/index.m3u8",
"stream_selection" : [ {
"key" : "sss",
"max_bandwidth" : 0,
"min_bandwidth" : 0
} ],
"segment_duration_seconds" : 4,
"playlist_window_seconds" : 3600,
"request_args" : {
"record" : [ {
"start_time" : "begin",
"end_time" : "end",
"format" : "timestamp",
"unit" : "second"
} ],
"timeshift" : [ {
"back_time" : "begin",
"unit" : "second"
} ],
"live" : null
},
"hls_version" : "1"
} ],
"dash_package" : [ {
"url" : "pull.testott.hls.com/ott/test/index.mpd",
"stream_selection" : [ {
"key" : "bitrate=900000-1800000",
"max_bandwidth" : 1800000,
"min_bandwidth" : 900000
} ],
"segment_duration_seconds" : 4,
"playlist_window_seconds" : 3600,
"request_args" : {
"record" : [ {
"start_time" : "begin",
"end_time" : "end",
"format" : "timestamp",
"unit" : "second"
} ],
"timeshift" : [ {
"back_time" : "begin",
"unit" : "second"
} ],
"live" : null
}
} ],
"mss_package" : [ {
"url" : "pull.testott.hls.com/ott/channel/manifest",
"stream_selection" : [ {
"key" : "bitrate=900000-1800000",
"max_bandwidth" : 1800000,
"min_bandwidth" : 900000
} ],
"segment_duration_seconds" : 4,
"playlist_window_seconds" : 3600,
"request_args" : {
"record" : [ {
"start_time" : "begin",
"end_time" : "end",
"format" : "timestamp",
"unit" : "second"
} ],
"timeshift" : [ {
"back_time" : "begin",
"unit" : "second"
} ],
"live" : null
}
} ]
} ],
"state" : "OFF"
} ]
}
Status code: 400
Error response
{
"result_code" : "LIVE.103011019",
"result_msg" : "The resource to access is not exists",
"domain" : "push.testott.hls.com",
"app_name" : "ott",
"id" : "agbc"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Demo Information |
|
400 |
Error response |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot