CDN
Request Count Statistics
API Endpoint
Request URL: stat/request (GET)
API Request Domain:
cdn.api.edgenext.com
API Version:v2
API Description
This API is used to query request count statistics for accelerated domains.
Request Parameters
Common Parameters
The user's authentication token is required. Please contact the on-call support team to obtain a valid token.
GET Request Parameters
Request parameters should be added to the query string of the URL.
Example:
?key1=value1&key2=value2
| Parameter Name | Data Type | Required | Description |
|---|---|---|---|
| domains | string | No | Default value: all. all: Returns aggregated request count statistics for all domains under the current account. Multiple domains can be specified, separated by commas (,). A maximum of 10 domains can be queried in a single request. Example: aa.qingcdn.com,bb.qingcdn.com |
| start_time | string | Yes | Specifies the start time of the query range. Format: YYYY-mm-dd or YYYY-mm-dd HH:ii. If 2017-04-26 is provided, it represents 2017-04-26 00:00:00 as the start time. |
| end_time | string | Yes | Specifies the end time of the query range. Format: YYYY-mm-dd or YYYY-mm-dd HH:ii. If 2017-04-26 is provided, it represents 2017-04-26 23:59:59 as the end time. The end time must be later than the start time. The maximum query time range is 31 days. |
| grad | string | No | Specifies the data aggregation interval. Default value: minute5. minute: 1-minute interval. minute5: 5-minute interval. hour: Hourly interval. day: Daily interval. |
| domain_type | string | No | Specifies the domain type. Multiple values can be specified, separated by commas (,). Default: All domain types. Supported values: page: Web page download: Download video_demand: Video on demand dynamic: Dynamic content upload: Upload total_station: Whole site wpa: All protocols |
Request Example
// URL encoding is required for the request.
curl -X GET "https://cdn.api.edgenext.com/v2/stat/request?token=xxx\
&domains=example.com,example2.com\
&start_time=2020-06-01%2012:16\
&end_time=2020-06-01%2012:30"
Response Example
JSON format
{
"code": 0,
"data": [
[
1628438400,
2312
],
[
1628438700,
1907
]
]
}
Response Headers
Example:
HTTP/1.0 200 OK
Api-Id: 1039
Content-Type: application/json; charset=utf-8
X-Ratelimit-Grad: minute // Rate limit granularity (minute/hour/day).
X-Ratelimit-Limit: 300 // Maximum number of requests allowed within the current rate limit period.
X-Ratelimit-Remaining: 99 // Remaining number of requests available within the current rate limit period.
X-Retry-After: 21 // Number of seconds until the current rate limit period is reset.
HTTP Status Code Description
| HTTP Status Code | Description |
|---|---|
| 404 | The requested URL is invalid. |
| 401 | Authentication failed. The token is invalid or the API permission has not been enabled. |
| 400 | Invalid request parameters. |
| 200 | Request completed successfully and the requested data is returned. |
| 5xx | Server-side error. Please contact the on-call support team. |
Need help? Contact our support team at support@edgenext.com.
Back to documentation home