Request URL: stat/originRequest/eachDomain (GET)
Endpoint Domain Name:
cdn.api.baishan.com
Endpoint Version:v2
Request numbers of returning origin request for domain names.
Notice: The default data statistical granularity is 5 minutes. See the Response Header section for information on call frequency limit.
Notice: Please request the API token from your account team.
Add request parameters to the URL query strings, i.e. ?key1=value1&key2=value2.
Parameter | Data Type | Requirement | Description |
---|---|---|---|
domains | string | Required | Domain names. Separate domain names by a comma (,). Up to 10 domain names at a time. all means all domains names, For example, aa.qingcdn.com,bb.qingcdn.com |
start_time | string | Required | Start time in the format of YYYY-mm-dd or YYYY- mm-dd HH:ii. For example, 2017-04-26 retrieves bandwidth/traffic data starting at 2017-04-26 00:00. |
end_time | string | Required | End time in the format of YYYY-mm-dd or YYYY- mm-dd HH:ii. For example, 2017-04-26 retrieves bandwidth/traffic data ending at 2017-04-26 23:59. The end time has to be greater than start time but must be within the range of 31 days. |
curl -X GET
"https://cdn.api.baishan.com/v2/stat/originRequest/eachDomain?token=xxx&start_time=2
018-01-16&end_time=2018-01-16&domains=aa.qingcdn.com,bb.qingcdn.com"
Json format.
{
"code": 0, //code means success.
"data": {
"aa.qingcdn.com": {
"domain": "aa.qingcdn.com",
"data": []
},
"bb.qingcdn.com.com": {
"domain": "bb.qingcdn.com",
"data": [
[
1518623400,//Time stamp, minute 5 granularity
364871//Request numbers
],
[
1518585600,
434121
],
[
1518585000,
12
],
[
1518540900,
16
]
...
]
}
}
}
HTTP/1.0 200 OK
Api-Id: 82773601
Content-Type: application/json; charset=utf-8
X-Ratelimit-Grad: minute //Unit of the request number limit
X-Ratelimit-Limit: 120 // 120 requests (calls) per minutes maximum
X-Ratelimit-Remaining: 120 //120 calls left for the current minute
X-Retry-After: 34 //the rate limit resets in 34 seconds
Error Code | Description |
---|---|
404 | Bad request URLs. |
401 | Authorization Error: Invalid token or lack of access. |
400 | Bad request parameters. |
200 | Success. |
5xx | Please contact your account team. |