Skip to main content

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

ParameterTypeRequiredDescription
serviceNamesArrayMandatoryArray of domain names, Maximum array size is 50.
startTimeStringMandatoryStart time. Use the format yyyy-MM-ddTHH:mm:ssZ (e.g., 2024-01-15T14:30:00Z).
endTimeStringMandatoryEnd time. Use the format yyyy-MM-ddTHH:mm:ssZ (e.g., 2024-01-15T14:40:00Z).

Response

Response Body

Property nameTypeDescription
ArrayArray of Domain HTTP Codes object.

Object: Domain HTTP Codes

ParameterTypeDescription
serviceNameStringDomain name of the website acceleration service.
httpCodesArrayList of HTTP code objects. See HTTP Code for details.
Object: HTTP Code
ParameterTypeDescription
timestampStringTimestamp in UTC, using the format yyyy-MM-ddTHH:mm:ssZ.
httpCodeValuesMapMap 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 CodeError CodeError Message
400BadRequestBad request.
400ServiceNames.InvalidThe list of service names is required and must contain valid names.
400ServiceNames.NumberInvalidService names limit exceeded.
400Time.InvalidStartTime or EndTime is required.
400MinuteIntervalTimeFormat.InvalidStartTime or EndTime must use the format yyyy-MM-ddTHH:mm:ssZ.
400TimeRange.ExceededThe time range between StartTime and EndTime cannot exceed 24 hours.
400TimeRange.EndBeforeStartEndTime 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": []
}
]