ReportStatusCodeIpTypeService
Name | Description |
---|---|
dateFromString | Start date:
1.The time format is yyyy-MM-ddTHH:MM:ss+08:00. For example, 2019-01-01T10:00:00+08:00
2.Cannot exceed current time
3.The most recent six-month (183 days) data are available. |
dateToString | End time:
1.The time format is yyyy-MM-ddTHH:MM:ss+08:00. For example, 2019-01-01T10:00:00+08:00
2.The end time needs to be greater than the start time. If the end time is greater than the current time, take the current time.
3.Date from, Date to both, the default query past 24 hours; If there is only one unsent, throw an exception
4.Maximum allowed query time interval: 7 days (with technical support adjustments), meaning that the difference between Date from and dateTo cannot exceed 7 days. |
domainList | Domain:
1. The maximum number of domains is 200 by default (Technical Support Adjustment can be contacted);
2. Automatic filtering invalid domain name (if pass illegal domain name, can be filtered, query result only returns the data of valid domain name). |
dataIntervalString | Data granularity:
1. Support 5m (5 minute granularity), 1h (1 hour granularity);
2. The default is 5m |
ipTypeString | IP type:
1.The optional values are IPv6 and IPv4
2.If let this parameter empty,it will query all IP type |
regionList | All region are queried by default, optional values are cn, am, apac, au, emea, hk, tw etc. |
Name | Description |
---|---|
codeString | Request status code |
messageString | Result message |
dataList | Detail data of result |
domainString | Domain |
detailListList | |
timestampString | Time:
the time slice included in the start time and end time |
valueString | Number of status codes |
Error code(code) | Description(message) | HTTP status | Semantic |
---|---|---|---|
24102013 | The accept header specified in your request is not acceptable. | 400 | The accept header specified in your request is not acceptable. |
24102002 | There was an error in the body of your HTTP request. | 400 | There was an error in the body of your HTTP request. |
24102006 | The date specified is invalid. | 400 | The date specified is invalid. |
24102007 | You cannot specify a period greater than xx minute(s). | 400 | You cannot specify a period greater than xx minute(s). |
24102021 | Date format error | 400 | Date format error |
24102019 | The request was rejected because the number of domain(xx) exceeds the limit (xx). | 400 | The request was rejected because the number of domain(xx) exceeds the limit (xx). |
24102008 | param: domain is null or invalid. | 400 | param: domain is null or invalid. |
24102008 | param: dataInterval is null or invalid. | 400 | param: dataInterval is null or invalid. |
24102019 | The request was rejected because the number of domain(xx) exceeds the limit (xx) | 400 | The request was rejected because the number of domain(xx) exceeds the limit (xx) |
24102008 | param: ipType is null or invalid. | 400 | param: ipType is null or invalid. |
24102500 | We encountered an internal error. Please try again. | 500 | We encountered an internal error. Please try again. |
#!/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/report/status-code/ipv6" \
-X "POST" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-d '{
"dateFrom":"2020-12-15T00:00:00+08:00",
"dateTo":"2020-12-15T01:00:00+08:00",
"domain":["test.com"],
"dataInterval":"5m",
"ipType":"IPV6"
}'
{
"code": "0",
"message": "success",
"data": [
{
"domain": "test.com",
"statusCodeDataList": [
{
"statusCode": "400",
"detailList": [
{
"timestamp": "2020-12-15 00:00",
"value": "400"
}
]
}
]
}
]
}