Skip to main content
Every endpoint here needs a superadmin session, with two exceptions: GET /api/proxies works for any signed-in user (the record editor uses it), and the Traefik and Caddy endpoints take the connect key or a proxy’s own token. See API overview for how to authenticate.
For what these objects do, see Proxied records, Connecting Traefik, Connecting Caddy, Routers, services and middlewares and Records from Traefik’s routers. dnz-proxy nodes, entry points and analytics are in the dnz-proxy API.

Settings and proxies

Settings. GET /api/settings/proxy returns: backend and backend_locked are gone. A PUT with the older {"backend": …} still works and reads as on (traefik, dnz) or off.

Routes, routers, services and middlewares

Entry points. Under dnz-proxy, routes/entry-points lists the proxy’s own entry points. Under Traefik it lists the ones its API lists. from says which (dnz-proxy / traefik). Without either, and always under Caddy, it offers web (:80) and websecure (:443). http and https are the ones on port 80 and 443 that a new route uses. One-step routes. In POST /api/proxies/{id}/routes, http_entry_point and https_entry_point default to the http and https entry points above. Auth users. POST /api/proxy/auth-user with {"user", "password"} returns {"line"} for basic auth. Add "digest": true and an optional "realm" for digest auth.

Checks and DNS

Records from Traefik’s routers

A host has host, zone_id, zone, routers, records (how many DNZ keeps) and status:

Traefik’s HTTP provider

Run it from the Traefik’s machine, so DNZ recognizes it by that address. See Connecting Traefik.

Caddy config loader

It returns a whole Caddy configuration, which names the loader again so Caddy keeps asking. A Caddy that isn’t approved yet, or any Caddy while proxying is off, gets one with no sites.
Run it from the Caddy’s machine, so DNZ recognizes it by that address. See Connecting Caddy.

Objects

A proxy

  • kind is traefik, dnz (dnz-proxy) or caddy. It is set when the proxy is added and can’t be changed.
  • Leave traefik_api_password out to keep the stored one; null removes it.
  • Add "connects_from": "10.0.0.12" to set the address the Traefik calls DNZ from. Leave it out to keep the current one, or send null to recognize the Traefik by ipv4 / ipv6 again.
Responses also carry:

A router

  • matchers are conditions such as {"kind": "Header", "name": "X-Env", "values": ["prod"], "not": false}. kind is Path, PathPrefix, PathRegexp, Method, Header, HeaderRegexp, Query, QueryRegexp or ClientIP; name is the header or query parameter.
  • extra_rule is Traefik rule syntax.
  • options holds tls.options, tls.domains and observability, in Traefik’s shape.

A service

  • servers may also be plain URLs (weight 1). A server can add "preserve_path": true.
  • kind is loadBalancer (the default), weighted, mirroring or failover.
  • options hold the rest in Traefik’s shape. For a load balancer: healthCheck (besides path and interval), sticky.cookie (besides name), passiveHealthCheck and responseForwarding. For the others, the whole service:
Unknown fields are refused, since Traefik would reject the proxy’s whole configuration over one.

A middleware

  • kind is its Traefik type (redirectScheme, headers, chain, …; the setup’s kinds lists them), or raw for any other. config holds exactly that one type.
  • The first kinds (redirect_https, basic_auth, strip_prefix, ip_allow_list, rate_limit) are still accepted.
  • A chain’s middlewares and an error-pages service are names in the same proxy.

Objects: TLS, transports, TCP and UDP

TLS, transports, TCP and UDP are objects under /api/proxies/{id}/objects: {"kind", "name", "config"}, with config in Traefik’s shape. Names of other objects go as they are (name@provider for another provider’s). Unknown fields are refused. The setup lists certificates without keyFile, with has_key and info (names, validity, issuer).

Proxying records

On records, proxies puts an A, AAAA or CNAME record behind one or more proxies ([1, 3]); [] is DNS only. Each proxy needs a router for the record’s name. The bulk API’s set_proxies moves a name’s records at once. See Records API.