更新时间:2025-08-28 GMT+08:00
分享

查询频道统计信息

功能介绍

查询频道的统计信息(入流scte35信号)

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

POST /v1/{project_id}/ott/channels/statistic

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目ID,获取方法请参考获取项目ID。

表2 Query参数

参数

是否必选

参数类型

描述

limit

Integer

每页记录数

取值范围[1,100]

默认值:10

offset

Integer

偏移量。表示从此偏移量开始查询,offset大于等于0

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token,使用Token鉴权方式时为必填项。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。

Authorization

String

使用AK/SK方式认证时必填,携带的鉴权信息。

X-Sdk-Date

String

请求的发生时间,使用AK/SK方式认证时为必填项。

X-Project-Id

String

使用AK/SK方式认证时为必填项,携带项目ID信息。

表4 请求Body参数

参数

是否必选

参数类型

描述

domain

String

频道推流域名

app_name

String

组名或应用名

id

String

频道ID。频道唯一标识,为必填项。

type

String

统计信息的类型,scte35

scte35

SCTE35StatisticReq object

请求频道scte35信号的字段

表5 SCTE35StatisticReq

参数

是否必选

参数类型

描述

type

String

信号类型:all/splice_insert/time_signal

start_time

Long

查询信号的起始时间,unix time,单位:秒

end_time

Long

查询信号的结束时间,unix time,单位:秒;实际使用使用比start_time大

响应参数

状态码:200

表6 响应Body参数

参数

参数类型

描述

domain

String

频道推流域名

app_name

String

组名或应用名

id

String

频道ID。频道唯一标识,为必填项。

type

String

统计信息的类型,scte35

scte35

SCTE35StatisticRsp object

获取SCTE35信号的响应体

表7 SCTE35StatisticRsp

参数

参数类型

描述

total

Integer

查询到scet35信息的总个数

scte35_info

Array of SCTE35InfoItem objects

详细的scte35信号的数组

表8 SCTE35InfoItem

参数

参数类型

描述

type

String

信号类型,splice_insert/time_signal

event_id

Integer

广告信号的Event ID,Time Signal打印数组第一个

start_date

Long

广告信号的执行时间,unix time,单位:秒;console页面翻译成UTC时间

duration

Integer

广告信号时长,-1表示没有携带,Console显示”-“;单位:秒

segmentation_type

String

// Splice Insert填空"-";

// Time Signal,支持0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37

// 0x30: ProviderAdvertisementStart

// 0x31: ProviderAdvertisementEnd

// 0x32: DistributorAdvertisementStart

// 0x33: DistributorAdvertisementEnd

// 0x34: ProviderPlacementOpportunityStart

// 0x35: ProviderPlacementOpportunityEnd

// 0x36: DistributorPlacementOpportunityStart

// 0x37: DistributorPlacementOpportunityEnd

base64_data

String

广告信号原始数据的base64值

raw_splice

String

广告信号全量信息

状态码:404

表9 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

请求示例

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

响应示例

状态码: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}"
    } ]
  }
}

状态码:404

Query failed response

{
  "error_code" : "LIVE.103011099",
  "error_msg" : "query channel statistic failed"
}

状态码

状态码

描述

200

Query success response

404

Query failed response

错误码

请参见错误码

相关文档