文档中心

推流历史错误统计接口(listPubErrInfo)

描述

推流历史错误统计接口

请求参数

目录 类型 是否必须 缺省值 描述
Action String Y n/a 操作接口名,取值:listPubErrInfo
Version String Y n/a 版本号,示例:2016-09-25
uniquename Y n/a 域名标识
marker unisigned int N 0 请求起始游标。当在线流数较多时,为提高接口响应时间,可分多次返回全部在线流信息,游标即索引值,默认为0。
limit unisigned int N 100 限制单次请求返回的记录数,至多可返回5000条,如果大于5000条,则返回5000条
app string app/pubhost 必须存在一个且只存在一个 n/a 推流频道。必填,用于指定返回某个频道下的在线流相关信息。
starttime unisigned int N n/a 查询范围起始时间。格式为年月日时,例如2016083010
duration unisigned int N n/a 查询范围。必填,单位:小时。若查询范围超过5天,那么查询结果将返回近5天的数据。

返回参数

目录 类型 是否必须 缺省值 描述
errno int Y 错误码 0:成功;非0:失败
errmsg string N 当errno非0时,errmsg被用于描述本次请求错误的原因
count int Y 单次返回多查询的记录数
result json array Y 返回流信息的封装结构,详见下面的定义
pubdomain string Y 当前流的推流域名
clientip string Y 当前流的推流IP
app string Y 当前流所属频道
streamname string Y 当前流的流名
pubtime int Y 开始推流的时间,格林威治时间格式
fintime unsigned int Y 推流结束时间,格林威治时间格式
errcode unsigned int Y 推流结束原始码 (详见推流错误码表)

请求示例

https://live.api.ksyun.com/?
Action=listPubErrInfo&Version=2016-09-25
&X-Amz-Algorithm=AWS4-HMAC-SHA256
&X-Amz-Credential=AKLTGo0pHK-EQWiDZWTSBSll2Q%2F20160914%2Fcn-beijing-6%2Fiam%2Faws4_request
&X-Amz-Date=20160914T114902Z
&X-Amz-SignedHeaders=host
&X-Amz-Signature=88f6284257863dedfc350da05d19d07f76cca622e93b829f5ce26c1a75d3da39
&接口请求参数

返回示例

{
  "errno": 0,
  "errmsg": "",
  "count": 100,
  "result": [
    {
      "app": "live",
      "streamname": "lk222",
      "detail": [
        {
          "pubdomain": "plu.uplive.ks-cdn.com",
          "clientip": "114.255.44.132",
          "pubtime": 1475978604,
          "fintime": 1475978605,
          "errcode": 423
        },
        ....
        {
          "pubdomain": "plu.uplive.ks-cdn.com",
          "clientip": "114.255.44.132",
          "pubtime": 1475978730,
          "fintime": 1475978731,
          "errcode": 423
        }
      ]
    },
    {
      "app": "live",
      "streamname": "lk4",
      "detail": [
        {
          "pubdomain": "plu.uplive.ks-cdn.com",
          "clientip": "114.255.44.132",
          "pubtime": 1475978805,
          "fintime": 1475978805,
          "errcode": 423
        },
        ....
        {
          "pubdomain": "plu.uplive.ks-cdn.com",
          "clientip": "114.255.44.132",
          "pubtime": 1475978815,
          "fintime": 1475978815,
          "errcode": 423
        }
      ]
    }
  ]
}

推流错误码表

推流错误码 推流错误描述
423 已存在的推流
424 黑名单拒绝推流
425 鉴权签名时间过期
426 鉴权签名验证失败
427 鉴权签名参数缺失
428 外部鉴权回调配置缺失
429 外部鉴权失败