互动直播
访客IP报表
查询单域名的各流名独立IP数汇总
域名管理
域名配置
流量报表
带宽报表
请求数报表
状态码报表
PV报表
URL报表
禁播
其他

查询单域名的各流名独立IP数汇总

更新时间:2024-12-30 17:14:28

该接口用于查询单个域名内的各流名的独立IP数量。用户提供具体的域名和时间,获取在此期间指定流的信息(以天为粒度)。接口返回的结果包括域名及其下对应流名的独立IP统计信息。有助于用户了解每路流的访问者分布,从而优化流量配置或评估流媒体服务的使用情况。

  • 数据延迟:3~5h
  • 单用户调用频率:30/5min
  • 适用产品:互动直播

请求参数

Params 参数

参数名称描述
*dateFromString
开始时间 1.格式为yyyy-MM-ddTHH:mm:ss+08:00; 2.必须小于当前时间和dateTo; 3.dateFrom和dateTo相差不能超过3天(可联系技术支持调整); 4.只能查询最近2年内数据。
*dateToString
结束时间 1.格式为yyyy-MM-ddTHH:mm:ss+08:00; 2.必须大于dateFrom; 3.查询范围必须包含某一天的00:00:00,才能查询到当天数据,例如查询范围包含 2017-11-07 00:00:00 可以查询到2017-11-07当天数据。

Body 参数

参数名称描述
*domainString
域名,数量上限1个
streamString
流名: 1.流名个数限制根据账号可调,默认为20个; 2.不传时默认查询域名下所有流名,同时受流名数量上限限制;

返回参数

Body 参数

参数名称描述
resultList
domainString
域名
detailsList
streamString
流名
timestampString
时间,格式为yyyy-MM-dd
totalInteger
独立IP数

错误码

错误代码(code)描述(message)HTTP状态码语义
NotAcceptableThe   accept header specified in your request is not acceptable.400Accept请求头不支持,接口仅支持json格式
InvalidHTTPRequestThere   was an error in the body of your HTTP request.400请求体格式错误
DateSpanErrorYou   cannot specify a period greater than 3.400datefrom和dateto相差超过3天
InvalidDatePeriodThe   date specified is invalid.400datefrom或dateto不符合规范
DomainsExcessiveThe   number of domain is excessive once.403域名数量超出限制
StreamsExcessiveThe   number of stream is excessive once.403流名数量超出限制
PARAM_INVALIDparam:   stream is null or invalid.400参数stream不符合规范
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://api.cdnetworks.com/api/report/visitor/total/stream?datefrom=2017-11-01T00:00:00%2B08:00&dateto=2017-11-02T00:00:00%2B08:00" \
  -X "POST" \
-H "X-Time-Zone:GMT+08:00" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-d '[
    {
        "domain":"test.com",
        "stream":[
            "test.com/abc/steam01"
        ]
    }
]'
返回示例
复制代码
{
      "result":[
          {
                "domain":"test.com",
              "details":[
                  {
                        "stream":"test.com/abc/steam01",
                        "timestamp":"2017-11-01",
                        "total":11
                  },                  
                  {
                        "stream":"test.com/abc/steam01",
                        "timestamp":"2017-11-02",
                        "total":22
                  }
              ]
          }
      ]
  }

目录

  • 请求参数
  • 返回参数
  • 错误码
  • 示例
本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!