# 回源请求数

`GET /cdn/data/{domain}/request_origin`

按时间段统计 CDN 回源请求数。

Base URL: https://api.bitiful.com

Authentication: API key in header `Authorization`

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `domain` | string | yes | CDN 加速域名。 |

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `start_time` | integer | yes | 统计起始时间，Unix 时间戳，单位**秒**。 |
| `end_time` | integer | yes | 统计截止时间，Unix 时间戳，单位**秒**，必须大于 `start_time`。 |
| `period` | enum | no | 统计粒度：按 5 分钟、小时、天或月聚合。按天、按月以北京时间划分。部分早期创建的加速域名不支持 `monthly`。 |

## Example request

```bash
curl -X GET https://api.bitiful.com/cdn/data/cdn.example.com/request_origin
```

## Responses

- **200**: 按 `period` 聚合的请求数，单位次。
- **401**: API Token 缺失或无效。
- **403**: 参数不合法、域名不属于当前账户、额度不足或账户欠费等，原因见 `message`。
- **500**: 服务端错误，请稍后重试。

### Example response (200)

```json
{
  "data": [
    {
      "timestamp": 1735660800,
      "value": 10240
    },
    {
      "timestamp": 1735664400,
      "value": 8731
    }
  ]
}
```
