GetRequestsByRecordType

Update time: 2022-12-13 11:12:03

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

  • Single user trigger frequency: 300/5min
  • Applicable Products: CloudDNS

Request

Params Params

NameDescription
*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)

Response

Body Params

NameDescription
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

Error code

Error code(code)Description(message)HTTP statusSemantic
0Success200Success
15252454Param error400Param error

Example

EG
EG
Request example
Copy Copy success
#!/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"
Response example
Copy Copy success
{
  "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
        }
      ]
    },
  ]
}
Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!