Querying Channel Statistics
Function
Queries channel statistics (input SCTE-35 signal).
URI
POST /v1/{project_id}/ott/channels/statistic
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 |
---|---|---|---|
limit |
No |
Integer |
Number of records on each page. The value ranges from 1 to 100 and defaults to 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. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
domain |
Yes |
String |
Ingest domain name of a channel |
app_name |
Yes |
String |
Group name or application name |
id |
Yes |
String |
Channel ID. (Mandatory) Unique ID of a channel. |
type |
Yes |
String |
Statistics type. The value can be scte35. |
scte35 |
No |
SCTE35StatisticReq object |
Field for requesting the SCTE-35 signal of a channel |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
Yes |
String |
Signal type. The value can be all, splice_insert, or time_signal. |
start_time |
Yes |
Long |
Start time for querying signals. The value is a Unix time, in seconds. |
end_time |
Yes |
Long |
End time for querying signals. The value is a Unix time, in seconds. The end time must be later than the start time. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
domain |
String |
Ingest domain name of a channel |
app_name |
String |
Group name or application name |
id |
String |
Channel ID. (Mandatory) Unique ID of a channel. |
type |
String |
Statistics type. The value can be scte35. |
scte35 |
SCTE35StatisticRsp object |
Response body for obtaining the SCTE-35 signal |
Parameter |
Type |
Description |
---|---|---|
total |
Integer |
Total number of SCTE-35 signals found |
scte35_info |
Array of SCTE35InfoItem objects |
Array of detailed SCTE-35 signals |
Parameter |
Type |
Description |
---|---|---|
type |
String |
Signal type. The value can be splice_insert or time_signal. |
event_id |
Integer |
Event ID of the ad signal. For time signal, the first element in the array is printed. |
start_date |
Long |
Execution time of the ad signal. The value is a Unix time, in seconds. The value is translated into the UTC time on the console. |
duration |
Integer |
Duration of the ad signal, in seconds. If the value is -1, the signal duration is not carried and - is displayed on the console. |
segmentation_type |
String |
// Splice Insert. Enter a hyphen (-). // Time signal. The value can be 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, or 0x37. // 0x30: ProviderAdvertisementStart // 0x31: ProviderAdvertisementEnd // 0x32: DistributorAdvertisementStart // 0x33: DistributorAdvertisementEnd // 0x34: ProviderPlacementOpportunityStart // 0x35: ProviderPlacementOpportunityEnd // 0x36: DistributorPlacementOpportunityStart // 0x37: DistributorPlacementOpportunityEnd |
base64_data |
String |
Base64 value of the raw data of an ad signal |
raw_splice |
String |
All information about an ad signal |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Example Requests
POST https://{endpoint}/v1/{project_id}/ott/channels/statistic?limit=50&offset=10 { "domain" : "www.huaweiott.pushdomain.com", "app_name" : "live", "id" : "channelId", "type" : "scte35", "scte35" : { "type" : "all", "start_time" : 1741650609, "end_time" : 1741658609 } }
Example Responses
Status code: 200
Query success response
{ "domain" : "www.huaweiott.pushdomain.com", "app_name" : "live", "id" : "channelId", "type" : "scte35", "scte35" : { "total" : 50, "scte35_info" : [ { "type" : "Splice Insert", "event_id" : 100, "start_date" : 1741594376, "duration" : 120, "segmentation_type" : "Provider advertisement Start", "base64_data" : "/DAlAAAAAAAAAP/wFAUAAAABf+/+AGAhYP4AKTLgAAEAAAAAjhdvmA==", "raw_splice" : "{\"table_id\":252,\"section_syntax_indicator\":false,\"private_indicator\":false,\"section_length\":32,\"protocol_version\":0,\"encrypted_packet\":false,\"encryption_algorithm\":0,\"pts_adjustment\":0,\"cw_index\":0,\"tier\":0,\"splice_command_length\":15,\"splice_command_type\":\"Splice Insert\",\"splice_command\":{\"splice_event_id\":9,\"splice_event_cancel_indicator\":false,\"out_of_network_indicator\":false,\"program_splice_flag\":true,\"duration_flag\":false,\"splice_immediate_flag\":false,\"splice_time\":{\"time_specified_flag\":true,\"pts_time\":429850800},\"unique_program_id\":0,\"avail_num\":0,\"avails_expected\":0},\"descriptor_loop_length\":0,\"descriptors\":[],\"crc32\":2510451559}" }, { "type" : "Splice Insert", "event_id" : 101, "start_date" : 1741594378, "duration" : 120, "segmentation_type" : "Provider advertisement Start", "base64_data" : "/DAlAAAAAAAAAP/wFAUAAAABf+/+AGAhYP4AKTLgAAEAAAAAjhdvmA==", "raw_splice" : "{\"table_id\":252,\"section_syntax_indicator\":false,\"private_indicator\":false,\"section_length\":32,\"protocol_version\":0,\"encrypted_packet\":false,\"encryption_algorithm\":0,\"pts_adjustment\":0,\"cw_index\":0,\"tier\":0,\"splice_command_length\":15,\"splice_command_type\":\"Splice Insert\",\"splice_command\":{\"splice_event_id\":9,\"splice_event_cancel_indicator\":false,\"out_of_network_indicator\":false,\"program_splice_flag\":true,\"duration_flag\":false,\"splice_immediate_flag\":false,\"splice_time\":{\"time_specified_flag\":true,\"pts_time\":429850800},\"unique_program_id\":0,\"avail_num\":0,\"avails_expected\":0},\"descriptor_loop_length\":0,\"descriptors\":[],\"crc32\":2510451559}" } ] } }
Status code: 404
Query failed response
{ "error_code" : "LIVE.103011099", "error_msg" : "query channel statistic failed" }
Status Codes
Status Code |
Description |
---|---|
200 |
Query success response |
404 |
Query failed 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.