Skip to content

API Reference

Base URLs:

  • Via UI proxy (recommended): http://localhost:8011/api
  • Direct backend access (localhost only): http://localhost:5001/api

All endpoints require HTTP Basic Authentication unless noted otherwise.

Endpoint summary

Authentication

MethodPathDescription
POST/api/loginValidate credentials
POST/api/change-passwordChange the admin password
GET/api/ws-tokenGet a single-use WebSocket auth token
GET/healthHealth check (no auth required)

Blacklist & Whitelist

MethodPathDescription
GET/api/blacklists/ipList IP blacklist entries
POST/api/blacklists/ipAdd an IP blacklist entry
DELETE/api/blacklists/ip/{id}Delete an IP blacklist entry
GET/api/blacklists/domainsList domain blacklist entries
POST/api/blacklists/domainsAdd a domain blacklist entry
DELETE/api/blacklists/domains/{id}Delete a domain blacklist entry
POST/api/blacklists/importImport from URL or inline content
POST/api/blacklists/import-geoImport geo-based IP block
GET/api/ip-whitelistList IP whitelist entries
POST/api/ip-whitelistAdd an IP whitelist entry
DELETE/api/ip-whitelist/{id}Delete an IP whitelist entry

Logs & Analytics

MethodPathDescription
GET/api/logsGet log entries (?limit=N)
GET/api/logs/statsGet log statistics
GET/api/logs/timeline24h traffic timeline
POST/api/logs/clearClear all logs
GET/api/security/scoreGet security score
GET/api/analytics/report/pdfDownload PDF analytics report

Settings & Maintenance

MethodPathDescription
GET/api/settingsGet all settings
PUT/api/settings/{name}Update a setting
GET/api/database/exportExport database (sensitive fields redacted)
GET/api/database/statsDatabase size and record counts
POST/api/database/optimizeRun VACUUM + ANALYZE
GET/api/cache/statisticsSquid cache metrics
POST/api/maintenance/reload-configSignal Squid to reload config

WebSocket

PathProtocolDescription
/api/ws/logs?token=TOKENws://Real-time log stream

Released under the MIT License.