Skip to content

API Reference

Base URLs:

  • Through the web reverse proxy (recommended): https://localhost:8443/api
  • Directly to the backend (localhost only): http://127.0.0.1:5001/api

Every endpoint accepts either HTTP Basic or JWT bearer authentication unless noted otherwise. Most successful responses follow the envelope {"status": "success", "data": ...}; the authentication endpoints (/api/auth/login, /api/auth/refresh, /api/ws-token, /api/logout, /api/change-password) return a flat object with status and the payload fields at the top level. Errors are always {"status": "error", "detail": "..."}.

Authentication

MethodPathDescription
POST/api/auth/loginValidate credentials, return access and refresh JWTs
POST/api/auth/refreshExchange a refresh token for a new pair
POST/api/logoutRevoke the JWT used to authenticate the request
POST/api/change-passwordChange the admin password
GET/api/ws-tokenIssue a single-use WebSocket token
GET/healthLiveness check (no auth)
GET/api/healthLiveness check via API prefix (no auth)

Blacklist and whitelist

MethodPathDescription
GET/api/ip-blacklistList IP blacklist entries
POST/api/ip-blacklistAdd an IP blacklist entry
DELETE/api/ip-blacklist/{id}Delete an IP blacklist entry
POST/api/ip-blacklist/bulk-deleteDelete multiple IP blacklist entries
DELETE/api/ip-blacklist/clear-allRemove all IP blacklist entries
POST/api/ip-blacklist/importImport IPs from URL or inline content
GET/api/domain-blacklistList domain blacklist entries
POST/api/domain-blacklistAdd a domain blacklist entry
DELETE/api/domain-blacklist/{id}Delete a domain blacklist entry
POST/api/domain-blacklist/bulk-deleteDelete multiple domain blacklist entries
DELETE/api/domain-blacklist/clear-allRemove all domain blacklist entries
POST/api/domain-blacklist/importImport domains from URL or inline content
POST/api/blacklists/importUnified import (type = "ip" or "domain")
POST/api/blacklists/import-geoImport country-IP ranges by country code
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
GET/api/domain-whitelistList domain whitelist entries (DNS-bypass)
POST/api/domain-whitelistAdd a domain whitelist entry
DELETE/api/domain-whitelist/{id}Delete a domain whitelist entry

Logs and analytics

MethodPathDescription
GET/api/logsPaginated proxy access logs
GET/api/logs/statsAggregate counts (total, blocked, IP blocks)
GET/api/logs/timelinePer-hour traffic series
POST/api/logs/clearClear all logs
POST/api/logs/clear-oldDelete logs older than the retention period
GET/api/statusProxy service status
GET/api/traffic/statisticsTraffic statistics
GET/api/clients/statisticsClient statistics
GET/api/domains/statisticsTop accessed domains
GET/api/security/scoreSecurity score and recommendations
GET/api/security/cveCVE check for the bundled Squid version
GET/api/analytics/shadow-itShadow-IT detection
GET/api/analytics/user-agentsService-type breakdown by user agent
GET/api/analytics/file-extensionsFile extension distribution
GET/api/analytics/top-domainsTop domains for the cloud visualisation
GET/api/dashboard/summaryAggregated dashboard data in a single call
GET/api/audit-logAudit log of administrative actions
GET/api/waf/statsWAF statistics
GET/api/waf/categoriesWAF rule categories with toggle state
POST/api/waf/categories/toggleEnable or disable a category at runtime
POST/api/waf/test-ruleEvaluate a regex rule against a sample request
POST/api/counters/resetReset all counters

Settings and maintenance

MethodPathDescription
GET/api/settingsList all settings
PUT/api/settings/{name}Update a single setting
POST/api/settingsBulk update settings (flat name → value object)
GET/api/database/sizeDatabase file size
GET/api/database/exportExport database as JSON (sensitive columns redacted)
GET/api/database/statsRow counts and database size
POST/api/database/optimizeRun VACUUM + REINDEX
POST/api/database/resetTruncate every exported table except users
GET/api/cache/statisticsSquid cache metrics
POST/api/maintenance/reload-configSignal Squid to reload configuration
POST/api/maintenance/reload-dnsReload dnsmasq
POST/api/maintenance/clear-cacheClear the Squid disk cache
GET/api/maintenance/backup-configDownload a configuration backup
POST/api/maintenance/restore-configRestore configuration from a backup
GET/api/maintenance/check-cert-securityInspect SSL bump certificate strength
GET/api/security/download-caDownload the proxy CA certificate
GET/api/security/rate-limitsList IPs that are currently rate-limited
DELETE/api/security/rate-limits/{ip}Clear the rate-limit lockout for an IP
POST/api/notifications/testSend a test notification (Gotify, Telegram, webhook, Teams, SIEM)

Internal

MethodPathDescription
POST/api/internal/alertReceives WAF block notifications. Authentication required; the WAF authenticates with BASIC_AUTH_USERNAME and BASIC_AUTH_PASSWORD
POST/api/dns/detectProbe a target subnet for Pi-hole or AdGuard instances

WebSocket

PathProtocolDescription
/api/ws/logs?token=<token>ws:// or wss://Real-time log stream (single-use token)

Released under the MIT License.