APIセンター

GetRequestsByRecordType

更新時間: 2022-12-13 11:12:03

Get Requests By Record Type. When querying all, the report will include the data of the deleted zone.

  • 単一ユーザーの使用頻度: 300/5min
  • 使用できるプロダクト: CloudDNS
API認証の詳細については、以下を参照してください:API認証の概要

リクエストパラメータ

クエリパラメータ

パラメータ名説明
*fromNumber

from time(timestamp) (accurate to the second)

*toNumber

to time(timestamp) (accurate to the second)

intervalString

interval time, default is 'hourly'. Support interval:oneminute: 1 min.(Range <= 1 day);fiveminutes: 5 min(Range <= 7 days); hourly: 1 hr; daily: 1 day; monthly: 1 month; all: Without interval(Combine data into one, Range>=1hr)

zoneString

zone names, separeated by ',', case insensitive

timezoneNumber

timezone is necessary when interval=daily/monthly/all, the default timezone is 0 (UTC+0)

レスポンスパラメータ

Body パラメータ

パラメータ名説明
dataList

return data

tsNumber

timestamp (accurate to the second)

resultsList

data

typeString

record type(A,AAAA,CNAME,TXT,MX,SRV,RP,SPF,RP,PTR,NS,SOA,UNKNOWN)

countNumber

count

codeInteger

code,success is 0

messageString

error message or Success

エラーコード

エラーコード(code)説明(message)HTTPステータスコード意味
0

Success

200Success
15252454

Param error

400Param error

入力例

EG
EG
リクエスト例
コピー コピー完了
#!/bin/bash
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/clouddns/requests/record_type?from=1653029521&to1653634321&interval=hourly" \
-X "GET" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept-Language: en"
レスポンス例
コピー コピー完了
{
  "code": "0",
  "message": "Success",
  "data": [
    {
      "ts": 1595602800,
      "results": [
        {
          "type": "A",
          "count": 3
        },
        {
          "type": "AAAA",
          "count": 3
        }
      ]
    },
    {
      "ts": 1595603100,
      "results": [
        {
          "type": "A",
          "count": 3
        },
        {
          "type": "AAAA",
          "count": 3
        }
      ]
    },
  ]
}