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 | String[] | Mandatory | Array of domain names, the max array size is 50. |
| startTime | String | Mandatory | Start time. Using the time format:yyyy-MM-ddTHH:mm:ssZ. |
| endTime | String | Mandatory | End time. Using the time format:yyyy-MM-ddTHH:mm:ssZ. Note: The duration between the start time and end time cannot be longer than 24 hours. |
Response
Response Body
| Property name | Type | Description |
|---|---|---|
| Array | Array of Domain HTTP Codes. |
Object: Domain HTTP Codes
| Parameter | Type | Description |
|---|---|---|
| serviceName | String | serviceName. |
| httpCodes | Object | List of HTTP codes and their number of requests values. Array of HTTP Code. |
Object: HTTP Code
| Parameter | Type | Description |
|---|---|---|
| timestamp | String | Specify in UTC using the format yyyy-MM-ddTHH:mm:ssZ. E.g., 2025-09-09T17:35:00Z will return data from 2025-09-09T17:35:00Z to 2025-09-09T17:39:59Z. |
| httpCodeValues | Map | Map of HTTP status codes and their corresponding request counts within a 5-minute interval. |
Status Codes, Error Codes and Error Messages
| Status Code | Error Code | Error Message |
|---|---|---|
| 400 | Request.BadRequest | Bad request. |
| 400 | ServiceNames.Invalid | Service Names is empty or invalid. |
| 400 | Time.Invalid | StartTime or EndTime is required. |
| 400 | MinuteIntervalTimeFormat.Invalid | StartTime or EndTime format in 'yyyy-MM-dd'T'HH:mm:ss'Z''. |
| 400 | TimeRange.Exceeded | The difference between EndTime and StartTime cannot exceed 24 hours. |
| 400 | TimeRange.EndBeforeStart | End time must be later than start time. |
| 400 | GetHttpCodes.OperationFailed | Get Http Codes failed. |
| 404 | Domain.NotFound | Domain is not found. |
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": []
}
]