Media Acceleration Live Broadcast
Visitor Report
QueryTotalNumberofUniqueIPUnderSingleDomain
Domain Management
Domain Configuration
Flow Report
Bandwidth Report
Request Report
StatusCode Report
PV Report
URL Report
Prompt stream forbidding
Other

QueryTotalNumberofUniqueIPUnderSingleDomain

更新時間: 2024-12-30 17:14:28

This interface is used to query the number of independent IP addresses for each stream name within a single domain name. The user provides a specific domain name and time to obtain information about the specified stream during this period (in days). The results returned by the interface include statistics on independent IP addresses for the domain name and its corresponding stream name. This helps users understand the distribution of visitors to each stream, thereby optimizing traffic configuration or evaluating the use of streaming media services.

  • データ遅延: 3~5h
  • 単一ユーザーの使用頻度: 30/5min
  • 使用できるプロダクト: Media Acceleration Live Broadcast

リクエストパラメータ

Params パラメータ

パラメータ名説明
*dateFromString
Start time 1. The format is yyyy-MM-ddTHH:mm:ss+08:00; 2. Must be smaller than the current time and dateTo; 3. Period between dataFrom and dateTo cannot be longer than 3 days(technical support can be contacted to adjust); 4. You can only query data for the last 2 years.
*dateToString
End time 1. The format is yyyy-MM-ddTHH:mm:ss+08:00; 2. Must be greater than dateFrom; 3. The query range must include 00:00:00 of a certain day to query the data of that day. For example, if the query range includes 2017-11-07 00:00:00, the data of 2017-11-07 can be queried.

Body パラメータ

パラメータ名説明
*domainString
Domain, maximum number is 1
streamString
Stream name: 1. Limit to the number of streams can be adjusted depending on different accounts. The default value is 20; 2. All streams are queried by default is this field is left empty and at the same time, the upper limit of the number of streams can be set.

レスポンスパラメータ

Body パラメータ

パラメータ名説明
resultList
domainString
Domain
detailsList
streamString
Stream name
timestampString
Time, format is yyyy-MM-dd
totalInteger
Number of unique IP addresses

エラーコード

エラーコード(code)説明(message)HTTPステータスコード意味
NotAcceptableThe   accept header specified in your request is not acceptable.400Accept as request header is not supported, as interface only supports json format
InvalidHTTPRequestThere   was an error in the body of your HTTP request.400Incorrect format of request body
DateSpanErrorYou   cannot specify a period greater than 3.400Period between datafrom and dateto is longer than 3 days
InvalidDatePeriodThe   date specified is invalid.400datafrom or dateto not compliant to specifications
DomainsExcessiveThe   number of domain is excessive once.403Number of domains exceeds the set limit
StreamsExcessiveThe   number of stream is excessive once.403Number of streams exceeds the set limit
PARAM_INVALIDparam:   stream is null or invalid.400Parameter of stream not compliant to specifications
NoSuchDomainThe   specified domain does not exist.404Domain does not exist, or does not belong to the current account that calls the interface
InternalErrorWe   encountered an internal error. Please try again.500System has encountered an error

入力例

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

目次

  • リクエストパラメータ
  • レスポンスパラメータ
  • エラーコード
  • 入力例