Skip to main content

Get Origin Status Code Number

This API is used to retrieve the data of the number of HTTP status codes returned by the origin server, aggregated in 5-minute or 1-day intervals.

Request​

Request-Line​

POST /cdn/v1.0/analytics/originHttpCodes HTTP/1.1

Request Parameters​

Body Parameters​

ParameterTypeRequiredDescription
serviceNamesArrayMandatoryArray of domain names, Maximum array size is 50.
startTimeStringMandatoryStart time. Format varies by interval:
• If the interval is minute, use yyyy-MM-ddTHH:mm:ssZ (e.g., 2024-01-15T14:30:00Z).
• If interval is day, use yyyy-MM-ddT00:00:00Z (e.g., 2024-01-15T00:00:00Z).
endTimeStringMandatoryEnd time. Format varies by interval:
• If the interval is minute, use yyyy-MM-ddTHH:mm:ssZ (e.g., 2024-01-15T14:30:00Z).
• If interval is day, use yyyy-MM-ddT00:00:00Z (e.g., 2024-01-15T00:00:00Z).
intervalStringOptionalGranularity of data points. Supported values:
• minute (default) - Each data point represents 5 minutes. Time range cannot exceed 24 hours.
• day - Each data point represents one day. Time range cannot exceed 90 days.

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
400Request.BadRequestBad 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.
400IntervalType.InvalidInterval type must be minute or day.
400TimeRange.ExceededThe time range between StartTime and EndTime cannot exceed 24 hours.
400TimeRange.EndBeforeStartEndTime must be later than StartTime.

Examples​

Get Origin Status Code Number​

Request​

POST /cdn/v1.0/analytics/originHttpCodes HTTP/1.1

{
"serviceNames":[
"api53-1121-auto-test.activity04.com",
"api53-core-c-alisg.tiktokv.com"
],
"startTime": "2025-09-09T00:00:00Z",
"endTime": "2025-09-10T00:00:00Z",
"interval": "day"
}

Successful Response Body​

[
{
"serviceName": "api53-1121-auto-test.activity04.com",
"httpCodes": [
{
"timestamp": "2025-09-09T00:00:00Z",
"httpCodeValues": {
"301": 5,
"404": 3
}
}
]
},
{
"serviceName": "api53-core-c-alisg.tiktokv.com",
"httpCodes": [
{
"timestamp": "2025-09-09T00:00:00Z",
"httpCodeValues": {
"200": 2,
"400": 5347,
"403": 248,
"404": 562104,
"405": 3149,
"501": 422,
"502": 464,
"503": 928,
"530": 1
}
}
]
}
]