## Package monitor (`package-monitor`)

Admin only: bandwidth and connections of each purchased package over the last minute.

Authentication: Admin only · Docs: https://www.gocdn888.com/en/docs/api/package-monitor

### GET `/api/v2/package-monitor`

Package monitor · Authentication: Admin only

Query parameters:

| Field | Type | Required | Description |
|---|---|---|---|
| `page` | integer |  | Page number, starting from 1 Default: 1 |
| `page_size` | integer |  | Items per page Default: 20 |
| `sort` | string |  | Sort fields, comma-separated; prefix `-` for descending, e.g. `-created_at,id` |
| `tenant_id` | integer |  | Admin only: filter by tenant (a malformed value returns 422). Ignored for tenant credentials, which only see their own tenant's data |
| `tenant_ids` | string |  | Admin only: only these tenants, comma-separated positive integers, at most 200 after deduplication (more, or a malformed value, returns 422); a single ID works too. Filters only and does not switch the request scope; combined with tenant_id and other filters as an intersection. A tenant credential sending a non-empty value gets 403 |
| `user_package_id` | integer |  | Filter by user package id. |
| `node_id` | integer |  | Node ID |
| `upids` | string |  | Only these user packages: comma-separated positive integers, at most 200 after deduplication (more, or a malformed value, returns 422); combined with user_package_id as an intersection. |
| `node_ids` | string |  | Only these nodes: comma-separated positive integers, at most 200 after deduplication (more, or a malformed value, returns 422); combined with node_id as an intersection. |

```sh
curl "https://panel.example.com/api/v2/package-monitor" \
  -H "X-API-Key: $GOCDN_API_KEY"
```

### GET `/api/v2/package-monitor/{id}/nodes`

Package monitor by node · Authentication: Admin only

```sh
curl "https://panel.example.com/api/v2/package-monitor/{id}/nodes" \
  -H "X-API-Key: $GOCDN_API_KEY"
```

Package monitor object:

| Field | Type | Required | Description |
|---|---|---|---|
| `bandwidth_bps` | integer |  | Sum of outbound bandwidth across nodes over the last minute (bit/s). |
| `bandwidth_limit_mbps` | integer |  | Effective bandwidth quota (including add-ons); -1 means unlimited. |
| `connections` | integer |  | Sum of per-node peak connection counts over the last minute. |
| `connections_limit` | integer |  | Effective connection quota (including add-ons); -1 means unlimited. |
| `items` | PackageMonitorNode[] |  | Items on this page |
| `name` | string |  | Name |
| `tenant_id` | integer |  | Owner tenant (user) ID |
| `user_package_id` | integer |  | Purchased package ID. |
