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
| Parameter | Type | Required | Description |
|---|---|---|---|
| serviceNames | Array | Mandatory | Array of domain names, Maximum array size is 50. |
| startTime | String | Mandatory | Start 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). |
| endTime | String | Mandatory | End 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). |
| interval | String | Optional | Granularity 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 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 | Request.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 | IntervalType.Invalid | Interval type must be minute or day. |
| 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 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
}
}
]
}
]