获取记录类型统计, 查询所有时,报告会包含已删除zone的数据
参数名称 | 描述 |
---|---|
*fromNumber | 起始时间,timestamp类型,精确到秒 |
*toNumber | 结束时间,timestamp类型,精确到秒 |
intervalString | 间隔时间,默认为hourly。支持的类型有:oneminute: 1 min.(Range <= 1 day);fiveminutes: 5 min(Range <= 7 days); hourly: 1 hr; daily: 1 day; monthly: 1 month; all: Without interval(合并数据成一条返回,Range>=1hr) |
zoneString | zone名称字符串,英文逗号分隔,不区分大小写 |
timezoneNumber | 时区,当interval为daily/monthly/all时需要判断时区。 |
参数名称 | 描述 |
---|---|
dataList | 返回值 |
tsNumber | 时间戳,精确到秒 |
resultsList | 值 |
typeString | 记录类型(A,AAAA,CNAME,TXT,MX,SRV,RP,SPF,RP,PTR,NS,SOA,UNKNOWN) |
countNumber | 数量 |
codeInteger | 状态码,成功为0 |
messageString | 错误信息或Success |
错误代码(code) | 描述(message) | HTTP状态码 | 语义 |
---|---|---|---|
0 | Success | 200 | 成功 |
15252454 | Param error | 400 | 参数错误 |
#!/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 } ] }, ] }