All endpoints are prefixed with /api. Requires JWT Bearer token in the Authorization header (except login/setup).
{"code": 0, "data": { ... }}
{"code": 40001, "message": "error_key"}
| Method | Path | Description |
|---|
| POST | /api/auth/login | Login |
| POST | /api/auth/logout | Logout |
| POST | /api/auth/refresh | Refresh token |
| GET | /api/auth/me | Current user |
| POST | /api/auth/2fa/setup | Configure 2FA |
| POST | /api/auth/2fa/verify | Verify 2FA |
| Method | Path | Description |
|---|
| GET | /api/sites | List sites |
| POST | /api/sites | Create site |
| GET | /api/sites/{id} | Site details |
| PUT | /api/sites/{id} | Update site |
| DELETE | /api/sites/{id} | Delete site |
| GET | /api/sites/{id}/cache | Cache config |
| PUT | /api/sites/{id}/cache | Update cache |
| POST | /api/sites/{id}/cache/purge | Purge cache |
| Method | Path | Description |
|---|
| GET | /api/databases | List databases |
| POST | /api/databases | Create database |
| DELETE | /api/databases/{id} | Delete database |
| POST | /api/databases/{id}/export | Export |
| POST | /api/databases/{id}/import | Import |
| Method | Path | Description |
|---|
| GET | /api/wordpress/instances | List instances |
| POST | /api/wordpress/install-quick | Quick install |
| POST | /api/wordpress/scan | Scan instances |
| POST | /api/wordpress/instances/{id}/security-scan | Security scan |
| Method | Path | Description |
|---|
| POST | /api/backup/restic/init | Initialize repository |
| POST | /api/backup/restic/snapshot | Create snapshot |
| GET | /api/backup/restic/snapshots | List snapshots |
| POST | /api/backup/restic/restore | Restore snapshot |
| POST | /api/backup/restic/forget | Prune snapshots |
| GET | /api/backup/restic/stats | Repository stats |
| Method | Path | Description |
|---|
| GET | /api/system/stats | System status |
| POST | /api/system/upgrade | Panel upgrade |
| POST | /api/system/service-upgrade | Service upgrade |
| Method | Path | Description |
|---|
| GET | /api/monitoring/history | History data |
| GET | /api/monitoring/redis-history | Redis history |
| GET | /api/monitoring/cgroup-pressure | cgroup pressure |
| Method | Path | Description |
|---|
| POST | /api/sites/{id}/staging | Create staging site |
| DELETE | /api/sites/{id}/staging | Delete staging site |
| POST | /api/sites/{id}/staging/push | Push staging to production |
| POST | /api/sites/{id}/staging/pull | Pull production to staging |
Request body for push/pull: mode param accepts all, files, or database
| Method | Path | Description |
|---|
| GET | /api/sites/{id}/cdn | Get CDN configuration |
| PUT | /api/sites/{id}/cdn | Configure CDN (API token + Zone ID) |
| DELETE | /api/sites/{id}/cdn | Remove CDN integration |
| POST | /api/sites/{id}/cdn/purge | Purge CDN cache |
| Method | Path | Description |
|---|
| POST | /api/wordpress/instances/{id}/security-scan | Scan for CVE vulnerabilities |
| GET | /api/wordpress/vulnerability-db/status | Wordfence DB sync status |
| POST | /api/wordpress/vulnerability-db/sync | Sync vulnerability feed |
| PUT | /api/wordpress/vulnerability-db/token | Set API token |
| DELETE | /api/wordpress/vulnerability-db/token | Remove API token |
| Method | Path | Description |
|---|
| GET | /api/wordpress/instances/{id}/auto-update | Get auto-update config |
| PUT | /api/wordpress/instances/{id}/auto-update | Set auto-update schedule |
| Method | Path | Description |
|---|
| GET | /api/backup/restic/schedule | Get backup schedule |
| PUT | /api/backup/restic/schedule | Set backup schedule |
| Method | Path | Description |
|---|
| POST | /api/backup/restic/restore | Restore snapshot with mode param: all / files / database |
| Method | Path | Description |
|---|
| GET | /api/redis/{id}/acl | List ACL users |
| POST | /api/redis/{id}/acl | Create ACL user |
| DELETE | /api/redis/{id}/acl/{username} | Delete ACL user |
| Method | Path | Description |
|---|
| GET | /api/users | List users |
| POST | /api/users | Create user with role |
| PUT | /api/users/{id} | Update user role/plan |
| PUT | /api/users/{id}/sites | Assign sites to user |
| GET | /api/users/{id}/permissions | Get user permissions |