API Reference REST API endpoints for devices, logs, alerts, settings, and users.
All endpoints are under /api/v1/. Interactive docs are at /api/docs (Swagger UI) and /api/redoc.
Authentication — Include Authorization: Bearer <token> in every request. Get a token from POST /api/v1/auth/jwt/login with form fields username (email) and password.
Devices
Method Route Description Auth GET /api/v1/devicesList all devices with optional ?group=, ?status=, ?search= filters Viewer+ POST /api/v1/devicesCreate a new device. Body: { name, ip, group?, location?, alerts_enabled? } Admin GET /api/v1/devices/{id}Get a single device with its last ping result Viewer+ PUT /api/v1/devices/{id}Update device fields Admin DEL /api/v1/devices/{id}Delete device and all its ping logs Admin POST /api/v1/devices/{id}/pingTrigger an immediate ping for one device Admin
Ping Logs
Method Route Description Auth GET /api/v1/ping-logsPaginated log list. Query params: device_id, status, start, end, limit, offset Viewer+
Alerts
Method Route Description Auth GET /api/v1/alertsList alert events with optional ?device_id= and date range filters Viewer+
Dashboard
Method Route Description Auth GET /api/v1/dashboard/statsSummary counts: total devices, online, offline, alerts, avg latency Viewer+
Import / Export
Method Route Description Auth GET /api/v1/import-export/exportExport devices. Query param: ?format=csv|xlsx|json|yaml Admin POST /api/v1/import-export/importUpload a file to import devices. Multipart form with field file Admin
Settings
Method Route Description Auth GET /api/v1/settingsList all application settings Viewer+ PUT /api/v1/settings/{key}Update one setting. Body: { "value": "…" } Admin POST /api/v1/settings/test-smtpSend a test email to the configured alert address Admin POST /api/v1/settings/test-telegram?chat_id=…Send a test Telegram message to the specified chat ID Admin
Users Admin
Method Route Description Auth GET /api/v1/users-adminList all registered users Admin PUT /api/v1/users-admin/{id}/roleChange a user's role. Body: { "role": "admin" | "viewer" } Admin PUT /api/v1/users-admin/{id}/activeToggle account active state. Body: { "is_active": true | false } Admin PUT /api/v1/users-admin/{id}/passwordAdmin-force a new password for another user Admin DEL /api/v1/users-admin/{id}Permanently delete a user account Admin
Auth
Method Route Description Auth POST /api/v1/auth/jwt/loginLog in. Form fields: username (email) + password. Returns { access_token } Public POST /api/v1/auth/registerRegister a new user. Body: { email, password } Public
Full interactive API docs are available at /api/docs (Swagger) and /api/redoc on your running PyPing instance.