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 | String[] | Mandatory | Array of domain names, the max array size is 50. |
| startTime | String | Mandatory | Start time. If the interval is minute,use the format yyyy-MM-ddTHH:mm:ssZ.If the interval is day,use the format yyyy-MM-ddT00:00:00Z. |
| endTime | String | Mandatory | End time. If the interval is minute,use the format yyyy-MM-ddTHH:mm:ssZ.If the interval is day,use the format yyyy-MM-ddT00:00:00Z. |
| interval | String | Optional | Interval of data spot, could be "minute", "day". For "minute", data spot is for 5 minutes, and for "day", data spot is one day. Default is "minute". Note: If interval = minute, the time range between start and end cannot exceed 24 hours. If interval = day, the time range cannot exceed 30 days. |
Response
Response Body
| Property name | Type | Description |
|---|---|---|
| Array | Array of Domain HTTP Codes. |
Object: Domain HTTP Codes
| Parameter | Type | Description |
|---|---|---|
| serviceName | String | Name of domain. |
| 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 | HTTP code and it's number of requests in 5 minutes. Format will be map which includes HTTP code and number of requests for this HTTP code. |
Status Codes, Error Codes and Error Messages
| Status Code | Error Code | Error Message |
|---|---|---|
| 400 | Request.BadRequest | Bad request. |
| 400 | ServiceNames.Invalid | Domains is empty or invalid. |
| 400 | Time.Invalid | StartTime or EndTime is required. |
| 400 | IntervalType.Invalid | Interval type must be minute or day. |
| 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 | GetOriginHttpCodes.OperationFailed | Get Origin Http Codes failed. |
| 404 | ServiceName.NotFound | Domain is not found. |
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
}
}
]
}
]