API
Use these endpoints to generate sessions and ingest resolver hits programmatically.
All endpoints are HTTP/JSON. No authentication is required for the demo environment.
POST /generate
Create a new session. Returns an HTML fragment used by the UI.
curl -XPOST https://whoresolved.me/generate
POST /api/ingest
Internal endpoint used by the DNS server. You can simulate resolver traffic with the payload below.
curl -XPOST https://whoresolved.me/api/ingest \
-H "Content-Type: application/json" \
-d '{"session":"","resolver_ip":"1.2.3.4","resolver_port":"53","ecs":"Unknown","asn":"Unknown","city":"Unknown","country":"Unknown","when":"2025-01-01T00:00:00Z"}'
GET /query?id=<session>
Returns the latest resolver table plus out-of-band counter updates. Used by HTMX polling.