文档中心 API文档 查询单域名的流名列表

查询单域名的流名列表

更新时间:2023-06-01 13:55:58

适用产品

直播分发

接口描述

根据域名获取流名列表。

推荐使用 Open API在线调试

Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试

请求参数

Body 参数

参数名称描述
*dateFrom
开始时间 1.格式为yyyy-MM-ddTHH:mm:ss+08:00; 2.必须小于当前时间和dateTo; 3.dateFrom和dateTo相差不能超过3天; 4.只能查询最近2年内数据。
*dateTo
结束时间 1.格式为yyyy-MM-ddTHH:mm:ss+08:00; 2.必须大于dateFrom;
*domain
域名,需要符合正则(([\w-]{1,62})?(\.[\w-]{1,62})+)

返回参数

Body 参数

参数名称描述
result
domain
域名
streamList
流名列表

错误码

错误代码(code)描述(message)HTTP状态码语义
MissingBodyThis   operation requires a body. Ensure that the body is present and the   Content-Type header is set.400请求体没有传递
NotAcceptableThe   accept header specified in your request is not acceptable.400Accept请求头不支持,接口仅支持json格式
InvalidHTTPRequestThere   was an error in the body of your HTTP request.400请求体格式错误
InvalidDatePeriodThe   date specified is invalid.400dateFrom或dateTo不符合规范
DateSpanErrorYou   cannot specify a period greater than 3.400dateFrom和dateTo相差超过3天
PARAM_INVALIDparam:   domain is null or invalid.400参数domain不符合规范
NoSuchDomainThe   specified domain does not exist.404传递的域名不存在
InternalErrorWe   encountered an internal error. Please try again.500系统发生错误

示例

JSON
JSON
请求示例
复制代码 复制成功
#!/bin/bash
# Please remember to change the param (-H "X-Time-Zone") in this demo to the TimeZone you want in response

username='example_username'
apiKey='example_apiKey'
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://open.chinanetcenter.com/api/report/streamList" \
  -X "GET" \
-H "X-Time-Zone:GMT+08:00" \
-u $username:$password \
-H "Date: $date" \
-H "Accept: application/json" \
-d '{
    "dateFrom": "2016-12-02T10:00:00+08:00",
    "dateTo": "2016-12-03T10:00:00+08:00",
    "domain": "www.test.com"
}'
返回示例
复制代码 复制成功
{
      "result": [
          {
              "domain":   "www.test.com",
              "streamList": [
                    "www.test.com/abc/steam03",
                    "www.test.com/abc/steam01",
                    "www.test.com/abc/steam02"
              ]
          }
      ]
  }
本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!