Get HTTP Status Code Number
This API is used to retrieve the number of HTTP status codes, aggregated in 5-minute intervals.
Request
Request-Line
POST /cdn/v1.0/analytics/httpCodes HTTP/1.1
Request Parameters
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| serviceNames | Array | Mandatory | Array of domain names, Maximum array size is 50. |
| startTime | String | Mandatory | Start time. Use the format yyyy-MM-ddTHH:mm:ssZ (e.g., 2024-01-15T14:30:00Z). |
| endTime | String | Mandatory | End time. Use the format yyyy-MM-ddTHH:mm:ssZ (e.g., 2024-01-15T14:40:00Z). |
Response
Response Body
| Property name | Type | Description |
|---|---|---|
| Array | Array of Domain HTTP Codes object. |
Object: Domain HTTP Codes
| Parameter | Type | Description |
|---|---|---|
| serviceName | String | Domain name of the website acceleration service. |
| httpCodes | Array | List of HTTP code objects. See HTTP Code for details. |
Object: HTTP Code
| Parameter | Type | Description |
|---|---|---|
| timestamp | String | Timestamp in UTC, using the format yyyy-MM-ddTHH:mm:ssZ. |
| httpCodeValues | Map | Map of HTTP status codes to their request counts within a 5-minute interval. Example: {"200": 12345, "404": 67}. |
Status Codes, Error Codes and Error Messages
| Status Code | Error Code | Error Message |
|---|---|---|
| 400 | BadRequest | Bad request. |
| 400 | ServiceNames.Invalid | The list of service names is required and must contain valid names. |
| 400 | ServiceNames.NumberInvalid | Service names limit exceeded. |
| 400 | Time.Invalid | StartTime or EndTime is required. |
| 400 | MinuteIntervalTimeFormat.Invalid | StartTime or EndTime must use the format yyyy-MM-ddTHH:mm:ssZ. |
| 400 | TimeRange.Exceeded | The time range between StartTime and EndTime cannot exceed 24 hours. |
| 400 | TimeRange.EndBeforeStart | EndTime must be later than StartTime. |
Examples
Get HTTP Status Code Number
Request
POST /cdn/v1.0/analytics/httpCodes HTTP/1.1
{
"serviceNames":[
"api53-1121-auto-test.activity04.com",
"api53-core-c-alisg.tiktokv.com"
],
"startTime": "2025-09-09T12:35:00Z",
"endTime": "2025-09-09T12:45:00Z"
}
Successful Response Body
[
{
"serviceName": "api53-core-c-alisg.tiktokv.com",
"httpCodes": [
{
"timestamp": "2025-09-09T12:35:00Z",
"httpCodeValues": {
"400": 9,
"404": 424,
"405": 3
}
},
{
"timestamp": "2025-09-09T12:40:00Z",
"httpCodeValues": {
"400": 9,
"403": 1,
"404": 406
}
}
]
},
{
"serviceName": "api53-1121-auto-test.activity04.com",
"httpCodes": []
}
]