Appearance
REST API
Base URL: http://<server>:8080/api. Responses are JSON unless stated otherwise. Send Authorization: Bearer <token> after login. Roles are admin and operator.
Authentication
| Method | Path | Access | Notes |
|---|---|---|---|
| POST | /auth/login | Public | {username, password} returns token and user |
| GET | /auth/me | Any user | Current user |
| POST | /auth/change-password | Any user | Password must be at least 8 characters |
Devices
| Method | Path | Access |
|---|---|---|
| GET / POST | /devices | Any / Admin |
| PUT / DELETE | /devices/:id | Admin |
| GET | /devices/unknown | Any user |
| DELETE | /devices/unknown/:ip | Admin |
Create a device with {name, ip_address, vendor} where vendor is netelastic or mikrotik.
Logs
All log endpoints require from and to timestamps. Optional filters are public_ip, public_port, event_type, inside_ip and username.
| Method | Path | Notes |
|---|---|---|
| GET | /logs/search | Paginated results; max limit 1,000 |
| GET | /logs/export.csv | CSV attachment; max 1,000,000 rows |
| GET | /logs/export.pdf | PDF attachment; max 5,000 rows |
Every search and export is written to the audit log.