Traffic
Usage reports.
6 endpoints
GET /api/auto-change
Get Auto Change
Read the automatic-change rules (rotate a node's IP list when traffic or time conditions are met).
Sudo admin only
Response 200 Successful Response
Errors: 401 Unauthorized, 403 Forbidden
curl -X GET 'https://YOUR-PANEL/api/auto-change' \
-H 'Authorization: Bearer $TOKEN'PUT /api/auto-change
Put Auto Change
Save the automatic-change rules.
Sudo admin only
Request body application/json · RulesPayload
| Field | Type | Required | Description |
|---|---|---|---|
rules | Rule[] | yes |
{
"rules": [
{
"id": "",
"name": "",
"enabled": true,
"host_ids": [],
"nodes": [],
"require_online": false,
"stages": [],
"stage": 0,
"armed_at": 0,
"last_change": 0
}
]
}Response 200 Successful Response
Errors: 401 Unauthorized, 403 Forbidden
curl -X PUT 'https://YOUR-PANEL/api/auto-change' \
-H 'Authorization: Bearer $TOKEN' \
-H 'Content-Type: application/json' \
-d '{"rules": [{"id": "", "name": "", "enabled": true, "host_ids": [], "nodes": [], "require_online": false, "stages": [], "stage": 0, "armed_at": 0, "last_change": 0}]}'GET /api/auto-change/status
Get Auto Change Status
cheap to poll: only the live part, plus where each rule's IP list stands
Sudo admin only
Response 200 Successful Response
Errors: 401 Unauthorized, 403 Forbidden
curl -X GET 'https://YOUR-PANEL/api/auto-change/status' \
-H 'Authorization: Bearer $TOKEN'POST /api/auto-change/{rule_id}/reset
Reset Rule
Back to stage 1, watching from now on; the hosts keep their address
Sudo admin only
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
rule_id | path | string | yes |
Response 200 Successful Response
Errors: 401 Unauthorized, 403 Forbidden
curl -X POST 'https://YOUR-PANEL/api/auto-change/<rule_id>/reset' \
-H 'Authorization: Bearer $TOKEN'POST /api/auto-change/{rule_id}/switch
Switch Now
Fire the rule's current stage right away
Sudo admin only
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
rule_id | path | string | yes |
Response 200 Successful Response
Errors: 401 Unauthorized, 403 Forbidden
curl -X POST 'https://YOUR-PANEL/api/auto-change/<rule_id>/switch' \
-H 'Authorization: Bearer $TOKEN'GET /api/traffic/live
Live Traffic
Current speed (bytes/s) per user, per inbound and per node
Any admin
Response 200 Successful Response
Errors: 401 Unauthorized, 403 Forbidden
curl -X GET 'https://YOUR-PANEL/api/traffic/live' \
-H 'Authorization: Bearer $TOKEN'