API Reference
Every route, with the role it needs, its parameters, its answers, and a call you can run.
This page is rendered from the server’s own route definitions, so an answer here is an answer this build gives.
Every answer carries Cache-Control: no-store, so no browser or proxy keeps one. Every answer
also carries Content-Security-Policy: default-src 'none'; frame-ancestors 'none',
X-Content-Type-Options: nosniff, Referrer-Policy: no-referrer and
Cross-Origin-Resource-Policy: same-origin.
Getting in
Section titled “Getting in”The API listens on a Unix domain socket. api_listen adds addresses with TLS, for a script
on another host, and Console and remote API says how. Every example below
uses $S for that socket and one credential. This sequence makes both, on a server with
no accounts in it:
S=./data/run/api.sock # --runtime-dir, plus api.sock
# The first administrator, from the one-time token a first start writes.TOKEN=$(cat ./data/state/setup-token)curl -s -X POST --unix-socket $S -H 'content-type: application/json' \ -d "{\"token\":\"$TOKEN\",\"user\":\"alice\",\"password\":\"a long enough passphrase\"}" \ http://localhost/api/setup
# Log in. The cookie comes back in a header, and the forgery token in the body.BODY=$(curl -s -D headers.txt -X POST --unix-socket $S \ -H 'content-type: application/json' \ -d '{"user":"alice","password":"a long enough passphrase"}' \ http://localhost/api/session)JAR=$(grep -i '^set-cookie:' headers.txt | sed 's/^[Ss]et-[Cc]ookie: //' | cut -d';' -f1)CSRF=$(printf '%s' "$BODY" | python3 -c 'import json,sys; print(json.load(sys.stdin)["csrf"])')
# A token for everything after this. It is shown once, so keep it now.TOK=$(curl -s -X POST --unix-socket $S \ -H "cookie: $JAR" -H "x-csrf-token: $CSRF" \ -H 'content-type: application/json' -d '{"label":"a dashboard"}' \ http://localhost/api/tokens \ | python3 -c 'import json,sys; print(json.load(sys.stdin)["token"])')A="authorization: Bearer $TOK"A program sends $A. A browser sends the cookie, and then every change also needs the
x-csrf-token header: a browser sends a cookie whether or not the page meant to.
Five routes answer without credentials: GET /api/health, GET /api/openapi.json,
GET /api/setup, POST /api/setup and POST /api/session. Everything else answers 401
without one.
One credential is not a header. A caller on the management socket whose user is the one the
server runs as, or root, is accepted as an operator for the configuration routes, the
revision routes, the blocking routes, the cache routes and the zone routes. That is what tadoru config apply and
tadoru blocklist status use, and it is why those commands need no token. Every other
route still wants a header or a cookie.
Every failure is a problem document (RFC 9457), as application/problem+json. That
includes a body this server cannot read: one that is not JSON, one whose JSON a route
cannot use, a missing content type, and a PUT body that is not text. A failure about a
file also names the setting and the line.
A body past the limit of its route is a problem document too, body-too-large, which the
guard gives before any handler. The limit is 16 MiB for the import of a zone and smaller for
every other route. One answer is the framework’s own, with a bare status and no problem
document: a request that outlives the timeout. It reaches no handler.
Two kinds of example need a value of yours before they answer as printed. A path parameter carries a value of the shape a real one has, and it names nothing on your server. The setup body carries a token of the right shape rather than yours. Yours is in the state root, and the block above reads it. Every other example runs as it is.
A read of a file of settings, such as GET /api/server or GET /api/blocking, answers
every field, with null where no one value applies. In every other answer, a field a schema
marks as not required is a field the answer leaves out rather than sends as null.
The schema of a setting in /api/openapi.json also carries the checks of the server:
minimum, maximum, enum, minLength, maxLength, pattern, minItems and maxItems.
A value outside them is refused. On a read, default is the value the server uses for a key
the file leaves out. A body has no default, because a key that a body leaves out stays as it
is. x-restart: true marks a setting some changes of which wait for the next start, and its
description says which. x-max-bytes counts bytes, where maxLength counts characters.
Health
Section titled “Health”GET /api/health
Section titled “GET /api/health”Liveness, and what is running.
Open: no credentials, because a monitoring system has to be able to ask whether the
server is up. On a TCP door, a caller with no credential gets Liveness alone, and the
whole report needs a credential of any role. A credential that proves nobody is 401 there,
and a dead session cookie is cleared, so a monitor with a revoked token fails loudly. The
socket answers the whole report to every caller.
This takes no parameters and no body.
| Answer | Body | Means |
|---|---|---|
| 200 | Health or Liveness as application/json |
The server is answering: the whole report, or Liveness alone on a TCP door with no credential |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
On a TCP door, a credential that proves no caller. A dead session cookie is cleared with Max-Age=0 |
| 429 | Problem as application/problem+json |
On a TCP door, too many failed attempts with this credential, or too many attempts at once |
| 503 | Problem as application/problem+json |
On a TCP door, a credential whose read of the accounts did not end within 3 seconds (accounts-busy). The cookie is not cleared |
curl -s --unix-socket $S \ http://localhost/api/health{ "blocking": { "empty": [ { "id": "hagezi-pro", "problem": "it holds 3 block rules, and the fewest this source is allowed is 100", "state": "refused" } ], "ok": false, "serving": 1, "sources": 2 }, "certificates": [ { "expires_at": 1789900000, "file": "/etc/letsencrypt/live/dns.example.net/fullchain.pem", "ok": false, "state": "expires_soon" } ], "clock": { "floor": 1788998400, "grace": true, "grace_left": 540, "graced": 3, "now": 1789137416, "refused": 0, "state": "unconfirmed", "witnessed": false }, "dnssec": { "anchors": { "last_success": 1789130000, "ok": true, "stale_at": 1789389200, "trusted": [ 20326, 38696 ] }, "negative_trust_anchors": [ { "note": "ticket 7", "state": "active", "suffix": "broken.example.", "until": 1789223816 } ], "ok": true }, "last_failure": { "at": 1789137416, "problem": "server.toml, setting max_retries: 20 is outside 0 to 10", "revision": 3 }, "listen": [ "127.0.0.1:5300" ], "live": true, "revision": 4, "upstreams": 2}GET /api/info
Section titled “GET /api/info”What runs, and since when.
Role: any role. Not open, because the version and the build tell an attacker which known
defects apply. The socket proves nobody here, as for GET /api/session. Any role also reads
update, by choice, so a viewer of the console learns of a release too.
This takes no parameters and no body.
| Answer | Body | Means |
|---|---|---|
| 200 | Info as application/json |
What runs. version of a build of main names the number of its run, such as 0.1.0-dev.42. build is absent where the build did not know its commit. node is name of node.toml, or the host name of the machine, and absent with neither. waits_for_restart names the settings of node.toml whose change waits for a restart, and is absent while none waits. update is what the update check found, present only while update_check is on: waiting before the first check, ok after a good one, and failed with its reason after a failure, which keeps latest, url, prerelease, newer and good_at of the last good check. checked_at and good_at are seconds since 1970 |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or credentials this server does not accept: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading the store failed |
| 503 | Problem as application/problem+json |
Nothing handed the API what runs, as in an API mounted without the server behind it. Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ http://localhost/api/infoA failure, with no good check yet:
{ "contract": "3", "started_at": 1789137416, "update": { "checked_at": 1789137716, "reason": "connect", "state": "failed" }, "uptime_seconds": 3600, "version": "0.1.0"}A failure after a good check that found a newer release, which it keeps:
{ "contract": "3", "started_at": 1789137416, "update": { "checked_at": 1789224116, "good_at": 1789137716, "latest": "1.3.0-rc.1", "newer": true, "prerelease": true, "reason": "timeout", "state": "failed", "url": "https://github.com/bitcldr/tadoru/releases/tag/v1.3.0-rc.1" }, "uptime_seconds": 90000, "version": "0.1.0"}A failure after a good check that found no release:
{ "contract": "3", "started_at": 1789137416, "update": { "checked_at": 1789224116, "good_at": 1789137716, "newer": false, "reason": "limit", "state": "failed" }, "uptime_seconds": 90000, "version": "0.1.0"}The update check is off, so update is absent:
{ "build": "c1847881", "contract": "3", "node": "dns1", "started_at": 1789137416, "uptime_seconds": 3600, "version": "0.1.0", "waits_for_restart": [ "udp_workers" ]}A good check that found a newer release:
{ "contract": "3", "started_at": 1789137416, "update": { "checked_at": 1789137716, "latest": "1.2.0", "newer": true, "prerelease": false, "state": "ok", "url": "https://github.com/bitcldr/tadoru/releases/tag/v1.2.0" }, "uptime_seconds": 3600, "version": "0.1.0"}A good check that found no release:
{ "contract": "3", "started_at": 1789137416, "update": { "checked_at": 1789137716, "newer": false, "state": "ok" }, "uptime_seconds": 3600, "version": "0.1.0"}The update check is on, and no check has ended yet:
{ "contract": "3", "started_at": 1789137416, "update": { "state": "waiting" }, "uptime_seconds": 60, "version": "0.1.0"}GET /api/openapi.json
Section titled “GET /api/openapi.json”The OpenAPI document for this API.
Open: no credentials, because it is documentation.
This takes no parameters and no body.
| Answer | Body | Means |
|---|---|---|
| 200 | object as application/json |
The OpenAPI document, as OpenAPI 3.1 |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
curl -s --unix-socket $S \ http://localhost/api/openapi.jsonSession
Section titled “Session”DELETE /api/session
Section titled “DELETE /api/session”End this session.
Role: any role, and your own session only. For a cookie rather than a bearer token.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | cookie |
string | yes | The session cookie, as tadoru_session=<id>.<secret>. This route is for a cookie only |
| header | x-csrf-token |
string | yes | The forgery token the login answered with. Required here, because another site must not be able to log somebody out |
| Answer | Body | Means |
|---|---|---|
| 204 | none | The session is over |
| 400 | Problem as application/problem+json |
A bearer token was sent, and this route ends a cookie’s session. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No session to end. No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 403 | Problem as application/problem+json |
The session’s forgery token is missing or wrong: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Ending the session failed |
| 503 | Problem as application/problem+json |
The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X DELETE --unix-socket $S -H "cookie: $JAR" -H "x-csrf-token: $CSRF" \ http://localhost/api/sessionGET /api/session
Section titled “GET /api/session”The session of the cookie, read back, so a page that reloads keeps its session.
Role: any role, with a session cookie. The read does not move the end of the session. A bearer token is refused, because it has no session, and the socket proves nobody here.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | cookie |
string | yes | The session cookie, as tadoru_session=<id>.<secret>. This route is for a cookie only |
| Answer | Body | Means |
|---|---|---|
| 200 | Identity as application/json |
The session of the cookie, with its forgery token and its end. The answer carries Cache-Control: no-store and Vary: Cookie |
| 400 | Problem as application/problem+json |
A bearer token was sent, and this route reads a cookie’s session. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No session: no cookie, a cookie this server does not know, or a session that ended. No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading the store failed |
| 503 | Problem as application/problem+json |
A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "cookie: $JAR" \ http://localhost/api/session{ "csrf": "3635e66ffa341ec61f379781d219408e302da11d0c9731cbd10b6ba83dd74309", "expires_at": 1789166216, "id": "b470dfe3a6d01b92", "role": "admin", "user": "alice"}POST /api/session
Section titled “POST /api/session”Log in, and get a session cookie.
Open: no credentials, because this is where credentials are presented.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| body | password |
string | yes | The password. A wrong one costs the same time as a name that does not exist. |
| body | user |
string | yes | The name the account logs in with. |
| Answer | Body | Means |
|---|---|---|
| 200 | Identity as application/json |
Logged in, with the cookie set. The answer carries Cache-Control: no-store and Vary: Cookie |
| 400 | Problem as application/problem+json |
A body this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
Those are not credentials this server knows |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 415 | Problem as application/problem+json |
The content type is not one this route takes. A JSON body needs application/json, and a configuration file is sent as text |
| 429 | Problem as application/problem+json |
Too many failed attempts for that name from this caller. The count is per caller, so one caller cannot lock a name out for another |
| 500 | Problem as application/problem+json |
Reading or writing the store failed. The answer names no cause, and the log of the server says why |
| 503 | Problem as application/problem+json |
Too many passwords are being checked at once. The check is deliberately slow, so a few run at a time. Or: A read of the accounts did not end within 3 seconds (accounts-busy). Or: The bodies in flight filled their budget for 5 seconds (busy). |
curl -s -X POST --unix-socket $S \ -H 'content-type: application/json' \ -d '{"password":"a long enough passphrase","user":"alice"}' \ http://localhost/api/session{ "csrf": "3635e66ffa341ec61f379781d219408e302da11d0c9731cbd10b6ba83dd74309", "expires_at": 1789166216, "id": "b470dfe3a6d01b92", "role": "admin", "user": "alice"}GET /api/setup
Section titled “GET /api/setup”Whether this server still needs its first administrator, and whether the setup token in the state root still works. A token that expired is not usable, and a restart of the server writes a new one.
Open: it needs no credential, and it ignores one that the request carries. The answer names no token and no path.
This takes no parameters and no body.
| Answer | Body | Means |
|---|---|---|
| 200 | SetupState as application/json |
Where setup stands. token_usable is there while needed is true |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 500 | Problem as application/problem+json |
Reading the store failed. The answer names no cause, and the log of the server says why |
| 503 | Problem as application/problem+json |
A read of the accounts did not end within 3 seconds (accounts-busy) |
curl -s --unix-socket $S \ http://localhost/api/setupNobody can administer this server yet, and the token in the state root expired:
{ "needed": true, "token_usable": false}An administrator can log in:
{ "needed": false}POST /api/setup
Section titled “POST /api/setup”Create the first administrator, once, with the setup token.
Open: no credentials, because the token is the credential and it works once.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| body | password |
string | yes | Their password, at least 12 characters. There are no rules about which characters: length is what makes a password hard to guess. |
| body | token |
string | yes | The token from the file in the state root. |
| body | user |
string | yes | The name the first administrator will have: lower case letters, digits, and - _ ., at most 64 characters. |
| Answer | Body | Means |
|---|---|---|
| 200 | Identity as application/json |
The first administrator now exists |
| 400 | Problem as application/problem+json |
A body this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
Not the setup token, or it is spent |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
An account with that name already exists |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 415 | Problem as application/problem+json |
The content type is not one this route takes. A JSON body needs application/json, and a configuration file is sent as text |
| 422 | Problem as application/problem+json |
A name this server will not carry, or a password too short to be one |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait |
| 500 | Problem as application/problem+json |
Reading or writing the store failed, or hashing the password. The answer names no cause, and the log of the server says why |
| 503 | Problem as application/problem+json |
Too many passwords are being checked at once. The check is deliberately slow, so a few run at a time. Or: A read of the accounts did not end within 3 seconds (accounts-busy). Or: The bodies in flight filled their budget for 5 seconds (busy). |
curl -s -X POST --unix-socket $S \ -H 'content-type: application/json' \ -d '{"password":"a long enough passphrase","token":"aa11bb22cc33.9c459c458bee553bf742646574ac3299e0d29315c25230cfbabc28950e8c0f3a","user":"alice"}' \ http://localhost/api/setup{ "id": "b470dfe3a6d01b92", "role": "admin", "user": "alice"}Configuration
Section titled “Configuration”GET /api/blocking
Section titled “GET /api/blocking”What this server blocks: blocking.toml.
Two answers, and Accept picks one, the same as /api/server. A generation without the file
runs every default, so the JSON is the defaults and the text is empty.
Role: any role. On the socket, the server’s own uid or root needs no credential.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | accept |
string | no | text/plain answers with the file’s own text, comments and all, which is what PUT takes back. Anything else answers with the settings as JSON |
| Answer | Body | Means |
|---|---|---|
| 200 | Blocking as application/json |
The blocking settings and lists that are running. Every setting is present in an answer, with null where no one value applies: the addresses of the address mode, and the numbers that each source takes from the gate. The action of a source is allow for a source that allows, and null for one that blocks, so a source written back keeps no key that an older build refuses. enabled is true or false, and a whole read sent back with PATCH writes it, so a build older than the key refuses the file. An allow source takes no exceptions, so its exceptions is null. With Accept: text/plain the answer is the file’s own text instead, with the same entity tag, and empty text where the running generation has no blocking.toml. Carries etag. |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Asked for the text, and reading the generation failed |
| 503 | Problem as application/problem+json |
A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ http://localhost/api/blocking{ "allow": [], "answer_ttl_seconds": 2, "block": [ { "name": "ads.example.com", "note": "the banner of the news site" } ], "block_report": true, "block_v4": null, "block_v6": null, "bypass": [], "canary": true, "cname_blocking": true, "enabled": true, "max_compiled_bytes": null, "max_count_drift_percent": null, "max_invalid_percent": null, "max_source_bytes": null, "min_refresh_minutes": 60, "min_rules": null, "min_share_percent": null, "mode": "zero", "private_relay": "allow", "refresh_hours": 24, "regex": [], "source": [ { "action": null, "exceptions": "source", "format": "auto", "id": "hagezi-pro", "max_compiled_bytes": null, "max_count_drift_percent": null, "max_invalid_percent": null, "max_source_bytes": null, "min_rules": null, "min_share_percent": null, "path": null, "refresh_hours": null, "subtree": true, "url": "https://cdn.jsdelivr.net/gh/hagezi/dns-blocklists@latest/wildcard/pro-onlydomains.txt" } ]}PATCH /api/blocking
Section titled “PATCH /api/blocking”Change the settings and the lists of blocking.toml that this names, and leave the rest of the
file alone.
Role: operator or admin. On the socket, the server’s own uid or root needs none.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | if-match |
string | no | The ETag of a read of the configuration, as the read gave it, or a list of such tags. It names the revision and its record. A change written against a tag that does not run is refused with 409 |
| header | idempotency-key |
string | no | Names this change, so sending it again answers with the first outcome rather than applying it twice |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | allow |
array of BlockingEntry |
no | Names this operator allows whatever the lists say. |
| body | answer_ttl_seconds |
integer | no | How long a blocked answer lives, in seconds. Two by default: an operator who allows a name waits that long rather than five minutes. |
| body | block |
array of BlockingEntry |
no | Names this operator blocks whatever a block list says. An allow source, and an @@ line of a source with exceptions = "global", still allow them. |
| body | block_report |
boolean | no | Whether a TXT question about a blocked name answers with the list and the rule. On by default. |
| body | block_v4 |
string | no | The IPv4 address to answer with. Only where the mode is address: any other mode refuses an address. |
| body | block_v6 |
string | no | The IPv6 address to answer with. Only where the mode is address: any other mode refuses an address. |
| body | bypass |
array of string | no | A client address or subnet a rule never blocks. Empty by default. |
| body | canary |
boolean | no | Whether use-application-dns.net is answered NXDOMAIN, which tells Firefox that this network filters DNS. On by default. Turn it off on a server that filters nothing. |
| body | cname_blocking |
boolean | no | Whether the names inside an answer are tested as well as the name asked for. On by default. It catches a tracker reached through an alias of the site that asked for it. |
| body | enabled |
boolean | no | Whether blocking is on. false turns it off for every client, as a revision that a restart keeps: no rule is tested, and the canary and Private Relay answers are off too. On by default, and absent means on: a read gives true or false. A build older than this key refuses a file that holds it, whatever it says. The switch of tadoru blocking disable turns blocking off in memory beside this, and blocking is in force only where both say on. The lists stay current while it is off. |
| body | max_compiled_bytes |
integer | no | The most bytes one source’s compiled set may take. 256 mebibytes by default. |
| body | max_count_drift_percent |
integer | no | How far below the count its own header declares a body may read, as a percentage. 5 by default: a download a proxy cut short passes every other check. |
| body | max_invalid_percent |
integer | no | How much of a body’s rule lines may be unreadable, as a percentage. 20 by default: an error page from a proxy reads as thousands of unreadable lines. |
| body | max_source_bytes |
integer | no | The most decoded bytes one source’s body may hold. 64 mebibytes by default. |
| body | min_refresh_minutes |
integer | no | The shortest interval this server will use, in minutes, whatever a publisher declares. An hour by default, at least 1, and at most the hours of refresh_hours. The publisher decides their cadence and this machine decides what it can afford. |
| body | min_rules |
integer | no | The fewest rules of its action a published list may compile to: block rules for a block source, and allow rules for an allow source. 100 by default. A source with a path keeps its own floor of 1, because a file in the config root is what you typed. |
| body | min_share_percent |
integer | no | How much of what a source held before a new body must still hold, as a percentage. 50 by default: a list that lost half its names is a broken publisher rather than an edit. |
| body | mode |
string | no | What to answer for a name a rule blocks: zero for the null address, nodata for an empty answer, nxdomain, or address for one of your own. zero by default, which is what keeps a client talking to this server. address needs block_v4 or block_v6. |
| body | private_relay |
string | no | What to do about the names Apple Private Relay starts up through: allow, which is the default, or block, which turns Private Relay off for this network. |
| body | refresh_hours |
integer | no | How many hours between reads of a source, where the source names no number of its own. A day by default, which is what both publishers’ lists change in. |
| body | regex |
array of BlockingRegex |
no | Rules that match a name by its shape rather than by the name. |
| body | source |
array of BlockingSource |
no | The lists to block from, in the order they are tried. |
| Answer | Body | Means |
|---|---|---|
| 200 | Applied as application/json |
Applied, with the revision it became |
| 400 | Problem as application/problem+json |
A body or a header this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role below admin whose change gives what an admin alone gives (needs-admin): private = true on a source, a url outside the catalog of known lists through the outbound proxy, or url fetches through a proxy that no list fetch of the revision that runs went through, that the revision that runs does not hold already. Its sources lists each source as id and grant, which is private, proxied or proxy. A role that is not allowed to make this change, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
A revision that moved or an If-Match that does not match (a tag of another record, as from before a restore, a revision alone, a weak tag, or an empty list), or a change already refused |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 4 MiB (body-too-large). |
| 415 | Problem as application/problem+json |
The content type is not one this route takes. A JSON body needs application/json, and a configuration file is sent as text |
| 422 | Problem as application/problem+json |
A setting or a list the server cannot use, or a key that blocking.toml does not take |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Recording the change failed, or reading the credential failed |
| 503 | Problem as application/problem+json |
Not settled inside the write timeout, and the outcome is unknown. Or the server is stopping (stopping): that change was refused and changed nothing, and the same change can be sent again once the server is back. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X PATCH --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{"block":[{"name":"ads.example.com","note":"the banner of the news site"}],"mode":"nxdomain"}' \ http://localhost/api/blocking{ "command": "api:3e5a91c07bd24f68a1c9e0d2", "revision": 2}PUT /api/blocking
Section titled “PUT /api/blocking”Replace blocking.toml with the text in the body.
Role: operator or admin. On the socket, the server’s own uid or root needs none.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | if-match |
string | no | The ETag of a read of the configuration, as the read gave it, or a list of such tags. It names the revision and its record. A change written against a tag that does not run is refused with 409 |
| header | idempotency-key |
string | no | Names this change, so sending it again answers with the first outcome rather than applying it twice |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | text/plain |
string | yes | The whole file, as its own text. Not JSON: this replaces the file, comments and all, byte for byte. Any content type is taken. A server that has no blocking.toml gets one, and an empty body writes an empty file, so every setting is at its default and every list is empty |
| Answer | Body | Means |
|---|---|---|
| 200 | Applied as application/json |
Applied, with the revision it became |
| 400 | Problem as application/problem+json |
A body or a header this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role below admin whose change gives what an admin alone gives (needs-admin): private = true on a source, a url outside the catalog of known lists through the outbound proxy, or url fetches through a proxy that no list fetch of the revision that runs went through, that the revision that runs does not hold already. Its sources lists each source as id and grant, which is private, proxied or proxy. A role that is not allowed to make this change, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
A revision that moved or an If-Match that does not match (a tag of another record, as from before a restore, a revision alone, a weak tag, or an empty list), a change already refused (already-refused) by its key, while the same text sent again without a key is judged again, or a key that names a change of the records of a zone |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 4 MiB (body-too-large). |
| 422 | Problem as application/problem+json |
A file the server cannot use, or a key that blocking.toml does not take |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Recording the change failed, or reading the credential failed |
| 503 | Problem as application/problem+json |
Not settled inside the write timeout, and the outcome is unknown. Or the server is stopping (stopping): that change was refused and changed nothing, and the same change can be sent again once the server is back. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X PUT --unix-socket $S -H "$A" \ -H 'content-type: text/plain' \ --data-binary $'# what this house blocks\nmode = "nxdomain"\n\n[[block]]\nname = "ads.example.com"\nnote = "the banner"\n' \ http://localhost/api/blocking{ "command": "api:9d04e7b3c15a28f6e0b1c4a7", "revision": 2}POST /api/blocking/check
Section titled “POST /api/blocking/check”Check a change of blocking.toml as its save would check it, and change nothing.
Role: operator or admin. On the socket, the server’s own uid or root needs none.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | if-match |
string | no | The ETag of a read of the configuration, as the save takes it. A check against a tag that does not run is refused with 409, as its save is |
| header | idempotency-key |
string | no | The key of the save that this check speaks for. A key that names a change answers with its outcome, as the save would. Any other key runs every check, though the change writes what runs, as a save with a key makes a revision then. Without a key, the repeat of a refused change is checked again, as the save judges it again, and the repeat of a change that landed answers that. The check records nothing, so the key stays free for the save |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated check and ignored for a bearer token |
| body | allow |
array of BlockingEntry |
no | Names this operator allows whatever the lists say. |
| body | answer_ttl_seconds |
integer | no | How long a blocked answer lives, in seconds. Two by default: an operator who allows a name waits that long rather than five minutes. |
| body | block |
array of BlockingEntry |
no | Names this operator blocks whatever a block list says. An allow source, and an @@ line of a source with exceptions = "global", still allow them. |
| body | block_report |
boolean | no | Whether a TXT question about a blocked name answers with the list and the rule. On by default. |
| body | block_v4 |
string | no | The IPv4 address to answer with. Only where the mode is address: any other mode refuses an address. |
| body | block_v6 |
string | no | The IPv6 address to answer with. Only where the mode is address: any other mode refuses an address. |
| body | bypass |
array of string | no | A client address or subnet a rule never blocks. Empty by default. |
| body | canary |
boolean | no | Whether use-application-dns.net is answered NXDOMAIN, which tells Firefox that this network filters DNS. On by default. Turn it off on a server that filters nothing. |
| body | cname_blocking |
boolean | no | Whether the names inside an answer are tested as well as the name asked for. On by default. It catches a tracker reached through an alias of the site that asked for it. |
| body | enabled |
boolean | no | Whether blocking is on. false turns it off for every client, as a revision that a restart keeps: no rule is tested, and the canary and Private Relay answers are off too. On by default, and absent means on: a read gives true or false. A build older than this key refuses a file that holds it, whatever it says. The switch of tadoru blocking disable turns blocking off in memory beside this, and blocking is in force only where both say on. The lists stay current while it is off. |
| body | max_compiled_bytes |
integer | no | The most bytes one source’s compiled set may take. 256 mebibytes by default. |
| body | max_count_drift_percent |
integer | no | How far below the count its own header declares a body may read, as a percentage. 5 by default: a download a proxy cut short passes every other check. |
| body | max_invalid_percent |
integer | no | How much of a body’s rule lines may be unreadable, as a percentage. 20 by default: an error page from a proxy reads as thousands of unreadable lines. |
| body | max_source_bytes |
integer | no | The most decoded bytes one source’s body may hold. 64 mebibytes by default. |
| body | min_refresh_minutes |
integer | no | The shortest interval this server will use, in minutes, whatever a publisher declares. An hour by default, at least 1, and at most the hours of refresh_hours. The publisher decides their cadence and this machine decides what it can afford. |
| body | min_rules |
integer | no | The fewest rules of its action a published list may compile to: block rules for a block source, and allow rules for an allow source. 100 by default. A source with a path keeps its own floor of 1, because a file in the config root is what you typed. |
| body | min_share_percent |
integer | no | How much of what a source held before a new body must still hold, as a percentage. 50 by default: a list that lost half its names is a broken publisher rather than an edit. |
| body | mode |
string | no | What to answer for a name a rule blocks: zero for the null address, nodata for an empty answer, nxdomain, or address for one of your own. zero by default, which is what keeps a client talking to this server. address needs block_v4 or block_v6. |
| body | private_relay |
string | no | What to do about the names Apple Private Relay starts up through: allow, which is the default, or block, which turns Private Relay off for this network. |
| body | refresh_hours |
integer | no | How many hours between reads of a source, where the source names no number of its own. A day by default, which is what both publishers’ lists change in. |
| body | regex |
array of BlockingRegex |
no | Rules that match a name by its shape rather than by the name. |
| body | source |
array of BlockingSource |
no | The lists to block from, in the order they are tried. |
| body | text/plain |
string | yes | The change, as its save takes it. A JSON object is checked as PATCH /api/blocking applies it. A text/plain body is checked as PUT /api/blocking applies the same text. The content type picks one, so a check takes these two types alone, where PUT takes text in any type. Up to 4 MiB |
| Answer | Body | Means |
|---|---|---|
| 200 | CheckedChange as application/json |
The change passed every check of its save, or its save would make no new revision (unchanged). Whether a source answers is not checked: the refresh after the save reads it |
| 400 | Problem as application/problem+json |
A body or a header this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role below admin whose change gives what an admin alone gives (needs-admin): private = true on a source, a url outside the catalog of known lists through the outbound proxy, or url fetches through a proxy that no list fetch of the revision that runs went through, that the revision that runs does not hold already. Its sources lists each source as id and grant, which is private, proxied or proxy. A role that is not allowed to make this change, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
A revision that moved or an If-Match that does not match, a change that was refused before (already-refused) by its key, a change that has not settled, or a key that names a change of the records of a zone. The save answers the same |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 4 MiB (body-too-large). |
| 415 | Problem as application/problem+json |
A content type other than application/json and text/plain |
| 422 | Problem as application/problem+json |
A setting or a list the server cannot use, with its file, setting and line, as the save refuses it. A rule of regex is named by its place, such as regex[1].pattern, and an entry of source, block or allow by its list. The line of a JSON change is a line of the file that the change makes. Where a zone owes a result of a change of records that the save tries first, a refusal carries "results_owed": true |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading the ledger failed, or reading the credential failed |
| 503 | Problem as application/problem+json |
The check did not finish inside the write timeout (still-checking), and it wrote nothing. Or too many changes or checks wait (too-many-changes): at most four checks wait at once, and past that a check answers this at once, so a save keeps at least four places. Or the server is stopping (stopping). Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X POST --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{"regex":[{"pattern":"^ads\\."}]}' \ http://localhost/api/blocking/check{ "results_owed": false, "revision": 41, "unchanged": false, "waits_for_restart": []}PATCH /api/clients
Section titled “PATCH /api/clients”Change the clients or the groups of clients.toml that this names, and leave the rest of the
file alone.
Role: operator or admin. On the socket, the server’s own uid or root needs none.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | if-match |
string | no | The ETag of a read of the configuration, as the read gave it, or a list of such tags. It names the revision and its record. A change written against a tag that does not run is refused with 409 |
| header | idempotency-key |
string | no | Names this change, so sending it again answers with the first outcome rather than applying it twice |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | client |
array of ClientsClient |
no | The clients this server knows about. 256 at most. |
| body | group |
array of ClientsGroup |
no | The groups a client joins. 64 at most, and default is one of them whether the file writes it, so a file that leaves it out holds 63 others. |
| Answer | Body | Means |
|---|---|---|
| 200 | Applied as application/json |
Applied, with the revision it became |
| 400 | Problem as application/problem+json |
A body or a header this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change the configuration, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
A revision that moved or an If-Match that does not match (a tag of another record, as from before a restore, a revision alone, a weak tag, or an empty list), or a change already refused |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 4 MiB (body-too-large). |
| 415 | Problem as application/problem+json |
The content type is not one this route takes. A JSON body needs application/json, and a configuration file is sent as text |
| 422 | Problem as application/problem+json |
A client, a group or a list the server cannot use, a key that clients.toml does not take, or a file that disagrees with blocking.toml: a group naming a source it does not define, or a group gone that one of its [[regex]] rules names |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Recording the change failed, or reading the credential failed |
| 503 | Problem as application/problem+json |
Not settled inside the write timeout, and the outcome is unknown. Or the server is stopping (stopping): that change was refused and changed nothing, and the same change can be sent again once the server is back. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X PATCH --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{"client":[{"addresses":["192.168.1.20"],"group":"kids","name":"kids-tablet"}],"group":[{"block":["games.example.net"],"name":"kids","sources":["hagezi-pro"]}]}' \ http://localhost/api/clients{ "command": "api:5c7e02a9d14b3f68e1a0b7c4", "revision": 2}PUT /api/clients
Section titled “PUT /api/clients”Replace clients.toml with the text in the body.
Role: operator or admin. On the socket, the server’s own uid or root needs none.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | if-match |
string | no | The ETag of a read of the configuration, as the read gave it, or a list of such tags. It names the revision and its record. A change written against a tag that does not run is refused with 409 |
| header | idempotency-key |
string | no | Names this change, so sending it again answers with the first outcome rather than applying it twice |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | text/plain |
string | yes | The whole file, as its own text. Not JSON: this replaces the file, comments and all, byte for byte. Any content type is taken. The file is checked whole and with blocking.toml. A server that has no clients.toml gets one, and an empty body writes an empty file, so no client and no group but default is left |
| Answer | Body | Means |
|---|---|---|
| 200 | Applied as application/json |
Applied, with the revision it became |
| 400 | Problem as application/problem+json |
A body or a header this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change the configuration, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
A revision that moved or an If-Match that does not match (a tag of another record, as from before a restore, a revision alone, a weak tag, or an empty list), a change already refused (already-refused) by its key, while the same text sent again without a key is judged again, or a key that names a change of the records of a zone |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 4 MiB (body-too-large). |
| 422 | Problem as application/problem+json |
A file the server cannot use, a key that clients.toml does not take, or a file that disagrees with blocking.toml: a group naming a source it does not define, or a group gone that one of its [[regex]] rules names |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Recording the change failed, or reading the credential failed |
| 503 | Problem as application/problem+json |
Not settled inside the write timeout, and the outcome is unknown. Or the server is stopping (stopping): that change was refused and changed nothing, and the same change can be sent again once the server is back. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X PUT --unix-socket $S -H "$A" \ -H 'content-type: text/plain' \ --data-binary $'# the devices of the house\n[[group]]\nname = "kids"\nsources = "all"\n\n[[client]]\nname = "kids-tablet"\naddresses = ["192.168.1.20"]\ngroup = "kids"\n' \ http://localhost/api/clients{ "command": "api:4b8e1f06c27d93a5e0c1b7d2", "revision": 2}POST /api/clients/check
Section titled “POST /api/clients/check”Check a change of clients.toml as its save would check it, and change nothing.
Role: operator or admin. On the socket, the server’s own uid or root needs none.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | if-match |
string | no | The ETag of a read of the configuration, as the save takes it. A check against a tag that does not run is refused with 409, as its save is |
| header | idempotency-key |
string | no | The key of the save that this check speaks for. A key that names a change answers with its outcome, as the save would. Any other key runs every check, though the change writes what runs, as a save with a key makes a revision then. Without a key, the repeat of a refused change is checked again, as the save judges it again, and the repeat of a change that landed answers that. The check records nothing, so the key stays free for the save |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated check and ignored for a bearer token |
| body | client |
array of ClientsClient |
no | The clients this server knows about. 256 at most. |
| body | group |
array of ClientsGroup |
no | The groups a client joins. 64 at most, and default is one of them whether the file writes it, so a file that leaves it out holds 63 others. |
| body | text/plain |
string | yes | The change, as its save takes it. A JSON object is checked as PATCH /api/clients applies it. A text/plain body is checked as PUT /api/clients applies the same text. The content type picks one, so a check takes these two types alone, where PUT takes text in any type. The file is checked with blocking.toml, as the save checks it. Up to 4 MiB |
| Answer | Body | Means |
|---|---|---|
| 200 | CheckedChange as application/json |
The change passed every check of its save, or its save would make no new revision (unchanged) |
| 400 | Problem as application/problem+json |
A body or a header this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change the configuration, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
A revision that moved or an If-Match that does not match, a change that was refused before (already-refused) by its key, a change that has not settled, or a key that names a change of the records of a zone. The save answers the same |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 4 MiB (body-too-large). |
| 415 | Problem as application/problem+json |
A content type other than application/json and text/plain |
| 422 | Problem as application/problem+json |
A client, a group or a list the server cannot use, a key that clients.toml does not take, or a file that disagrees with blocking.toml, with its file, setting and line, as the save refuses it. A group naming a source that blocking.toml does not define names the group, such as group.kids.sources. A group gone that a [[regex]] rule names names the rule in blocking.toml, such as regex[0].groups. The line of a JSON change is a line of the file that the change makes. Where a zone owes a result of a change of records that the save tries first, a refusal carries "results_owed": true |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading the ledger failed, or reading the credential failed |
| 503 | Problem as application/problem+json |
The check did not finish inside the write timeout (still-checking), and it wrote nothing. Or too many changes or checks wait (too-many-changes): at most four checks wait at once, and past that a check answers this at once, so a save keeps at least four places. Or the server is stopping (stopping). Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X POST --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{"client":[{"addresses":["192.168.1.20"],"group":"kids","name":"kids-tablet"}]}' \ http://localhost/api/clients/check{ "results_owed": false, "revision": 41, "unchanged": false, "waits_for_restart": []}GET /api/forwarders/catalog
Section titled “GET /api/forwarders/catalog”The public forwarders, in the order that the console shows them.
Role: any role, as the other reads of the settings. The table is fixed by the release, and
in_use is the one field that reads the running revision. The socket proves nobody here.
This takes no parameters and no body.
| Answer | Body | Means |
|---|---|---|
| 200 | array of ForwarderCatalogEntry as application/json |
Every public forwarder profile, in the order of the table. in_use lists the transports whose every entry stands in one list of the running revision, the forwarders list or the to of one [[forward]], in any order. A part of a list is not in use |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or credentials this server does not accept: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential, or too many attempts at once: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 503 | Problem as application/problem+json |
A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ http://localhost/api/forwarders/catalog[ { "as_of": "2026-11-15", "dnssec": "yes", "ecs": "no", "entries": [ { "entries": [ "1.1.1.1:53", "1.0.0.1:53", "[2606:4700:4700::1111]:53", "[2606:4700:4700::1001]:53" ], "transport": "udp" }, { "entries": [ "tls://one.one.one.one (1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, 2606:4700:4700::1001)" ], "transport": "tls" }, { "entries": [ "https://one.one.one.one/dns-query (1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, 2606:4700:4700::1001)" ], "transport": "https" } ], "filters": [], "homepage": "https://developers.cloudflare.com/1.1.1.1/", "id": "cloudflare", "in_use": [ "tls" ], "operator": "Cloudflare", "privacy": "https://developers.cloudflare.com/1.1.1.1/privacy/public-dns-resolver/", "service": "1.1.1.1" }]GET /api/node
Section titled “GET /api/node”What this machine does.
Two answers, and Accept picks one, the same as /api/server.
Role: any role.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | accept |
string | no | text/plain answers with the file’s own text, comments and all, which is what PUT takes back. Anything else answers with the settings as JSON |
| Answer | Body | Means |
|---|---|---|
| 200 | Node as application/json |
The node settings that are running. Every field is present in an answer: the shape is the file’s, where a key can be absent and the default applies. With Accept: text/plain the answer is the file’s own text instead, with the same entity tag. Carries etag. |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | Problem as application/problem+json |
Asked for the text, and the running generation has no such file |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Asked for the text, and reading the generation failed |
| 503 | Problem as application/problem+json |
A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ http://localhost/api/node{ "allow_recursion": [ "127.0.0.0/8", "::1", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "169.254.0.0/16", "fe80::/10", "fc00::/7" ], "api_listen": [], "listen": [ "127.0.0.1:5300" ], "metrics_listen": "127.0.0.1:9153", "udp_workers": 0}PATCH /api/node
Section titled “PATCH /api/node”Change what this machine does, one setting at a time.
Role: operator or admin.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | if-match |
string | no | The ETag of a read of the configuration, as the read gave it, or a list of such tags. It names the revision and its record. A change written against a tag that does not run is refused with 409 |
| header | idempotency-key |
string | no | Names this change, so sending it again answers with the first outcome rather than applying it twice |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | acme_challenge |
string | no | How the authority checks that the names are yours. "http-01" asks on port 80 of acme_http_listen, and "tls-alpn-01" asks on the TLS listeners. "dns-01" asks for a TXT record in a zone of this server, which the server writes and removes. The default is "http-01". |
| body | acme_contact |
array of string | no | The mailto: addresses of the account at the authority. Empty by default. |
| body | acme_directory |
string | no | The ACME authority: "letsencrypt", "letsencrypt-staging", or the https:// URL of a directory. The default is "letsencrypt". |
| body | acme_dns01_skip |
array of string | no | The addresses that the wait of dns-01 does not ask, such as the public address of a router with no NAT loopback, which drops a query from inside to its own public address. IP addresses with no port, up to 16. Empty by default, and a non-empty list needs acme_challenge to be "dns-01". |
| body | acme_http_listen |
array of string | no | Where to answer the HTTP-01 challenge, on TCP for every entry. An address with a port after it, or without one to default to 80. The rules of tls_listen apply, but an entry takes no device, and an address and port of another TCP listener cannot also be here. One of http_listen can, and then answers both. Empty by default, and "http-01" needs one. |
| body | acme_names |
array of string | no | The names on the certificate that the server gets and renews from an ACME authority, such as Let’s Encrypt. A host name per entry, up to 100. An IP address and a name written twice are refused. A wildcard, one *. label before a host name, needs acme_challenge to be "dns-01". Empty by default, which turns ACME off. A non-empty list cannot go with tls_certificate_file or tls_pkcs12_file, and it needs acme_terms_agreed and a TLS listener. |
| body | acme_terms_agreed |
boolean | no | Whether you read the terms of the authority and agree to them. false by default, and a non-empty acme_names needs true. |
| body | advertise_encrypted |
boolean | no | Whether this node answers _dns.resolver.arpa with its encrypted endpoints, where tls_server_name names it. true by default. |
| body | allow_recursion |
array of string | no | Which clients this server resolves for. An address or a subnet per entry, up to 64, and a query from anywhere else is answered REFUSED. An entry that starts with !, such as !10.1.0.0/16, denies its range inside a wider entry, and the entry with the longest prefix that holds a client decides. The default is loopback and the private ranges. An empty list resolves for nobody, which is a server that answers its own zones alone. |
| body | api_client_header |
string | no | The header a proxy of api_trust names the client in. The default is "X-Forwarded-For". |
| body | api_listen |
array of string | no | Where to serve the management API alone, over TLS, for a script on another host. An address with a port after it, or without one to default to 8453. The rules of console_listen apply: a non-empty list needs a certificate source, and a wildcard address is refused. Each address serves TLS 1.3 alone. A caller there gets none of the trust that the socket gives its owner. Empty by default. The file also takes one address as a string, and "" as an empty list. |
| body | api_trust |
array of string | no | The reverse proxies whose client header console_listen and api_listen believe. An address or a subnet per entry, up to 16, and empty by default. An entry that starts with !, such as !192.168.1.66, denies its range inside a wider entry, and the entry with the longest prefix that holds a peer decides. Allow entries that together hold every public IPv4 address or all of 2000::/4, such as 0.0.0.0/0 or 2000::/4, are refused, whatever the deny entries beside them. |
| body | cache_snapshot_minutes |
integer | no | How often the answer cache is written to disk, in minutes, so a restart starts warm. 0 to 1440, and 15 by default. 0 turns the snapshot off and deletes the file. |
| body | clock_grace_minutes |
integer | no | How long after a start the clock counts as unconfirmed where no time client has set it. 0 to 60 minutes, and 10 by default. 0 trusts a clock past the build floor from the start. A shorter window applies at once; a longer one waits for the next start. |
| body | clock_grace_names |
array of string | no | The names a time client on this network asks for, each with every name below it. They answer without DNSSEC validation while the clock is not trusted. Up to 64 entries, and the default covers the pools of the common Linux distributions and the public time servers. |
| body | clock_synchronized_file |
string | no | The file whose presence says a time client set the clock since this machine booted. An absolute path, or an empty string where there is none. The default is /run/systemd/timesync/synchronized, the file systemd-timesyncd writes, on every platform. |
| body | console_http3 |
boolean | no | Whether each address of console_listen also answers HTTP/3 on its UDP port, the same address and port. false by default. No 0-RTT, and the same rules as over TCP. The UDP port of a door is its own whatever this says, so no DNS listener can take it. |
| body | console_listen |
array of string | no | Where to serve the web console and the management API, over TLS, on one origin. An address with a port after it, or without one to default to 5343. The rules of listen apply, but an entry takes no device, and an address and port of another TCP listener cannot also be here. Empty by default. A non-empty list needs a certificate: tls_certificate_file and tls_private_key_file, tls_pkcs12_file, or acme_names. A binary built without the console refuses a non-empty list. |
| body | ecs_trust |
array of string | no | Senders whose EDNS Client Subnet option this server honours, where ecs_accept is "trusted". A resolver in front of this one, whose own clients the option names. An address or a subnet per entry, up to 64, and empty by default. |
| body | encrypted_allow_recursion |
array of string | no | Which clients this server resolves for when a query arrives encrypted, over TLS. It replaces allow_recursion for those queries alone. The same entries, deny entries too, and the same default: loopback and the private ranges. A phone outside the house needs ["0.0.0.0/0", "::/0"], which gives any stranger who connects the resolver, the blocking and the local zones. |
| body | exclude_ports |
array of PortEntry |
no | Source ports this server never sends a query from, such as a port a VPN on this machine uses. A number for one port, or a string such as "8000-8100" for a range. Empty by default, and then the operating system picks each port. A list that leaves fewer than 4096 of the ports from 1024 up is refused, because a resolver with few source ports has given up the protection they give against a forged answer. |
| body | http3_listen |
array of string | no | Where to answer DNS over HTTPS on HTTP/3, on UDP for every entry, with the certificate of DNS over TLS. An address with a port after it, or without one to default to 443. The rules of listen apply, the device included. An address and port in listen or quic_listen cannot also be here, and one in https_listen can, because that one is TCP. Empty by default. A non-empty list needs a certificate: tls_certificate_file and tls_private_key_file, or tls_pkcs12_file. |
| body | http_client_header |
string | no | The header a trusted proxy names the client in. The server reads the last address of the last such header. The default is "X-Forwarded-For". |
| body | http_help_page |
boolean | no | Whether a browser that opens the path of DNS over HTTPS gets a page that says how to use the address, rather than an error. A GET with no variable dns, whose Accept prefers text/html, gets it. true by default. |
| body | http_listen |
array of string | no | Where to answer plain HTTP from a reverse proxy that holds the TLS session with the client. An address with a port after it, or without one to default to 8053. The rules of listen apply, the device included, and an address and port of another listener cannot also be here, except one of acme_http_listen. It answers only the proxies in http_trust, and 403 to anybody else. An address that acme_http_listen names too also answers the HTTP-01 challenge, to anybody. Empty by default. |
| body | http_path |
string | no | The URL path of every HTTP listener. It starts with /, holds no ?, # or space, and is not under /.well-known/acme-challenge/, the path of the HTTP-01 challenge. The default is "/dns-query". |
| body | http_socket |
boolean | no | Whether to answer plain HTTP from a reverse proxy on doh.sock, a Unix socket in the runtime directory. The file mode of the socket, 0660, decides who connects. false by default. |
| body | http_trust |
array of string | no | The reverse proxies whose client header this server believes, on https_listen and http_listen. An address or a subnet per entry, up to 64, and empty by default. An entry that starts with !, such as !192.168.1.66, denies its range inside a wider entry, and the entry with the longest prefix that holds a sender decides. Allow entries that together hold every public IPv4 address or all of 2000::/4, such as 0.0.0.0/0 or 2000::/4, are refused, whatever the deny entries beside them. |
| body | https_listen |
array of string | no | Where to answer DNS over HTTPS, on TCP for every entry, with the certificate of DNS over TLS. An address with a port after it, or without one to default to 443. The rules of listen apply, the device included. An address and port in listen, tls_listen or http_listen cannot also be here. Empty by default. A non-empty list needs a certificate: tls_certificate_file and tls_private_key_file, or tls_pkcs12_file. |
| body | listen |
array of string | no | Where to answer DNS, on UDP and TCP for every entry. An address with a port after it, or without one to default to 5300. A name, a wildcard address and port zero are all refused. The default is ["127.0.0.1:5300"]. On Linux, an entry can end with @ and the name of a device or a VRF, such as "192.168.1.2:53@eth0": its sockets then take only the queries that arrive on that device, and answer by the routing table of its VRF. A change of the device of an address that is served, from none, to none or to another, waits for a restart. |
| body | log_file_days |
integer | no | How many days of log files the server keeps in logs/ of the state root, one file for each day. The default is 0, which writes no file. A new value takes effect at once, and a lower one deletes the older files at once. |
| body | log_file_mib |
integer | no | The most room that the log files take in all, in MiB. The default is 256. Past it, the server deletes the oldest file other than that of the day. A new value takes effect at once. |
| body | log_format |
string | no | How the server writes a log line: "text" for a person, or "json" for one JSON object to a line, for a log collector. The default is "text". The environment variable TADORU_LOG_FORMAT wins where it is set. A new value takes effect at once. |
| body | log_level |
string | no | How much the server logs: "error", "warn", "info", "debug" or "trace", for every part of the server. The default is "info". The environment variable TADORU_LOG wins where it is set, and it also takes a level for each part. A new value takes effect at once. |
| body | log_local_time |
boolean | no | Whether a log line carries the time in the time zone of the machine, with its offset, such as 2026-11-06T17:02:03.123456+01:00. The default is false, which writes UTC with a Z. The day of a log file follows the same zone. A new value takes effect at once. A change of the zone of the machine shows after a restart. |
| body | log_resolution_errors |
boolean | no | Whether the log keeps the four lines that report a fault of one resolution: three about an alias chain, and one about a reply that changed the case of the question. The default is true. With false they are dropped, and the lines about the server itself stay. The environment variable TADORU_LOG wins where it is set. A new value takes effect at once. |
| body | metrics_listen |
string | no | Where Prometheus reads, as one address, or an empty string to turn it off. The default is 127.0.0.1:9153. Turning it on takes effect at once, and an address that cannot be bound is logged rather than refused: the revision still stands. Moving it and turning it off take effect at the next start, because the exporter installs a process-wide recorder that keeps one address for the life of the process. |
| body | name |
string | no | The name of this node, as a person reads it, such as dns1: a label for the console and a list of nodes, and not an identity. 1 to 63 characters, of ASCII letters, digits, -, _ and .. None by default, and then GET /api/info names the host name of the machine. |
| body | outbound_addresses |
array of string | no | The addresses of this machine that queries go out from, chosen at random for each query among those of the destination’s family. One address per entry, up to 64. Empty by default, and then the operating system picks. A family with no entry is left to the operating system. An address this machine does not hold is refused where the revision becomes active. |
| body | outbound_proxy |
string | no | The proxy that the requests of the server for itself go through: http:// or socks5://, an IP address and a port, such as socks5://127.0.0.1:9050. An IPv6 address goes in brackets. No user part, path or name, and no default port. Empty by default, and then every request connects direct. A request through the proxy never falls back to a direct connection. |
| body | outbound_proxy_bypass |
array of string | no | The hosts and networks that go direct, not through the proxy: a host suffix such as lan, which holds every name under it, an address, or a subnet. Up to 64 entries, each once after its normal form. Empty by default. A suffix with a leading dot or under onion is refused. |
| body | outbound_proxy_for |
array of string | no | Which requests use the proxy: any of blocklists, acme, updates and forwarders, each once. ["blocklists", "acme", "updates"] by default. An empty list beside a proxy is refused. |
| body | outbound_proxy_user |
string | no | The user of the proxy, where it asks for one. 1 to 255 bytes. Through an HTTP proxy it holds no colon and no control character. Not set by default. The node secret outbound_proxy_password holds its password. |
| body | proxy_protocol_from |
array of string | no | Load balancers that put a PROXY protocol header in front of what they relay, to name the client behind them. A source in the list must send the header on every DNS listener, and a source outside it never has one read. An address or a subnet per entry, up to 64, and empty by default. Entries that together hold every public IPv4 address or all of 2000::/4, such as 0.0.0.0/0 or 2000::/4, are refused. |
| body | quic_backlog |
integer | no | How many connection attempts wait for a QUIC listener to take them. Past it, a new attempt is dropped with no answer, and the client sends it again. 16 to 4096, and 256 by default. |
| body | quic_idle_timeout_seconds |
integer | no | The idle timeout every QUIC listener announces, in seconds. A connection with no traffic for this long closes, or sooner where the client announces less. 5 to 300, and 30 by default. |
| body | quic_listen |
array of string | no | Where to answer DNS over QUIC, on UDP for every entry, with the certificate of DNS over TLS. An address with a port after it, or without one to default to 853. The rules of listen apply, the device included, and port 53 is refused as well. An address and port in listen cannot also be here, and one in tls_listen can, because that one is TCP. Empty by default. A non-empty list needs a certificate: tls_certificate_file and tls_private_key_file, or tls_pkcs12_file. |
| body | quic_max_streams |
integer | no | How many queries or requests one QUIC connection can have open at once. A client that wants more waits for one to finish. 1 to 1000, and 100 by default. |
| body | rate_bypass |
array of string | no | Clients no rate limit applies to, such as a monitoring box that asks every name every minute. An address or a subnet per entry, up to 64, and empty by default. |
| body | tcp_backlog |
integer | no | How many connections wait for the accept of each TCP listener of DNS: plain TCP, DNS over TLS, DNS over HTTPS and http_listen. Past it the kernel drops a new handshake, and the client tries again. The kernel cuts it at net.core.somaxconn with no word. 16 to 4096, and 128 by default. A revision applies it to the listeners that run. |
| body | tcp_idle_timeout_seconds |
integer | no | How long a plain TCP connection can wait for a query, in seconds, before its first one too. A connection that sends nothing for this long closes. 1 to 300, and 10 by default. DNS over TLS keeps its own idle wait of 30 seconds. |
| body | tcp_read_timeout_seconds |
integer | no | How long the rest of a message over TCP or TLS can take once its length arrived, in seconds. It closes a client that sends one octet a second to hold a place. 1 to 60, and 10 by default. A long value lets one client hold a place for longer. |
| body | tcp_write_timeout_seconds |
integer | no | How long one answer over TCP or TLS can take to reach the client, in seconds. A client that stops reading is closed after it. 1 to 60, and 10 by default. |
| body | telemetry_memory_mib |
integer | no | The room that a query log in memory may take on its tmpfs, in MiB, from 16 to 4096, and 64 by default. Its data takes three quarters of it, and the hourly counts of stats_retention_days must fit a quarter of that. A change waits for a restart. With telemetry_storage = "disk" it does nothing. |
| body | telemetry_storage |
string | no | Where the query log and the statistics live: "disk", in the state root, or "memory", in the runtime root on a tmpfs with a size, which a reboot empties. The default is "disk". Where memory is asked for and the runtime root is not such a tmpfs, or has too little room, DNS answers and the query log is off, with the reason in the health. A change waits for a restart, and the copy at the old place stays until a person deletes it. |
| body | tls_certificate_file |
string | no | The certificate that DNS over TLS presents: a PEM file with the chain, the leaf first. An absolute path. None by default. It goes with tls_private_key_file, and one without the other is refused. |
| body | tls_listen |
array of string | no | Where to answer DNS over TLS, on TCP for every entry. An address with a port after it, or without one to default to 853. The rules of listen apply, the device included, and port 53 is refused as well. An address and port in listen cannot also be here. Empty by default. A non-empty list needs a certificate: tls_certificate_file and tls_private_key_file, or tls_pkcs12_file. |
| body | tls_pkcs12_file |
string | no | A PKCS #12 file that holds the certificate chain and its key, in place of the two PEM files: an absolute path. None by default. It cannot go with tls_certificate_file, tls_private_key_file or acme_names. The server reads it in place, as it reads a key file: owned by root or the user that runs the server, with no bit for other users and no group write, and at most 64 KiB. Its password is the secret tls_pkcs12_password of the node, which PUT /api/node/secrets/tls_pkcs12_password sets, never this file. Where no password is set, the server tries the empty one. |
| body | tls_private_key_file |
string | no | The private key of the leaf in tls_certificate_file, as a PEM file. An absolute path. None by default. The server reads the key in place and never copies it, so a backup of the server does not carry it. |
| body | tls_self_signed |
boolean | no | Whether the server makes a certificate of its own and keeps it in pki/self-signed/ of the state root, for a node with no other source, such as one on a private network with no name in public DNS. false by default. It cannot go with tls_certificate_file, tls_private_key_file, tls_pkcs12_file or acme_names. The certificate names tls_server_name, localhost and each address of the encrypted listeners and of the doors, lasts 397 days, and is made again with the same key 30 days before its end, at a change of those names, and once the clock is trusted. A browser warns at the first visit, and the health gives its fingerprints to compare. |
| body | tls_server_name |
string | no | The host name that this node names when a client asks for its encrypted endpoints, at _dns.resolver.arpa. A host name of two labels or more, in any case and with no final dot. An IP address, a wildcard, and resolver.arpa or a name under it are refused. None by default, which answers that question with no endpoint. A name here needs an address in tls_listen, https_listen, quic_listen, http3_listen, console_listen or api_listen. A node with none in the first four answers with no endpoint, whatever the name. |
| body | udp_receive_buffer_kib |
integer | no | The receive buffer of each UDP socket of a DNS listener, in KiB: each worker of listen, and the sockets of quic_listen and http3_listen. A burst larger than it is dropped by the kernel. The kernel caps it at net.core.rmem_max. 64 to 65536. None by default, which keeps the default of the kernel. A revision applies it to the sockets that run. |
| body | udp_send_buffer_kib |
integer | no | The send buffer of each UDP socket of a DNS listener, in KiB, as udp_receive_buffer_kib. The kernel caps it at net.core.wmem_max. 64 to 65536. None by default, which keeps the default of the kernel. A revision applies it to the sockets that run. |
| body | udp_workers |
integer | no | How many UDP workers to run, each with its own socket. 0 to 256, and zero means one per core, which is the default. An address that starts serving with this revision gets this count; an address already served keeps its count until a restart. |
| body | update_check |
boolean | no | Whether the server asks the list of releases of the project on GitHub, about once a day, for a newer release than the one that runs. false by default, and then it asks nothing. The request takes the route of updates. The server names a release in GET /api/info, and never downloads or installs one. A new value takes effect at once. |
| body | update_prereleases |
boolean | no | Whether a pre-release counts as a newer release for the update check. false by default. A server that runs a pre-release counts pre-releases whatever this says. A new value takes effect at once, with no new request. |
| Answer | Body | Means |
|---|---|---|
| 200 | Applied as application/json |
Applied, with the revision it became |
| 400 | Problem as application/problem+json |
A body or a header this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role below admin whose change gives what an admin alone gives (needs-admin): private = true on a source, a url outside the catalog of known lists through the outbound proxy, or url fetches through a proxy that no list fetch of the revision that runs went through, that the revision that runs does not hold already. Its sources lists each source as id and grant, which is private, proxied or proxy. A role that is not allowed to make this change, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
A revision that moved or an If-Match that does not match (a tag of another record, as from before a restore, a revision alone, a weak tag, or an empty list), a change already refused, or a key that names a change of the records of a zone |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 1 MiB (body-too-large). |
| 415 | Problem as application/problem+json |
The content type is not one this route takes. A JSON body needs application/json, and a configuration file is sent as text |
| 422 | Problem as application/problem+json |
A setting the server cannot use |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Recording the change failed, or reading the credential failed |
| 503 | Problem as application/problem+json |
Not settled inside the write timeout, and the outcome is unknown. Or the server is stopping (stopping): that change was refused and changed nothing, and the same change can be sent again once the server is back. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X PATCH --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{"udp_workers":4}' \ http://localhost/api/node{ "command": "api:9f31c0a7de54b18e2b7ac641", "revision": 2}PUT /api/node
Section titled “PUT /api/node”Replace node.toml with the text in the body.
Role: operator or admin.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | if-match |
string | no | The ETag of a read of the configuration, as the read gave it, or a list of such tags. It names the revision and its record. A change written against a tag that does not run is refused with 409 |
| header | idempotency-key |
string | no | Names this change, so sending it again answers with the first outcome rather than applying it twice |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | text/plain |
string | yes | The whole file, as its own text. Not JSON: this replaces the file, comments and all |
| Answer | Body | Means |
|---|---|---|
| 200 | Applied as application/json |
Applied, with the revision it became |
| 400 | Problem as application/problem+json |
A body or a header this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role below admin whose change gives what an admin alone gives (needs-admin): private = true on a source, a url outside the catalog of known lists through the outbound proxy, or url fetches through a proxy that no list fetch of the revision that runs went through, that the revision that runs does not hold already. Its sources lists each source as id and grant, which is private, proxied or proxy. A role that is not allowed to make this change, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
A revision that moved or an If-Match that does not match (a tag of another record, as from before a restore, a revision alone, a weak tag, or an empty list), a change already refused, or a key that names a change of the records of a zone |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 1 MiB (body-too-large). |
| 422 | Problem as application/problem+json |
A file the server cannot use |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Recording the change failed, or reading the credential failed |
| 503 | Problem as application/problem+json |
Not settled inside the write timeout, and the outcome is unknown. Or the server is stopping (stopping): that change was refused and changed nothing, and the same change can be sent again once the server is back. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X PUT --unix-socket $S -H "$A" \ -H 'content-type: text/plain' \ --data-binary $'# what this machine answers on\nlisten = ["127.0.0.1:5300"]\nudp_workers = 4\n' \ http://localhost/api/node{ "command": "api:c8a4f61b0d97e532ab146d80", "revision": 2}POST /api/node/check
Section titled “POST /api/node/check”Check a change of node.toml as its save would check it, and change nothing.
Role: operator or admin, or the server’s own uid or root on the socket.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | if-match |
string | no | The ETag of a read of the configuration, as the save takes it. A check against a tag that does not run is refused with 409, as its save is |
| header | idempotency-key |
string | no | The key of the save that this check speaks for. A key that names a change answers with its outcome, as the save would. Any other key runs every check, though the change writes what runs, as a save with a key makes a revision then. Without a key, the repeat of a refused change is checked again, as the save judges it again, and the repeat of a change that landed answers that. The check records nothing, so the key stays free for the save |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated check and ignored for a bearer token |
| body | acme_challenge |
string | no | How the authority checks that the names are yours. "http-01" asks on port 80 of acme_http_listen, and "tls-alpn-01" asks on the TLS listeners. "dns-01" asks for a TXT record in a zone of this server, which the server writes and removes. The default is "http-01". |
| body | acme_contact |
array of string | no | The mailto: addresses of the account at the authority. Empty by default. |
| body | acme_directory |
string | no | The ACME authority: "letsencrypt", "letsencrypt-staging", or the https:// URL of a directory. The default is "letsencrypt". |
| body | acme_dns01_skip |
array of string | no | The addresses that the wait of dns-01 does not ask, such as the public address of a router with no NAT loopback, which drops a query from inside to its own public address. IP addresses with no port, up to 16. Empty by default, and a non-empty list needs acme_challenge to be "dns-01". |
| body | acme_http_listen |
array of string | no | Where to answer the HTTP-01 challenge, on TCP for every entry. An address with a port after it, or without one to default to 80. The rules of tls_listen apply, but an entry takes no device, and an address and port of another TCP listener cannot also be here. One of http_listen can, and then answers both. Empty by default, and "http-01" needs one. |
| body | acme_names |
array of string | no | The names on the certificate that the server gets and renews from an ACME authority, such as Let’s Encrypt. A host name per entry, up to 100. An IP address and a name written twice are refused. A wildcard, one *. label before a host name, needs acme_challenge to be "dns-01". Empty by default, which turns ACME off. A non-empty list cannot go with tls_certificate_file or tls_pkcs12_file, and it needs acme_terms_agreed and a TLS listener. |
| body | acme_terms_agreed |
boolean | no | Whether you read the terms of the authority and agree to them. false by default, and a non-empty acme_names needs true. |
| body | advertise_encrypted |
boolean | no | Whether this node answers _dns.resolver.arpa with its encrypted endpoints, where tls_server_name names it. true by default. |
| body | allow_recursion |
array of string | no | Which clients this server resolves for. An address or a subnet per entry, up to 64, and a query from anywhere else is answered REFUSED. An entry that starts with !, such as !10.1.0.0/16, denies its range inside a wider entry, and the entry with the longest prefix that holds a client decides. The default is loopback and the private ranges. An empty list resolves for nobody, which is a server that answers its own zones alone. |
| body | api_client_header |
string | no | The header a proxy of api_trust names the client in. The default is "X-Forwarded-For". |
| body | api_listen |
array of string | no | Where to serve the management API alone, over TLS, for a script on another host. An address with a port after it, or without one to default to 8453. The rules of console_listen apply: a non-empty list needs a certificate source, and a wildcard address is refused. Each address serves TLS 1.3 alone. A caller there gets none of the trust that the socket gives its owner. Empty by default. The file also takes one address as a string, and "" as an empty list. |
| body | api_trust |
array of string | no | The reverse proxies whose client header console_listen and api_listen believe. An address or a subnet per entry, up to 16, and empty by default. An entry that starts with !, such as !192.168.1.66, denies its range inside a wider entry, and the entry with the longest prefix that holds a peer decides. Allow entries that together hold every public IPv4 address or all of 2000::/4, such as 0.0.0.0/0 or 2000::/4, are refused, whatever the deny entries beside them. |
| body | cache_snapshot_minutes |
integer | no | How often the answer cache is written to disk, in minutes, so a restart starts warm. 0 to 1440, and 15 by default. 0 turns the snapshot off and deletes the file. |
| body | clock_grace_minutes |
integer | no | How long after a start the clock counts as unconfirmed where no time client has set it. 0 to 60 minutes, and 10 by default. 0 trusts a clock past the build floor from the start. A shorter window applies at once; a longer one waits for the next start. |
| body | clock_grace_names |
array of string | no | The names a time client on this network asks for, each with every name below it. They answer without DNSSEC validation while the clock is not trusted. Up to 64 entries, and the default covers the pools of the common Linux distributions and the public time servers. |
| body | clock_synchronized_file |
string | no | The file whose presence says a time client set the clock since this machine booted. An absolute path, or an empty string where there is none. The default is /run/systemd/timesync/synchronized, the file systemd-timesyncd writes, on every platform. |
| body | console_http3 |
boolean | no | Whether each address of console_listen also answers HTTP/3 on its UDP port, the same address and port. false by default. No 0-RTT, and the same rules as over TCP. The UDP port of a door is its own whatever this says, so no DNS listener can take it. |
| body | console_listen |
array of string | no | Where to serve the web console and the management API, over TLS, on one origin. An address with a port after it, or without one to default to 5343. The rules of listen apply, but an entry takes no device, and an address and port of another TCP listener cannot also be here. Empty by default. A non-empty list needs a certificate: tls_certificate_file and tls_private_key_file, tls_pkcs12_file, or acme_names. A binary built without the console refuses a non-empty list. |
| body | ecs_trust |
array of string | no | Senders whose EDNS Client Subnet option this server honours, where ecs_accept is "trusted". A resolver in front of this one, whose own clients the option names. An address or a subnet per entry, up to 64, and empty by default. |
| body | encrypted_allow_recursion |
array of string | no | Which clients this server resolves for when a query arrives encrypted, over TLS. It replaces allow_recursion for those queries alone. The same entries, deny entries too, and the same default: loopback and the private ranges. A phone outside the house needs ["0.0.0.0/0", "::/0"], which gives any stranger who connects the resolver, the blocking and the local zones. |
| body | exclude_ports |
array of PortEntry |
no | Source ports this server never sends a query from, such as a port a VPN on this machine uses. A number for one port, or a string such as "8000-8100" for a range. Empty by default, and then the operating system picks each port. A list that leaves fewer than 4096 of the ports from 1024 up is refused, because a resolver with few source ports has given up the protection they give against a forged answer. |
| body | http3_listen |
array of string | no | Where to answer DNS over HTTPS on HTTP/3, on UDP for every entry, with the certificate of DNS over TLS. An address with a port after it, or without one to default to 443. The rules of listen apply, the device included. An address and port in listen or quic_listen cannot also be here, and one in https_listen can, because that one is TCP. Empty by default. A non-empty list needs a certificate: tls_certificate_file and tls_private_key_file, or tls_pkcs12_file. |
| body | http_client_header |
string | no | The header a trusted proxy names the client in. The server reads the last address of the last such header. The default is "X-Forwarded-For". |
| body | http_help_page |
boolean | no | Whether a browser that opens the path of DNS over HTTPS gets a page that says how to use the address, rather than an error. A GET with no variable dns, whose Accept prefers text/html, gets it. true by default. |
| body | http_listen |
array of string | no | Where to answer plain HTTP from a reverse proxy that holds the TLS session with the client. An address with a port after it, or without one to default to 8053. The rules of listen apply, the device included, and an address and port of another listener cannot also be here, except one of acme_http_listen. It answers only the proxies in http_trust, and 403 to anybody else. An address that acme_http_listen names too also answers the HTTP-01 challenge, to anybody. Empty by default. |
| body | http_path |
string | no | The URL path of every HTTP listener. It starts with /, holds no ?, # or space, and is not under /.well-known/acme-challenge/, the path of the HTTP-01 challenge. The default is "/dns-query". |
| body | http_socket |
boolean | no | Whether to answer plain HTTP from a reverse proxy on doh.sock, a Unix socket in the runtime directory. The file mode of the socket, 0660, decides who connects. false by default. |
| body | http_trust |
array of string | no | The reverse proxies whose client header this server believes, on https_listen and http_listen. An address or a subnet per entry, up to 64, and empty by default. An entry that starts with !, such as !192.168.1.66, denies its range inside a wider entry, and the entry with the longest prefix that holds a sender decides. Allow entries that together hold every public IPv4 address or all of 2000::/4, such as 0.0.0.0/0 or 2000::/4, are refused, whatever the deny entries beside them. |
| body | https_listen |
array of string | no | Where to answer DNS over HTTPS, on TCP for every entry, with the certificate of DNS over TLS. An address with a port after it, or without one to default to 443. The rules of listen apply, the device included. An address and port in listen, tls_listen or http_listen cannot also be here. Empty by default. A non-empty list needs a certificate: tls_certificate_file and tls_private_key_file, or tls_pkcs12_file. |
| body | listen |
array of string | no | Where to answer DNS, on UDP and TCP for every entry. An address with a port after it, or without one to default to 5300. A name, a wildcard address and port zero are all refused. The default is ["127.0.0.1:5300"]. On Linux, an entry can end with @ and the name of a device or a VRF, such as "192.168.1.2:53@eth0": its sockets then take only the queries that arrive on that device, and answer by the routing table of its VRF. A change of the device of an address that is served, from none, to none or to another, waits for a restart. |
| body | log_file_days |
integer | no | How many days of log files the server keeps in logs/ of the state root, one file for each day. The default is 0, which writes no file. A new value takes effect at once, and a lower one deletes the older files at once. |
| body | log_file_mib |
integer | no | The most room that the log files take in all, in MiB. The default is 256. Past it, the server deletes the oldest file other than that of the day. A new value takes effect at once. |
| body | log_format |
string | no | How the server writes a log line: "text" for a person, or "json" for one JSON object to a line, for a log collector. The default is "text". The environment variable TADORU_LOG_FORMAT wins where it is set. A new value takes effect at once. |
| body | log_level |
string | no | How much the server logs: "error", "warn", "info", "debug" or "trace", for every part of the server. The default is "info". The environment variable TADORU_LOG wins where it is set, and it also takes a level for each part. A new value takes effect at once. |
| body | log_local_time |
boolean | no | Whether a log line carries the time in the time zone of the machine, with its offset, such as 2026-11-06T17:02:03.123456+01:00. The default is false, which writes UTC with a Z. The day of a log file follows the same zone. A new value takes effect at once. A change of the zone of the machine shows after a restart. |
| body | log_resolution_errors |
boolean | no | Whether the log keeps the four lines that report a fault of one resolution: three about an alias chain, and one about a reply that changed the case of the question. The default is true. With false they are dropped, and the lines about the server itself stay. The environment variable TADORU_LOG wins where it is set. A new value takes effect at once. |
| body | metrics_listen |
string | no | Where Prometheus reads, as one address, or an empty string to turn it off. The default is 127.0.0.1:9153. Turning it on takes effect at once, and an address that cannot be bound is logged rather than refused: the revision still stands. Moving it and turning it off take effect at the next start, because the exporter installs a process-wide recorder that keeps one address for the life of the process. |
| body | name |
string | no | The name of this node, as a person reads it, such as dns1: a label for the console and a list of nodes, and not an identity. 1 to 63 characters, of ASCII letters, digits, -, _ and .. None by default, and then GET /api/info names the host name of the machine. |
| body | outbound_addresses |
array of string | no | The addresses of this machine that queries go out from, chosen at random for each query among those of the destination’s family. One address per entry, up to 64. Empty by default, and then the operating system picks. A family with no entry is left to the operating system. An address this machine does not hold is refused where the revision becomes active. |
| body | outbound_proxy |
string | no | The proxy that the requests of the server for itself go through: http:// or socks5://, an IP address and a port, such as socks5://127.0.0.1:9050. An IPv6 address goes in brackets. No user part, path or name, and no default port. Empty by default, and then every request connects direct. A request through the proxy never falls back to a direct connection. |
| body | outbound_proxy_bypass |
array of string | no | The hosts and networks that go direct, not through the proxy: a host suffix such as lan, which holds every name under it, an address, or a subnet. Up to 64 entries, each once after its normal form. Empty by default. A suffix with a leading dot or under onion is refused. |
| body | outbound_proxy_for |
array of string | no | Which requests use the proxy: any of blocklists, acme, updates and forwarders, each once. ["blocklists", "acme", "updates"] by default. An empty list beside a proxy is refused. |
| body | outbound_proxy_user |
string | no | The user of the proxy, where it asks for one. 1 to 255 bytes. Through an HTTP proxy it holds no colon and no control character. Not set by default. The node secret outbound_proxy_password holds its password. |
| body | proxy_protocol_from |
array of string | no | Load balancers that put a PROXY protocol header in front of what they relay, to name the client behind them. A source in the list must send the header on every DNS listener, and a source outside it never has one read. An address or a subnet per entry, up to 64, and empty by default. Entries that together hold every public IPv4 address or all of 2000::/4, such as 0.0.0.0/0 or 2000::/4, are refused. |
| body | quic_backlog |
integer | no | How many connection attempts wait for a QUIC listener to take them. Past it, a new attempt is dropped with no answer, and the client sends it again. 16 to 4096, and 256 by default. |
| body | quic_idle_timeout_seconds |
integer | no | The idle timeout every QUIC listener announces, in seconds. A connection with no traffic for this long closes, or sooner where the client announces less. 5 to 300, and 30 by default. |
| body | quic_listen |
array of string | no | Where to answer DNS over QUIC, on UDP for every entry, with the certificate of DNS over TLS. An address with a port after it, or without one to default to 853. The rules of listen apply, the device included, and port 53 is refused as well. An address and port in listen cannot also be here, and one in tls_listen can, because that one is TCP. Empty by default. A non-empty list needs a certificate: tls_certificate_file and tls_private_key_file, or tls_pkcs12_file. |
| body | quic_max_streams |
integer | no | How many queries or requests one QUIC connection can have open at once. A client that wants more waits for one to finish. 1 to 1000, and 100 by default. |
| body | rate_bypass |
array of string | no | Clients no rate limit applies to, such as a monitoring box that asks every name every minute. An address or a subnet per entry, up to 64, and empty by default. |
| body | tcp_backlog |
integer | no | How many connections wait for the accept of each TCP listener of DNS: plain TCP, DNS over TLS, DNS over HTTPS and http_listen. Past it the kernel drops a new handshake, and the client tries again. The kernel cuts it at net.core.somaxconn with no word. 16 to 4096, and 128 by default. A revision applies it to the listeners that run. |
| body | tcp_idle_timeout_seconds |
integer | no | How long a plain TCP connection can wait for a query, in seconds, before its first one too. A connection that sends nothing for this long closes. 1 to 300, and 10 by default. DNS over TLS keeps its own idle wait of 30 seconds. |
| body | tcp_read_timeout_seconds |
integer | no | How long the rest of a message over TCP or TLS can take once its length arrived, in seconds. It closes a client that sends one octet a second to hold a place. 1 to 60, and 10 by default. A long value lets one client hold a place for longer. |
| body | tcp_write_timeout_seconds |
integer | no | How long one answer over TCP or TLS can take to reach the client, in seconds. A client that stops reading is closed after it. 1 to 60, and 10 by default. |
| body | telemetry_memory_mib |
integer | no | The room that a query log in memory may take on its tmpfs, in MiB, from 16 to 4096, and 64 by default. Its data takes three quarters of it, and the hourly counts of stats_retention_days must fit a quarter of that. A change waits for a restart. With telemetry_storage = "disk" it does nothing. |
| body | telemetry_storage |
string | no | Where the query log and the statistics live: "disk", in the state root, or "memory", in the runtime root on a tmpfs with a size, which a reboot empties. The default is "disk". Where memory is asked for and the runtime root is not such a tmpfs, or has too little room, DNS answers and the query log is off, with the reason in the health. A change waits for a restart, and the copy at the old place stays until a person deletes it. |
| body | tls_certificate_file |
string | no | The certificate that DNS over TLS presents: a PEM file with the chain, the leaf first. An absolute path. None by default. It goes with tls_private_key_file, and one without the other is refused. |
| body | tls_listen |
array of string | no | Where to answer DNS over TLS, on TCP for every entry. An address with a port after it, or without one to default to 853. The rules of listen apply, the device included, and port 53 is refused as well. An address and port in listen cannot also be here. Empty by default. A non-empty list needs a certificate: tls_certificate_file and tls_private_key_file, or tls_pkcs12_file. |
| body | tls_pkcs12_file |
string | no | A PKCS #12 file that holds the certificate chain and its key, in place of the two PEM files: an absolute path. None by default. It cannot go with tls_certificate_file, tls_private_key_file or acme_names. The server reads it in place, as it reads a key file: owned by root or the user that runs the server, with no bit for other users and no group write, and at most 64 KiB. Its password is the secret tls_pkcs12_password of the node, which PUT /api/node/secrets/tls_pkcs12_password sets, never this file. Where no password is set, the server tries the empty one. |
| body | tls_private_key_file |
string | no | The private key of the leaf in tls_certificate_file, as a PEM file. An absolute path. None by default. The server reads the key in place and never copies it, so a backup of the server does not carry it. |
| body | tls_self_signed |
boolean | no | Whether the server makes a certificate of its own and keeps it in pki/self-signed/ of the state root, for a node with no other source, such as one on a private network with no name in public DNS. false by default. It cannot go with tls_certificate_file, tls_private_key_file, tls_pkcs12_file or acme_names. The certificate names tls_server_name, localhost and each address of the encrypted listeners and of the doors, lasts 397 days, and is made again with the same key 30 days before its end, at a change of those names, and once the clock is trusted. A browser warns at the first visit, and the health gives its fingerprints to compare. |
| body | tls_server_name |
string | no | The host name that this node names when a client asks for its encrypted endpoints, at _dns.resolver.arpa. A host name of two labels or more, in any case and with no final dot. An IP address, a wildcard, and resolver.arpa or a name under it are refused. None by default, which answers that question with no endpoint. A name here needs an address in tls_listen, https_listen, quic_listen, http3_listen, console_listen or api_listen. A node with none in the first four answers with no endpoint, whatever the name. |
| body | udp_receive_buffer_kib |
integer | no | The receive buffer of each UDP socket of a DNS listener, in KiB: each worker of listen, and the sockets of quic_listen and http3_listen. A burst larger than it is dropped by the kernel. The kernel caps it at net.core.rmem_max. 64 to 65536. None by default, which keeps the default of the kernel. A revision applies it to the sockets that run. |
| body | udp_send_buffer_kib |
integer | no | The send buffer of each UDP socket of a DNS listener, in KiB, as udp_receive_buffer_kib. The kernel caps it at net.core.wmem_max. 64 to 65536. None by default, which keeps the default of the kernel. A revision applies it to the sockets that run. |
| body | udp_workers |
integer | no | How many UDP workers to run, each with its own socket. 0 to 256, and zero means one per core, which is the default. An address that starts serving with this revision gets this count; an address already served keeps its count until a restart. |
| body | update_check |
boolean | no | Whether the server asks the list of releases of the project on GitHub, about once a day, for a newer release than the one that runs. false by default, and then it asks nothing. The request takes the route of updates. The server names a release in GET /api/info, and never downloads or installs one. A new value takes effect at once. |
| body | update_prereleases |
boolean | no | Whether a pre-release counts as a newer release for the update check. false by default. A server that runs a pre-release counts pre-releases whatever this says. A new value takes effect at once, with no new request. |
| body | text/plain |
string | yes | The change, as its save takes it: the settings to change as JSON, as PATCH /api/node takes them, or the whole file as text, as PUT /api/node takes it. The content type picks one |
| Answer | Body | Means |
|---|---|---|
| 200 | CheckedChange as application/json |
The change passed every check of its save that binds nothing, or its save would make no new revision (unchanged). The bind of a listener is not checked, so a port in use passes here and the save refuses it |
| 400 | Problem as application/problem+json |
A body or a header this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role below admin whose change gives what an admin alone gives (needs-admin): private = true on a source, a url outside the catalog of known lists through the outbound proxy, or url fetches through a proxy that no list fetch of the revision that runs went through, that the revision that runs does not hold already. Its sources lists each source as id and grant, which is private, proxied or proxy. A role that is not allowed to make this change, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
A revision that moved or an If-Match that does not match, a change that was refused before (already-refused) by its key, a change that has not settled, or a key that names a change of the records of a zone. The save answers the same |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 1 MiB (body-too-large). |
| 415 | Problem as application/problem+json |
A content type other than application/json and text/plain |
| 422 | Problem as application/problem+json |
A setting the server cannot use, with its file, setting and line, as the save refuses it. Where a zone owes a result of a change of records that the save tries first, this and a 409 of the state of a zone carry "results_owed": true, because the save can answer otherwise |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading the ledger failed, or reading the credential failed |
| 503 | Problem as application/problem+json |
The check did not finish inside the write timeout (still-checking), and it wrote nothing. Or too many changes or checks wait (too-many-changes): at most four checks wait at once, and past that a check answers this at once, so a save keeps at least four places. Or the server is stopping (stopping). Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X POST --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{"udp_workers":4}' \ http://localhost/api/node/check{ "results_owed": false, "revision": 41, "unchanged": false, "waits_for_restart": [ "udp_workers" ]}GET /api/node/secrets
Section titled “GET /api/node/secrets”Which secrets of the node are set and readable. No value: no route returns one.
This takes no parameters and no body.
| Answer | Body | Means |
|---|---|---|
| 200 | NodeSecrets as application/json |
Every secret of the node, set or not |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A caller who is not an operator or an admin. A role that is not allowed to read this: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential, or too many attempts at once: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 503 | Problem as application/problem+json |
Nothing answers the routes of the secrets, or the list did not come within its wait. Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ http://localhost/api/node/secrets{ "secrets": [ { "changed_at": 1763100000, "name": "tls_pkcs12_password", "readable": true, "set": true }, { "name": "outbound_proxy_password", "readable": true, "set": false } ]}DELETE /api/node/secrets/{name}
Section titled “DELETE /api/node/secrets/{name}”Clear a secret of the node. A clear of a secret that is not set answers reload: none, so a
retry of a clear whose answer was lost ends with the secret not set, also over a write that
another admin made in between. The guard reads a body of at most 16 KiB and drops it.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | name |
SecretName |
yes | The name of the secret |
| Answer | Body | Means |
|---|---|---|
| 200 | SecretChanged as application/json |
The secret is not set, and durable, with what its reload did |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A caller who is not an admin, or a session with no forgery token. A role that is not allowed to make this change, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 404 | Problem as application/problem+json |
No secret of the node has this name |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 422 | Problem as application/problem+json |
secret-refused: a running source does not open its file with no password, or cannot serve with none, and the value stays |
| 429 | Problem as application/problem+json |
Another change of a secret is running. The answer carries Retry-After: 1. Too many failed attempts with this credential, or too many attempts at once: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 503 | Problem as application/problem+json |
secret-unwritten: the value of before stands. secret-uncertain: the clear is in place and a crash can still lose it, or whether it took is not known. unavailable: nothing answers the routes of the secrets. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X DELETE --unix-socket $S -H "$A" \ http://localhost/api/node/secrets/{name}{ "reload": "none"}PUT /api/node/secrets/{name}
Section titled “PUT /api/node/secrets/{name}”Write a secret of the node. The value is tried first on a source of the running revision that reads it, and the answer says what its reload did. No route returns the value.
A change is idempotent: the same value again ends in the same state. A retry after a change whose answer did not come writes the value of the retry, also over a change that another admin made in between.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | name |
SecretName |
yes | The name of the secret |
| body | value |
string | yes | The secret, as a string: 1 to 1024 bytes of UTF-8, with no NUL and no line break. |
| Answer | Body | Means |
|---|---|---|
| 200 | SecretChanged as application/json |
The value is in place and durable, with what its reload did |
| 400 | Problem as application/problem+json |
unreadable-body: the body is not one object with the one member value, a string. The problem holds nothing of the body. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A caller who is not an admin, or a session with no forgery token. A role that is not allowed to make this change, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 404 | Problem as application/problem+json |
No secret of the node has this name |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 413 | Problem as application/problem+json |
secret-too-long: the value is longer than 1024 bytes. body-too-large: the body is past 16 KiB. Or: The body passes the limit of this route, 16 KiB (body-too-large). |
| 415 | Problem as application/problem+json |
The body is not application/json |
| 422 | Problem as application/problem+json |
invalid-secret: the value is empty or holds a NUL or a line break. secret-refused: the file of a running source does not open with it, or the source cannot serve with it, or the kind of the running proxy cannot carry it (more than 255 bytes for SOCKS5, or a control character for HTTP Basic), and the value of before stays |
| 429 | Problem as application/problem+json |
Another change of a secret is running. The answer carries Retry-After: 1. Too many failed attempts with this credential, or too many attempts at once: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 503 | Problem as application/problem+json |
secret-unwritten: the value of before stands. secret-uncertain: the change is in place and a crash can still lose it, or whether it took is not known. unavailable: nothing answers the routes of the secrets. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X PUT --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{"value":"the password of the file"}' \ http://localhost/api/node/secrets/{name}{ "reload": "served"}GET /api/server
Section titled “GET /api/server”How this server resolves.
Two answers, and Accept picks one. The settings as JSON is what a dashboard reads.
The file’s own text is what an editor needs. PUT takes the text, and a JSON object
carries no comments.
Role: any role.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | accept |
string | no | text/plain answers with the file’s own text, comments and all, which is what PUT takes back. Anything else answers with the settings as JSON |
| Answer | Body | Means |
|---|---|---|
| 200 | Server as application/json |
The resolver settings that are running. Every field is present in an answer: the shape is the file’s, where a key can be absent and the default applies. With Accept: text/plain the answer is the file’s own text instead, with the same entity tag. Carries etag. |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | Problem as application/problem+json |
Asked for the text, and the running generation has no such file |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Asked for the text, and reading the generation failed |
| 503 | Problem as application/problem+json |
A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ http://localhost/api/server{ "cache_bytes": 67108864, "failure_ttl": 60, "forward": [], "forwarders": [ "1.1.1.1", "9.9.9.9" ], "latency_alpha": 20, "local_zones": true, "max_retries": 2, "maximum_ttl": 86400, "minimum_ttl": 0, "rebind_allow": [ "nas.example.com" ], "rebind_inside": [ "2001:db8:1234::/56" ], "rebind_nat64": [ "64:ff9b::/96" ], "rebind_protection": true, "resolution_deadline_ms": 3000, "retention_days": 30, "store_clients": true, "store_names": true, "upstream_timeout_ms": 2000}PATCH /api/server
Section titled “PATCH /api/server”Change the settings this names, and leave the rest of the file alone.
Role: operator or admin.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | if-match |
string | no | The ETag of a read of the configuration, as the read gave it, or a list of such tags. It names the revision and its record. A change written against a tag that does not run is refused with 409 |
| header | idempotency-key |
string | no | Names this change, so sending it again answers with the first outcome rather than applying it twice |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | aggressive_nsec |
boolean | no | Whether a cached, validated NSEC or NSEC3 record answers the other names it proves absent, with no question upstream, as RFC 8198 says. On by default. It does nothing while dnssec_validation is off. A name that a zone just added can stay absent here while the proof lives. That is three hours at most, and less where the zone’s SOA says so. Turn it off to stop a checked denial answering the names it was not stored under. In the recursive mode, a name below a cached NXDOMAIN with an SOA gets that NXDOMAIN with the setting on or off. A change keeps the answer cache. Turning it off drops the ranges that the server holds. |
| body | cache_bytes |
integer | no | How much memory the cache accounts for, in bytes. At least 32768, and 67108864 by default. The cache divides it between shards, so a budget near the floor leaves each shard very little. |
| body | case_randomization |
boolean | no | Whether each outgoing query writes its name in a random mixture of upper and lower case, and refuses a reply whose question comes back in another one. Every server treats the two as one name, so this costs nothing, and each letter is a bit a forged answer has to guess. On by default. A server that rewrites the case is found and asked in plain case for an hour. Turn it off to rule it out while debugging a middlebox. |
| body | delegation_bytes |
integer | no | How much memory the recursive mode’s store of zone cuts accounts for, in bytes. At least 524288, and 8388608 by default. Nothing in it is served to a client: it is what the walk learned about which servers hold which zone. |
| body | denial_without_soa_ttl |
integer | no | How long a denial with no SOA record is kept, in seconds: an NXDOMAIN, or an answer with no record of the type asked, whose answer section is empty and whose authority section contains no SOA. An answer with no record and an NS set is a referral and is not kept, but an NXDOMAIN with the NS set of the zone above the name is. 0 to 300, and 0 by default, which keeps none, as RFC 2308 section 5 advises. The smaller of this and maximum_ttl applies, and a DNSSEC proof that expires sooner ends it sooner. Such a denial is never served stale, and the cache does not use it for the names below it. Two resolvers that keep these denials and forward to each other can pass one back and forth with no end, so keep 0 where this server forwards to a resolver that can forward back. |
| body | dnssec_sha1 |
string | no | What a zone signed with SHA-1, DNSSEC algorithms 5 and 7, proves. insecure, the default, treats the two as unsupported, as RFC 9905 says. Such a zone then answers without the AD bit, as an unsigned zone does, where no other algorithm signs it. validate checks them the way the other algorithms are checked, for a zone that has not moved to a stronger algorithm yet. A change empties the cache, because an answer stored under one of the two is not an answer under the other. |
| body | dnssec_validation |
boolean | no | Whether an answer is checked against the DNSSEC signatures of its zone, from the root’s keys down. On by default. A name whose chain is broken then answers SERVFAIL rather than with data an attacker can write. Turn it off to rule validation out while debugging, and to get the behavior of a server without it. |
| body | ecs_accept |
string | no | Whether an EDNS Client Subnet option from a sender in ecs_trust is honoured, as "off" or "trusted". Off by default. An option from anybody else is read and not used. |
| body | ecs_exclude |
array of string | no | Zones whose servers never hear part of a client’s address, beside the root, every top-level domain and the common public suffixes such as co.uk, which this server already leaves out. A name per entry, up to 64, and empty by default. |
| body | ecs_network |
array of string | no | The networks that queries of the recursive mode carry in place of the address of a client that sent no option, at most one of each family, such as ["93.184.216.0/24"]. Empty by default. For a server whose walk leaves through a network that is not its clients’, such as a tunnel, or a house whose clients are on private addresses. Every client of the family with no option then sends this network, and shares one cached answer. A client whose option is ignored, or that sends a SOURCE of 0, still sends nothing. Each network routes on the internet, and is no longer than the bits of ecs_send for its family. It needs ecs_send: turning ecs_send off needs ecs_network empty, or an empty ecs_network in the same body. Each refusal names ecs_network. Each authoritative server that the walk asks, outside the root, the top-level domains, the public suffixes and ecs_exclude, learns the network. |
| body | ecs_send |
string | no | Whether queries this server sends carry part of the client’s address (RFC 7871), as "off" or a pair of prefix lengths such as "24/56": the bits of an IPv4 client and of an IPv6 one. Off by default. It gives a server behind one public address nothing, because its clients are on private addresses, which no option carries, unless ecs_network names its public network. Turning it off needs ecs_network empty, or an empty ecs_network in the same body. |
| body | edns_answer_payload |
integer | no | The largest answer over UDP that this server sends to a client, in bytes, and the size that its answers offer in their OPT record. 512 to 4096, and 1232 by default. A client that offers less gets that much, and never less than 512, and a client with no OPT record gets 512 (RFC 1035 section 4.2.1). An answer that does not fit is cut, and the client asks again over TCP. A value above 1232 can be fragmented on the way, and a fragment can be lost or forged. A larger value also lets a forged query bring back a larger answer to its victim, so raise it only where the clients are known. |
| body | edns_upstream_payload |
integer | no | The size that this server offers in the OPT record of each query that it sends, to a forwarder and to each server of the walk, in bytes. 512 to 4096, and 1232 by default. A server that answers more than fits gets the answer cut, and this server asks again over TCP. A value above 1232 invites answers that are fragmented on the way, and a fragment can be lost or forged. |
| body | failure_ttl |
integer | no | How long a resolution failure is remembered, in seconds (RFC 9520). 1 to 300, and 60 by default. |
| body | forward |
array of Forward |
no | The suffixes that go to a resolver of your choosing rather than to forwarders. 32 at most, and none by default. Each is a [[forward]] table. |
| body | forwarder_concurrency |
integer | no | How many forwarders one question that a client waits for asks at once, and the first answer that passes the checks wins. 1 or 2, and 1 by default. With 2, the upstreams get about twice the queries. Background work, such as a prefetch, asks one at a time. |
| body | forwarder_retries |
integer | no | How many attempts after the first failure, for a forwarder. 0 to 10. Without it, a forwarder takes max_retries, so the value of max_retries is its default. Every upstream is tried at least once whatever this says. |
| body | forwarder_timeout_ms |
integer | no | How long to wait for one forwarder before trying the next, in milliseconds: an entry of forwarders or of the to of a [[forward]]. 100 to 10000. Without it, a forwarder waits upstream_timeout_ms, so the value of upstream_timeout_ms is its default. It must not outlive resolution_deadline_ms. The walk of the recursive mode keeps upstream_timeout_ms. |
| body | forwarders |
array of string | no | Where to send a question this server cannot answer, in the forward mode. An address with a port after it, or without one to default to 53. A name is refused, because resolving one needs the resolver this list configures. A wildcard address and a port of zero are refused as well: neither is somewhere to send a query, and a wildcard means this machine. An entry that is one of this machine’s own listening addresses is refused as the change is applied. 8 addresses at most, counting each address in the parentheses of an encrypted entry. tcp:// and an address, such as tcp://192.0.2.1, asks over TCP alone on one kept connection, and comes back as tcp://192.0.2.1:53. It is not encrypted. Empty by default, which answers NXDOMAIN for every name this server does not hold. |
| body | hedge |
boolean | no | Whether the recursive mode asks a second name server where the first takes three times its own average to reply. On by default. The first reply that is of use wins. Off, a walk that asks one server sends no second query. It acts on a walk that recursion_parallel leaves at 1: where that setting is 1, and for background work, such as a prefetch. Off leaves the groups of recursion_parallel on. |
| body | ipv6 |
string | no | Whether the recursive mode reaches a name server over IPv6: "enabled", the default, uses whichever family answers and races the two for a server it has not measured. "disabled" never uses an IPv6 address, for a network with an IPv6 route and no IPv6 connectivity. "preferred" tries IPv6 first for a server it has not measured. |
| body | keep_one_row_in |
integer | no | Keep one question in this many as a row of the query log. A question that is not kept as a row still counts in the hourly counts, which stay exact; the busiest lists, the devices and the percentiles come from the kept rows. 1 to 1000, and 1 by default, which keeps every question. Updates and zone transfers are always kept. A change applies to the next question, with no restart. |
| body | lame_interval_minutes |
integer | no | How long the recursive mode leaves a name server alone after it answered for a zone as though it did not hold it, in minutes. 30 to 1440, and 30 by default, which is the least RFC 4697 section 2.2.1 recommends. The server is left alone for that zone only. Where every server of a zone is marked, the zone is asked anyway. |
| body | latency_alpha |
integer | no | How far one measurement moves an upstream’s average round-trip time, in hundredths. 1 to 100, and 20 by default. |
| body | local_zones |
boolean | no | Whether this server answers the 97 reverse zones of RFC 6303 and RFC 7793 itself. They are the reverse names of the addresses that no name on the public internet answers for: the private ranges, the shared address space a carrier hands out, loopback, link-local, the documentation ranges and the broadcast address. On by default, and turning it off sends those queries to the forwarders, which is what a router that knows the names of the addresses it handed out needs. localhost, test, invalid, home.arpa, local and onion are answered here whatever this is set to. |
| body | max_concurrent_resolutions |
integer | no | How many resolutions this server runs at once, across every client. A query past it is answered SERVFAIL. 1 to 1024, and 256 by default: this server holds 1024 query sockets, and a resolution holds two at its worst, so 256 leave half of them for everything else. |
| body | max_retries |
integer | no | How many attempts after the first failure, for a forwarder where forwarder_retries is absent. 0 to 10, and 2 by default. Every upstream is tried at least once whatever this says. |
| body | maximum_ttl |
integer | no | The longest, in seconds, so a week-long answer cannot pin a name that changed. 60 to 604800, and 86400 by default. |
| body | minimum_ttl |
integer | no | The shortest time to live an answer is stored with, in seconds. 0 to 86400, and 0 by default. It must not exceed maximum_ttl. |
| body | negative_trust_anchor |
array of NegativeTrustAnchor |
no | The suffixes this server does not validate for a while, because their signatures are broken and their names still have to answer (RFC 7646). 32 at most, and none by default. Each is a [[negative_trust_anchor]] table. An entry acts until its until, and the cached answers under its suffix go when it starts and when it ends. No entry acts while the server does not trust its clock. |
| body | prefetch_minimum_ttl |
integer | no | The shortest time to live an answer needs, in seconds, to be refreshed before it expires. 1 to 86400, and 10 by default. It must not exceed maximum_ttl. |
| body | prefetch_trigger_percent |
integer | no | The share of an answer’s time to live left, in percent, where a hit refreshes it before it expires. 0 to 50, and 10 by default. 0 turns prefetch off. |
| body | qname_minimization |
string | no | How much of a name the recursive mode tells each server on the way down (RFC 9156). relaxed tells each one only the next label, and where a server denies a name in the middle of a chain, asks the whole name once at that zone. strict never sends the whole name to a server that has not earned it, so a zone whose servers answer such a name wrongly stops resolving here while other resolvers still reach it. off sends the whole name to every server. relaxed by default. The forwarding mode sends whole names whatever this says, because the resolver it forwards to sees the whole name anyway. |
| body | rate_connections |
integer | no | How many TCP connections one client address can hold open at once. Five times as many can be opened in a minute, which is five times this times rate_window_minutes in a window. A connection past either is closed before it is read. 0 to 1000, and 20 by default. Zero turns both limits off. |
| body | rate_prefix |
string | no | The two prefix lengths that group the clients of the limits, as "V4/V6", such as "24/56", which is the default. The subnet of those lengths around each client address is allowed eight times the limits of one address. IPv4 takes 8 to 32, and IPv6 takes 32 to 128. "32/128" makes the subnet the address, so two addresses are never counted together. A change applies at once: each subnet starts its window again from the counts of its addresses, and the failures held off for a second are let go. The limits of a zone transfer keep a /24 and a /56. |
| body | rate_queries_per_minute |
integer | no | How many queries one client address can send in a minute over TCP, DoT, DoH, DoQ and DoH over HTTP/3, times rate_window_minutes in its window, before this server drops the rest until the window ends. A query over plain UDP spends the same count, and is held to this bar only where rate_udp_queries_per_minute is absent. 0 to 1000000, and 1000 by default. Zero turns this bar off: a query over those transports is never refused, and it is still counted where the bar of UDP is on. Where rate_udp_queries_per_minute is absent, zero turns the bar of UDP off too, and nothing is counted. The subnet of rate_prefix around the address, a /24 or a /56 by default, is allowed eight times as many. |
| body | rate_resolutions_in_flight |
integer | no | How many resolutions one client address can have running at once. 0 to 1000, and 100 by default. Zero turns the limit off. |
| body | rate_resolutions_per_minute |
integer | no | How many resolutions one client address can start in a minute, times rate_window_minutes in its window. A resolution is a question the cache could not answer, which costs this server a forward or a walk. 0 to 100000, and 100 by default. Zero turns the limit off. A client past it still gets cached answers. |
| body | rate_udp_queries_per_minute |
integer | no | How many queries over plain UDP one client address can send in a minute, times rate_window_minutes in its window. It is a second bar on the same count: a query over plain UDP passes under this bar, and a query over TCP, DoT, DoH, DoQ or DoH over HTTP/3 passes under rate_queries_per_minute, so a query over TCP spends what UDP can send too. 0 to 1000000. Without it, UDP takes rate_queries_per_minute, so the value of rate_queries_per_minute is its default. Zero turns this bar off, and queries over UDP are still counted where the other bar is on. The subnet of rate_prefix is allowed eight times as many. |
| body | rate_window_minutes |
integer | no | How many minutes one count of a client runs over. Each limit of a minute holds that many times as much over the window, and a client can spend the whole of it at once: with 5, a client can send 5000 queries in its five minutes at the default. Resolutions waiting and connections open are counts of now, so the window does not change them. Where the table of counts is full, the entry of a client at or over half of a limit is not dropped to make room before its window ends. 1 to 60, and 1 by default. A change applies to every client at once. |
| body | rebind_allow |
array of string | no | Names whose private answers are expected, so the check lets them through. At most 64, and empty by default. One name per entry, and a name under an entry is not covered by it. |
| body | rebind_inside |
array of string | no | Addresses and prefixes this network calls its own, added to the ranges the check already holds. At most 16, and empty by default. Write the global IPv6 prefix your provider delegates to you here, such as 2001:db8:1234::/56. It reaches the inside of one network only, so no default can name it. An entry can be one address instead of a prefix. Three entries are refused: a prefix of length zero, which holds every address of its family, a range inside the part of IPv6 that holds an IPv4 address, which you write in its IPv4 form instead, and the same entry twice. 0.0.0.0 and :: stay served whatever you write here. |
| body | rebind_nat64 |
array of string | no | The NAT64 prefixes this network reaches IPv4 through, such as 64:ff9b::/96. At most 4, and empty by default. An address inside one of these carries an IPv4 address (RFC 6052), and that address is what the check reads: a public one is served, and a private one is refused. This is a separate setting from rebind_inside because it is a separate rule. An entry has to be an IPv6 prefix of length 32, 40, 48, 56, 64 or 96, which is where RFC 6052 puts the address. |
| body | rebind_protection |
boolean | no | Whether an answer from outside that points at a private address is refused. On by default. It is what stops a name on the internet becoming a way to reach the router. |
| body | recursion_parallel |
integer | no | How many addresses of the name servers of a zone the walk asks at once at its first exchange with the zone, for a question that a client waits for. The first reply of use wins. 1 to 3, and 1 by default, the walk of before with its hedge. With 2 or 3 the walk asks up to that many: fewer where fewer addresses are known or the budget of the walk is short, and one alone on a turn of exploration or where the query carries part of a client’s address. The name servers get up to that many times the queries of a first exchange. Background work, such as a prefetch, walks as with 1: no group, and its hedge where hedge is on. |
| body | resolution |
string | no | How a question no zone and no [[forward]] covers is answered. forward hands it to forwarders, and recurse walks from the root down to the servers that hold the name. forward by default, because nobody compared the checks of a walk with those of another validator yet. recurse beside a non-empty forwarders is refused, because the file then says two things. |
| body | resolution_deadline_ms |
integer | no | How long one resolution takes at most, across every attempt, in milliseconds. 100 to 10000, and 3000 by default. |
| body | retention_days |
integer | no | How long a query log row is kept, in days. 1 to 3650, and 30 by default. |
| body | retention_mib |
integer | no | The most room that the query log and its statistics take, in MiB: the data and the write-ahead log, not the free pages that SQLite reuses. 64 to 65536, and 512 by default. The rows give way to it oldest first, after the lists of the hours are held to a quarter of it. |
| body | root_hints |
array of string | no | The addresses the recursive mode asks for the root’s servers when it has none, one IP address per entry and no port. At most 64. Left out, the server uses the list built into it, which is the one the root’s operator publishes. An empty list is refused, because a recursive server with no way to a root answers nothing. So is an address that is not a host on a network, such as loopback, and an address named twice. |
| body | stale_answer_ttl |
integer | no | The time to live a stale answer goes out with, in seconds. 1 to 300, and 30 by default. |
| body | stale_max_wait_ms |
integer | no | How long a query waits for a refresh before it gets the stale answer, in milliseconds. 0 to 1800, and 1800 by default. 0 sends the stale answer at once and refreshes behind it. |
| body | stale_reset_ttl |
integer | no | After a failed refresh, how long stale data answers at once with no new attempt, in seconds. 1 to 300, and 30 by default. |
| body | stale_ttl |
integer | no | How long past its time to live an answer is kept for serve-stale, in seconds (RFC 8767). 0 to 604800, and 259200, three days, by default. 0 turns serve-stale off. |
| body | stats_retention_days |
integer | no | How long the hourly counts are kept, in days. 30 to 3650, and 1826 (five years) by default. At about 60 KiB a day, they must fit a quarter of retention_mib, or the file is refused. |
| body | store_clients |
boolean | no | Whether the query log stores who asked: the address, and the client that clients.toml names for it. On by default. |
| body | store_names |
boolean | no | Whether the query log stores the name that was asked for, the upstream that answered, and the path of the answer. On by default, and turning it off stops new rows carrying them. |
| body | upstream_timeout_ms |
integer | no | How long to wait for one upstream before trying elsewhere, in milliseconds. 100 to 10000, and 2000 by default. It must not outlive resolution_deadline_ms. The walk of the recursive mode waits this long for each name server, and a forwarder waits this long where forwarder_timeout_ms is absent. |
| body | zones.default_ttl |
integer | no | The lifetime of a record that the API adds without one, in seconds. 0 to 2147483647, and 3600 by default. |
| body | zones.expire |
integer | no | How long a secondary serves the zone without a check, in seconds. At least refresh plus retry, at most 2147483647, and 1209600 (two weeks) by default. |
| body | zones.max_refresh |
integer | no | The most time between two checks of the serial of a secondary zone, in seconds, for each secondary whose zone.toml names none. At least min_refresh, at most 2147483647, and 86400 (one day) by default. |
| body | zones.max_retry |
integer | no | The most time before a secondary zone tries again after a failed check, in seconds, for each secondary whose zone.toml names none. At least min_retry, at most 2147483647, and 3600 by default. |
| body | zones.min_refresh |
integer | no | The least time between two checks of the serial of a secondary zone, in seconds, for each secondary whose zone.toml names none. The refresh of the SOA of its copy is held to it. Between 60 and 2147483647, and 300 by default. |
| body | zones.min_retry |
integer | no | The least time before a secondary zone tries again after a failed check, in seconds, for each secondary whose zone.toml names none. The retry of the SOA of its copy is held to it. Between 10 and 2147483647, and 60 by default. |
| body | zones.minimum |
integer | no | The lifetime of a negative answer from a created zone, in seconds (RFC 2308 section 4). 0 to 2147483647, and 300 by default. |
| body | zones.name_server |
string | no | The primary name server of a zone that the API creates, which its SOA and its NS set name. A host name: labels of letters, digits and hyphens, with no hyphen at either end. An address, a wildcard and the root are refused. No default, because no name is right for every network. |
| body | zones.notify |
array of string | no | The secondaries that a zone notifies when its serial changes, for every zone that names no list of its own. Up to 16 entries, each an address with a port after it or left out for 53, such as 192.0.2.53 or [2001:db8::53]:5300. Nobody by default. A NOTIFY goes to each entry at a change of the serial and at each start, over UDP. |
| body | zones.ns_ttl |
integer | no | The lifetime of the NS set of a primary or a stub that the API creates, and of an NS set that the API adds without a lifetime, in seconds. 0 to 2147483647. Without it, an NS set takes default_ttl, so the value of default_ttl is its default. A stub serves no lifetime of its own, so for a stub ns_ttl sets only the text of its records.zone. |
| body | zones.query_from |
array of string | no | The networks whose clients get answers from a zone. The private and local ranges of allow_recursion by default: 127.0.0.0/8, ::1, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16, fe80::/10 and fc00::/7. A zone that the internet asks needs ["0.0.0.0/0", "::/0"]. 64 entries at most. |
| body | zones.refresh |
integer | no | How often a secondary checks the serial of a created zone, in seconds. 60 to 2147483647, and 3600 by default. |
| body | zones.responsible |
string | no | The mailbox of the person responsible for a created zone: a local part, which the apex of the zone completes, or a whole address. hostmaster by default (RFC 2142 section 7). A local part is letters, digits, dots and the signs of a plain mailbox, 63 bytes at most, and its dots become \. in the RNAME: [email protected] is first\.last.example.com.. A quoted local part, a space and a mailbox outside ASCII are refused. |
| body | zones.retry |
integer | no | How long a secondary waits after a failed check, in seconds. 0 to 2147483647, and 900 by default. |
| body | zones.serial |
string | no | How the server moves the serial of a zone on each change it makes: increment, unixtime or date. increment by default, which never runs ahead of a date however many changes a day brings. |
| body | zones.soa_ttl |
integer | no | The lifetime of the SOA record of a created zone, in seconds. 0 to 2147483647, and 3600 by default. |
| body | zones.transfer.allow |
array of TransferAllow |
no | The rules, 16 at most: one [[zones.transfer.allow]] block each in server.toml, and one [[transfer.allow]] block each in zone.toml. A client that one rule allows can transfer the zone, where the query_from of the zone, and that of each zone of this server below it, hold the client too. No rule allows nobody. |
| Answer | Body | Means |
|---|---|---|
| 200 | Applied as application/json |
Applied, with the revision it became |
| 400 | Problem as application/problem+json |
A body or a header this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change the configuration, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
A revision that moved or an If-Match that does not match (a tag of another record, as from before a restore, a revision alone, a weak tag, or an empty list), a change already refused, or a key that names a change of the records of a zone |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 1 MiB (body-too-large). |
| 415 | Problem as application/problem+json |
The content type is not one this route takes. A JSON body needs application/json, and a configuration file is sent as text |
| 422 | Problem as application/problem+json |
A setting the server cannot use |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Recording the change failed, or reading the credential failed |
| 503 | Problem as application/problem+json |
Not settled inside the write timeout, and the outcome is unknown. Or the server is stopping (stopping): that change was refused and changed nothing, and the same change can be sent again once the server is back. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X PATCH --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{"max_retries":4,"zones.default_ttl":600}' \ http://localhost/api/server{ "command": "api:2644e6b680cedf4d73fba923", "revision": 2}PUT /api/server
Section titled “PUT /api/server”Replace the whole file with the text in the body.
Role: operator or admin.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | if-match |
string | no | The ETag of a read of the configuration, as the read gave it, or a list of such tags. It names the revision and its record. A change written against a tag that does not run is refused with 409 |
| header | idempotency-key |
string | no | Names this change, so sending it again answers with the first outcome rather than applying it twice |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | text/plain |
string | yes | The whole file, as its own text. Not JSON: this replaces the file, comments and all |
| Answer | Body | Means |
|---|---|---|
| 200 | Applied as application/json |
Applied, with the revision it became |
| 400 | Problem as application/problem+json |
A body or a header this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change the configuration, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
A revision that moved or an If-Match that does not match (a tag of another record, as from before a restore, a revision alone, a weak tag, or an empty list), a change already refused, or a key that names a change of the records of a zone |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 1 MiB (body-too-large). |
| 422 | Problem as application/problem+json |
A file the server cannot use |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Recording the change failed, or reading the credential failed |
| 503 | Problem as application/problem+json |
Not settled inside the write timeout, and the outcome is unknown. Or the server is stopping (stopping): that change was refused and changed nothing, and the same change can be sent again once the server is back. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X PUT --unix-socket $S -H "$A" \ -H 'content-type: text/plain' \ --data-binary $'# what this server forwards to\nforwarders = ["1.1.1.1", "9.9.9.9"]\nmax_retries = 3\n' \ http://localhost/api/server{ "command": "api:57bd2e94af10c8d63e0b95f2", "revision": 2}POST /api/server/check
Section titled “POST /api/server/check”Check a change of server.toml as its save would check it, and change nothing.
Role: operator or admin, or the server’s own uid or root on the socket.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | if-match |
string | no | The ETag of a read of the configuration, as the save takes it. A check against a tag that does not run is refused with 409, as its save is |
| header | idempotency-key |
string | no | The key of the save that this check speaks for. A key that names a change answers with its outcome, as the save would. Any other key runs every check, though the change writes what runs, as a save with a key makes a revision then. Without a key, the repeat of a refused change is checked again, as the save judges it again, and the repeat of a change that landed answers that. The check records nothing, so the key stays free for the save |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated check and ignored for a bearer token |
| body | aggressive_nsec |
boolean | no | Whether a cached, validated NSEC or NSEC3 record answers the other names it proves absent, with no question upstream, as RFC 8198 says. On by default. It does nothing while dnssec_validation is off. A name that a zone just added can stay absent here while the proof lives. That is three hours at most, and less where the zone’s SOA says so. Turn it off to stop a checked denial answering the names it was not stored under. In the recursive mode, a name below a cached NXDOMAIN with an SOA gets that NXDOMAIN with the setting on or off. A change keeps the answer cache. Turning it off drops the ranges that the server holds. |
| body | cache_bytes |
integer | no | How much memory the cache accounts for, in bytes. At least 32768, and 67108864 by default. The cache divides it between shards, so a budget near the floor leaves each shard very little. |
| body | case_randomization |
boolean | no | Whether each outgoing query writes its name in a random mixture of upper and lower case, and refuses a reply whose question comes back in another one. Every server treats the two as one name, so this costs nothing, and each letter is a bit a forged answer has to guess. On by default. A server that rewrites the case is found and asked in plain case for an hour. Turn it off to rule it out while debugging a middlebox. |
| body | delegation_bytes |
integer | no | How much memory the recursive mode’s store of zone cuts accounts for, in bytes. At least 524288, and 8388608 by default. Nothing in it is served to a client: it is what the walk learned about which servers hold which zone. |
| body | denial_without_soa_ttl |
integer | no | How long a denial with no SOA record is kept, in seconds: an NXDOMAIN, or an answer with no record of the type asked, whose answer section is empty and whose authority section contains no SOA. An answer with no record and an NS set is a referral and is not kept, but an NXDOMAIN with the NS set of the zone above the name is. 0 to 300, and 0 by default, which keeps none, as RFC 2308 section 5 advises. The smaller of this and maximum_ttl applies, and a DNSSEC proof that expires sooner ends it sooner. Such a denial is never served stale, and the cache does not use it for the names below it. Two resolvers that keep these denials and forward to each other can pass one back and forth with no end, so keep 0 where this server forwards to a resolver that can forward back. |
| body | dnssec_sha1 |
string | no | What a zone signed with SHA-1, DNSSEC algorithms 5 and 7, proves. insecure, the default, treats the two as unsupported, as RFC 9905 says. Such a zone then answers without the AD bit, as an unsigned zone does, where no other algorithm signs it. validate checks them the way the other algorithms are checked, for a zone that has not moved to a stronger algorithm yet. A change empties the cache, because an answer stored under one of the two is not an answer under the other. |
| body | dnssec_validation |
boolean | no | Whether an answer is checked against the DNSSEC signatures of its zone, from the root’s keys down. On by default. A name whose chain is broken then answers SERVFAIL rather than with data an attacker can write. Turn it off to rule validation out while debugging, and to get the behavior of a server without it. |
| body | ecs_accept |
string | no | Whether an EDNS Client Subnet option from a sender in ecs_trust is honoured, as "off" or "trusted". Off by default. An option from anybody else is read and not used. |
| body | ecs_exclude |
array of string | no | Zones whose servers never hear part of a client’s address, beside the root, every top-level domain and the common public suffixes such as co.uk, which this server already leaves out. A name per entry, up to 64, and empty by default. |
| body | ecs_network |
array of string | no | The networks that queries of the recursive mode carry in place of the address of a client that sent no option, at most one of each family, such as ["93.184.216.0/24"]. Empty by default. For a server whose walk leaves through a network that is not its clients’, such as a tunnel, or a house whose clients are on private addresses. Every client of the family with no option then sends this network, and shares one cached answer. A client whose option is ignored, or that sends a SOURCE of 0, still sends nothing. Each network routes on the internet, and is no longer than the bits of ecs_send for its family. It needs ecs_send: turning ecs_send off needs ecs_network empty, or an empty ecs_network in the same body. Each refusal names ecs_network. Each authoritative server that the walk asks, outside the root, the top-level domains, the public suffixes and ecs_exclude, learns the network. |
| body | ecs_send |
string | no | Whether queries this server sends carry part of the client’s address (RFC 7871), as "off" or a pair of prefix lengths such as "24/56": the bits of an IPv4 client and of an IPv6 one. Off by default. It gives a server behind one public address nothing, because its clients are on private addresses, which no option carries, unless ecs_network names its public network. Turning it off needs ecs_network empty, or an empty ecs_network in the same body. |
| body | edns_answer_payload |
integer | no | The largest answer over UDP that this server sends to a client, in bytes, and the size that its answers offer in their OPT record. 512 to 4096, and 1232 by default. A client that offers less gets that much, and never less than 512, and a client with no OPT record gets 512 (RFC 1035 section 4.2.1). An answer that does not fit is cut, and the client asks again over TCP. A value above 1232 can be fragmented on the way, and a fragment can be lost or forged. A larger value also lets a forged query bring back a larger answer to its victim, so raise it only where the clients are known. |
| body | edns_upstream_payload |
integer | no | The size that this server offers in the OPT record of each query that it sends, to a forwarder and to each server of the walk, in bytes. 512 to 4096, and 1232 by default. A server that answers more than fits gets the answer cut, and this server asks again over TCP. A value above 1232 invites answers that are fragmented on the way, and a fragment can be lost or forged. |
| body | failure_ttl |
integer | no | How long a resolution failure is remembered, in seconds (RFC 9520). 1 to 300, and 60 by default. |
| body | forward |
array of Forward |
no | The suffixes that go to a resolver of your choosing rather than to forwarders. 32 at most, and none by default. Each is a [[forward]] table. |
| body | forwarder_concurrency |
integer | no | How many forwarders one question that a client waits for asks at once, and the first answer that passes the checks wins. 1 or 2, and 1 by default. With 2, the upstreams get about twice the queries. Background work, such as a prefetch, asks one at a time. |
| body | forwarder_retries |
integer | no | How many attempts after the first failure, for a forwarder. 0 to 10. Without it, a forwarder takes max_retries, so the value of max_retries is its default. Every upstream is tried at least once whatever this says. |
| body | forwarder_timeout_ms |
integer | no | How long to wait for one forwarder before trying the next, in milliseconds: an entry of forwarders or of the to of a [[forward]]. 100 to 10000. Without it, a forwarder waits upstream_timeout_ms, so the value of upstream_timeout_ms is its default. It must not outlive resolution_deadline_ms. The walk of the recursive mode keeps upstream_timeout_ms. |
| body | forwarders |
array of string | no | Where to send a question this server cannot answer, in the forward mode. An address with a port after it, or without one to default to 53. A name is refused, because resolving one needs the resolver this list configures. A wildcard address and a port of zero are refused as well: neither is somewhere to send a query, and a wildcard means this machine. An entry that is one of this machine’s own listening addresses is refused as the change is applied. 8 addresses at most, counting each address in the parentheses of an encrypted entry. tcp:// and an address, such as tcp://192.0.2.1, asks over TCP alone on one kept connection, and comes back as tcp://192.0.2.1:53. It is not encrypted. Empty by default, which answers NXDOMAIN for every name this server does not hold. |
| body | hedge |
boolean | no | Whether the recursive mode asks a second name server where the first takes three times its own average to reply. On by default. The first reply that is of use wins. Off, a walk that asks one server sends no second query. It acts on a walk that recursion_parallel leaves at 1: where that setting is 1, and for background work, such as a prefetch. Off leaves the groups of recursion_parallel on. |
| body | ipv6 |
string | no | Whether the recursive mode reaches a name server over IPv6: "enabled", the default, uses whichever family answers and races the two for a server it has not measured. "disabled" never uses an IPv6 address, for a network with an IPv6 route and no IPv6 connectivity. "preferred" tries IPv6 first for a server it has not measured. |
| body | keep_one_row_in |
integer | no | Keep one question in this many as a row of the query log. A question that is not kept as a row still counts in the hourly counts, which stay exact; the busiest lists, the devices and the percentiles come from the kept rows. 1 to 1000, and 1 by default, which keeps every question. Updates and zone transfers are always kept. A change applies to the next question, with no restart. |
| body | lame_interval_minutes |
integer | no | How long the recursive mode leaves a name server alone after it answered for a zone as though it did not hold it, in minutes. 30 to 1440, and 30 by default, which is the least RFC 4697 section 2.2.1 recommends. The server is left alone for that zone only. Where every server of a zone is marked, the zone is asked anyway. |
| body | latency_alpha |
integer | no | How far one measurement moves an upstream’s average round-trip time, in hundredths. 1 to 100, and 20 by default. |
| body | local_zones |
boolean | no | Whether this server answers the 97 reverse zones of RFC 6303 and RFC 7793 itself. They are the reverse names of the addresses that no name on the public internet answers for: the private ranges, the shared address space a carrier hands out, loopback, link-local, the documentation ranges and the broadcast address. On by default, and turning it off sends those queries to the forwarders, which is what a router that knows the names of the addresses it handed out needs. localhost, test, invalid, home.arpa, local and onion are answered here whatever this is set to. |
| body | max_concurrent_resolutions |
integer | no | How many resolutions this server runs at once, across every client. A query past it is answered SERVFAIL. 1 to 1024, and 256 by default: this server holds 1024 query sockets, and a resolution holds two at its worst, so 256 leave half of them for everything else. |
| body | max_retries |
integer | no | How many attempts after the first failure, for a forwarder where forwarder_retries is absent. 0 to 10, and 2 by default. Every upstream is tried at least once whatever this says. |
| body | maximum_ttl |
integer | no | The longest, in seconds, so a week-long answer cannot pin a name that changed. 60 to 604800, and 86400 by default. |
| body | minimum_ttl |
integer | no | The shortest time to live an answer is stored with, in seconds. 0 to 86400, and 0 by default. It must not exceed maximum_ttl. |
| body | negative_trust_anchor |
array of NegativeTrustAnchor |
no | The suffixes this server does not validate for a while, because their signatures are broken and their names still have to answer (RFC 7646). 32 at most, and none by default. Each is a [[negative_trust_anchor]] table. An entry acts until its until, and the cached answers under its suffix go when it starts and when it ends. No entry acts while the server does not trust its clock. |
| body | prefetch_minimum_ttl |
integer | no | The shortest time to live an answer needs, in seconds, to be refreshed before it expires. 1 to 86400, and 10 by default. It must not exceed maximum_ttl. |
| body | prefetch_trigger_percent |
integer | no | The share of an answer’s time to live left, in percent, where a hit refreshes it before it expires. 0 to 50, and 10 by default. 0 turns prefetch off. |
| body | qname_minimization |
string | no | How much of a name the recursive mode tells each server on the way down (RFC 9156). relaxed tells each one only the next label, and where a server denies a name in the middle of a chain, asks the whole name once at that zone. strict never sends the whole name to a server that has not earned it, so a zone whose servers answer such a name wrongly stops resolving here while other resolvers still reach it. off sends the whole name to every server. relaxed by default. The forwarding mode sends whole names whatever this says, because the resolver it forwards to sees the whole name anyway. |
| body | rate_connections |
integer | no | How many TCP connections one client address can hold open at once. Five times as many can be opened in a minute, which is five times this times rate_window_minutes in a window. A connection past either is closed before it is read. 0 to 1000, and 20 by default. Zero turns both limits off. |
| body | rate_prefix |
string | no | The two prefix lengths that group the clients of the limits, as "V4/V6", such as "24/56", which is the default. The subnet of those lengths around each client address is allowed eight times the limits of one address. IPv4 takes 8 to 32, and IPv6 takes 32 to 128. "32/128" makes the subnet the address, so two addresses are never counted together. A change applies at once: each subnet starts its window again from the counts of its addresses, and the failures held off for a second are let go. The limits of a zone transfer keep a /24 and a /56. |
| body | rate_queries_per_minute |
integer | no | How many queries one client address can send in a minute over TCP, DoT, DoH, DoQ and DoH over HTTP/3, times rate_window_minutes in its window, before this server drops the rest until the window ends. A query over plain UDP spends the same count, and is held to this bar only where rate_udp_queries_per_minute is absent. 0 to 1000000, and 1000 by default. Zero turns this bar off: a query over those transports is never refused, and it is still counted where the bar of UDP is on. Where rate_udp_queries_per_minute is absent, zero turns the bar of UDP off too, and nothing is counted. The subnet of rate_prefix around the address, a /24 or a /56 by default, is allowed eight times as many. |
| body | rate_resolutions_in_flight |
integer | no | How many resolutions one client address can have running at once. 0 to 1000, and 100 by default. Zero turns the limit off. |
| body | rate_resolutions_per_minute |
integer | no | How many resolutions one client address can start in a minute, times rate_window_minutes in its window. A resolution is a question the cache could not answer, which costs this server a forward or a walk. 0 to 100000, and 100 by default. Zero turns the limit off. A client past it still gets cached answers. |
| body | rate_udp_queries_per_minute |
integer | no | How many queries over plain UDP one client address can send in a minute, times rate_window_minutes in its window. It is a second bar on the same count: a query over plain UDP passes under this bar, and a query over TCP, DoT, DoH, DoQ or DoH over HTTP/3 passes under rate_queries_per_minute, so a query over TCP spends what UDP can send too. 0 to 1000000. Without it, UDP takes rate_queries_per_minute, so the value of rate_queries_per_minute is its default. Zero turns this bar off, and queries over UDP are still counted where the other bar is on. The subnet of rate_prefix is allowed eight times as many. |
| body | rate_window_minutes |
integer | no | How many minutes one count of a client runs over. Each limit of a minute holds that many times as much over the window, and a client can spend the whole of it at once: with 5, a client can send 5000 queries in its five minutes at the default. Resolutions waiting and connections open are counts of now, so the window does not change them. Where the table of counts is full, the entry of a client at or over half of a limit is not dropped to make room before its window ends. 1 to 60, and 1 by default. A change applies to every client at once. |
| body | rebind_allow |
array of string | no | Names whose private answers are expected, so the check lets them through. At most 64, and empty by default. One name per entry, and a name under an entry is not covered by it. |
| body | rebind_inside |
array of string | no | Addresses and prefixes this network calls its own, added to the ranges the check already holds. At most 16, and empty by default. Write the global IPv6 prefix your provider delegates to you here, such as 2001:db8:1234::/56. It reaches the inside of one network only, so no default can name it. An entry can be one address instead of a prefix. Three entries are refused: a prefix of length zero, which holds every address of its family, a range inside the part of IPv6 that holds an IPv4 address, which you write in its IPv4 form instead, and the same entry twice. 0.0.0.0 and :: stay served whatever you write here. |
| body | rebind_nat64 |
array of string | no | The NAT64 prefixes this network reaches IPv4 through, such as 64:ff9b::/96. At most 4, and empty by default. An address inside one of these carries an IPv4 address (RFC 6052), and that address is what the check reads: a public one is served, and a private one is refused. This is a separate setting from rebind_inside because it is a separate rule. An entry has to be an IPv6 prefix of length 32, 40, 48, 56, 64 or 96, which is where RFC 6052 puts the address. |
| body | rebind_protection |
boolean | no | Whether an answer from outside that points at a private address is refused. On by default. It is what stops a name on the internet becoming a way to reach the router. |
| body | recursion_parallel |
integer | no | How many addresses of the name servers of a zone the walk asks at once at its first exchange with the zone, for a question that a client waits for. The first reply of use wins. 1 to 3, and 1 by default, the walk of before with its hedge. With 2 or 3 the walk asks up to that many: fewer where fewer addresses are known or the budget of the walk is short, and one alone on a turn of exploration or where the query carries part of a client’s address. The name servers get up to that many times the queries of a first exchange. Background work, such as a prefetch, walks as with 1: no group, and its hedge where hedge is on. |
| body | resolution |
string | no | How a question no zone and no [[forward]] covers is answered. forward hands it to forwarders, and recurse walks from the root down to the servers that hold the name. forward by default, because nobody compared the checks of a walk with those of another validator yet. recurse beside a non-empty forwarders is refused, because the file then says two things. |
| body | resolution_deadline_ms |
integer | no | How long one resolution takes at most, across every attempt, in milliseconds. 100 to 10000, and 3000 by default. |
| body | retention_days |
integer | no | How long a query log row is kept, in days. 1 to 3650, and 30 by default. |
| body | retention_mib |
integer | no | The most room that the query log and its statistics take, in MiB: the data and the write-ahead log, not the free pages that SQLite reuses. 64 to 65536, and 512 by default. The rows give way to it oldest first, after the lists of the hours are held to a quarter of it. |
| body | root_hints |
array of string | no | The addresses the recursive mode asks for the root’s servers when it has none, one IP address per entry and no port. At most 64. Left out, the server uses the list built into it, which is the one the root’s operator publishes. An empty list is refused, because a recursive server with no way to a root answers nothing. So is an address that is not a host on a network, such as loopback, and an address named twice. |
| body | stale_answer_ttl |
integer | no | The time to live a stale answer goes out with, in seconds. 1 to 300, and 30 by default. |
| body | stale_max_wait_ms |
integer | no | How long a query waits for a refresh before it gets the stale answer, in milliseconds. 0 to 1800, and 1800 by default. 0 sends the stale answer at once and refreshes behind it. |
| body | stale_reset_ttl |
integer | no | After a failed refresh, how long stale data answers at once with no new attempt, in seconds. 1 to 300, and 30 by default. |
| body | stale_ttl |
integer | no | How long past its time to live an answer is kept for serve-stale, in seconds (RFC 8767). 0 to 604800, and 259200, three days, by default. 0 turns serve-stale off. |
| body | stats_retention_days |
integer | no | How long the hourly counts are kept, in days. 30 to 3650, and 1826 (five years) by default. At about 60 KiB a day, they must fit a quarter of retention_mib, or the file is refused. |
| body | store_clients |
boolean | no | Whether the query log stores who asked: the address, and the client that clients.toml names for it. On by default. |
| body | store_names |
boolean | no | Whether the query log stores the name that was asked for, the upstream that answered, and the path of the answer. On by default, and turning it off stops new rows carrying them. |
| body | upstream_timeout_ms |
integer | no | How long to wait for one upstream before trying elsewhere, in milliseconds. 100 to 10000, and 2000 by default. It must not outlive resolution_deadline_ms. The walk of the recursive mode waits this long for each name server, and a forwarder waits this long where forwarder_timeout_ms is absent. |
| body | zones.default_ttl |
integer | no | The lifetime of a record that the API adds without one, in seconds. 0 to 2147483647, and 3600 by default. |
| body | zones.expire |
integer | no | How long a secondary serves the zone without a check, in seconds. At least refresh plus retry, at most 2147483647, and 1209600 (two weeks) by default. |
| body | zones.max_refresh |
integer | no | The most time between two checks of the serial of a secondary zone, in seconds, for each secondary whose zone.toml names none. At least min_refresh, at most 2147483647, and 86400 (one day) by default. |
| body | zones.max_retry |
integer | no | The most time before a secondary zone tries again after a failed check, in seconds, for each secondary whose zone.toml names none. At least min_retry, at most 2147483647, and 3600 by default. |
| body | zones.min_refresh |
integer | no | The least time between two checks of the serial of a secondary zone, in seconds, for each secondary whose zone.toml names none. The refresh of the SOA of its copy is held to it. Between 60 and 2147483647, and 300 by default. |
| body | zones.min_retry |
integer | no | The least time before a secondary zone tries again after a failed check, in seconds, for each secondary whose zone.toml names none. The retry of the SOA of its copy is held to it. Between 10 and 2147483647, and 60 by default. |
| body | zones.minimum |
integer | no | The lifetime of a negative answer from a created zone, in seconds (RFC 2308 section 4). 0 to 2147483647, and 300 by default. |
| body | zones.name_server |
string | no | The primary name server of a zone that the API creates, which its SOA and its NS set name. A host name: labels of letters, digits and hyphens, with no hyphen at either end. An address, a wildcard and the root are refused. No default, because no name is right for every network. |
| body | zones.notify |
array of string | no | The secondaries that a zone notifies when its serial changes, for every zone that names no list of its own. Up to 16 entries, each an address with a port after it or left out for 53, such as 192.0.2.53 or [2001:db8::53]:5300. Nobody by default. A NOTIFY goes to each entry at a change of the serial and at each start, over UDP. |
| body | zones.ns_ttl |
integer | no | The lifetime of the NS set of a primary or a stub that the API creates, and of an NS set that the API adds without a lifetime, in seconds. 0 to 2147483647. Without it, an NS set takes default_ttl, so the value of default_ttl is its default. A stub serves no lifetime of its own, so for a stub ns_ttl sets only the text of its records.zone. |
| body | zones.query_from |
array of string | no | The networks whose clients get answers from a zone. The private and local ranges of allow_recursion by default: 127.0.0.0/8, ::1, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16, fe80::/10 and fc00::/7. A zone that the internet asks needs ["0.0.0.0/0", "::/0"]. 64 entries at most. |
| body | zones.refresh |
integer | no | How often a secondary checks the serial of a created zone, in seconds. 60 to 2147483647, and 3600 by default. |
| body | zones.responsible |
string | no | The mailbox of the person responsible for a created zone: a local part, which the apex of the zone completes, or a whole address. hostmaster by default (RFC 2142 section 7). A local part is letters, digits, dots and the signs of a plain mailbox, 63 bytes at most, and its dots become \. in the RNAME: [email protected] is first\.last.example.com.. A quoted local part, a space and a mailbox outside ASCII are refused. |
| body | zones.retry |
integer | no | How long a secondary waits after a failed check, in seconds. 0 to 2147483647, and 900 by default. |
| body | zones.serial |
string | no | How the server moves the serial of a zone on each change it makes: increment, unixtime or date. increment by default, which never runs ahead of a date however many changes a day brings. |
| body | zones.soa_ttl |
integer | no | The lifetime of the SOA record of a created zone, in seconds. 0 to 2147483647, and 3600 by default. |
| body | zones.transfer.allow |
array of TransferAllow |
no | The rules, 16 at most: one [[zones.transfer.allow]] block each in server.toml, and one [[transfer.allow]] block each in zone.toml. A client that one rule allows can transfer the zone, where the query_from of the zone, and that of each zone of this server below it, hold the client too. No rule allows nobody. |
| body | text/plain |
string | yes | The change, as its save takes it: the settings to change as JSON, as PATCH /api/server takes them, or the whole file as text, as PUT /api/server takes it. The content type picks one |
| Answer | Body | Means |
|---|---|---|
| 200 | CheckedChange as application/json |
The change passed every check of its save that binds nothing, or its save would make no new revision (unchanged). The bind of a listener is not checked |
| 400 | Problem as application/problem+json |
A body or a header this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change the configuration, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
A revision that moved or an If-Match that does not match, a change that was refused before (already-refused) by its key, a change that has not settled, or a key that names a change of the records of a zone. The save answers the same |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 1 MiB (body-too-large). |
| 415 | Problem as application/problem+json |
A content type other than application/json and text/plain |
| 422 | Problem as application/problem+json |
A setting the server cannot use, with its file, setting and line, as the save refuses it. Where a zone owes a result of a change of records that the save tries first, this and a 409 of the state of a zone carry "results_owed": true, because the save can answer otherwise |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading the ledger failed, or reading the credential failed |
| 503 | Problem as application/problem+json |
The check did not finish inside the write timeout (still-checking), and it wrote nothing. Or too many changes or checks wait (too-many-changes): at most four checks wait at once, and past that a check answers this at once, so a save keeps at least four places. Or the server is stopping (stopping). Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X POST --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{"max_retries":4}' \ http://localhost/api/server/check{ "results_owed": false, "revision": 41, "unchanged": false, "waits_for_restart": []}Clients
Section titled “Clients”GET /api/clients
Section titled “GET /api/clients”The clients and the groups the server is running, and clients.toml.
Two answers, and Accept picks one, the same as /api/server. Both read the file of the
running revision from the disk, so a copy of clients.toml that is damaged fails both.
Role: any role. On the socket, the server’s own uid or root needs no credential. Any
role sees the addresses, the subnets and the listening addresses that pick each client, in the
lists and in file. It is policy rather than content: no query and no address that asked.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | accept |
string | no | text/plain answers with the file’s own text, comments and all, which is what PUT takes back. Anything else answers with the policy and the file as JSON |
| Answer | Body | Means |
|---|---|---|
| 200 | ClientPolicy as application/json |
The clients, their selectors and the groups of the running revision, and the file as that revision holds it. Any role sees the addresses, the subnets and the listening addresses that pick each client. With Accept: text/plain the answer is the file’s own text instead, with the same entity tag, and empty text where the running generation has no clients.toml. Carries etag. |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading clients.toml of the running revision failed, for either answer |
| 503 | Problem as application/problem+json |
A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ http://localhost/api/clients{ "clients": [ { "addresses": [], "arrived_on": [], "group": "default", "name": "default", "subnets": [] }, { "addresses": [ "192.168.1.20" ], "arrived_on": [], "group": "kids", "name": "kids-tablet", "subnets": [] } ], "file": { "client": [ { "addresses": [ "192.168.1.20" ], "arrived_on": null, "group": "kids", "name": "kids-tablet", "subnets": null } ], "group": [ { "allow": [ "school.example.org" ], "block": [ "games.example.net", "video.example.net" ], "block_v4": null, "block_v6": null, "blocking": null, "canary": null, "cname_blocking": null, "mode": "nxdomain", "name": "kids", "private_relay": null, "sources": [ "hagezi-pro" ] } ] }, "groups": [ { "allows": 0, "blocking": true, "blocks": 0, "name": "default", "resolved_sources": [ "hagezi-pro" ], "sources": "all" }, { "allows": 1, "blocking": true, "blocks": 2, "mode": "nxdomain", "name": "kids", "resolved_sources": [ "hagezi-pro" ], "sources": "named" } ]}POST /api/zone-clock/resume
Section titled “POST /api/zone-clock/resume”Resume the zone clock: trust the wall clock as it is, and end a hold of the clock and an open outage of a stopped server. The clock then holds back no record past its expiry time.
Role: operator or admin, or the server’s own uid or root on the socket.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| Answer | Body | Means |
|---|---|---|
| 200 | ZoneClockResumed as application/json |
Resumed. The clock takes the wall time, and runs |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change the configuration, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
The wall clock reads earlier than this build (clock-wrong), so the resume would trust a wrong time. Nothing changes |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
The write of aging.clock failed (clock-unwritten), so the clock still holds until a resume. The detail says where it failed, such as a sync of the directory of the state root that the mount refuses. Or a panic broke the clock (clock-broken), which holds until a restart. Or reading the credential failed |
| 503 | Problem as application/problem+json |
The clocks of the host gave no coherent reading (clock-unsampled), with Retry-After: 1, or the zone clock does not run (clock-off), such as while the server stops. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X POST --unix-socket $S -H "$A" \ http://localhost/api/zone-clock/resume{ "held_before": true, "resumed_at": 1794409200}GET /api/zones
Section titled “GET /api/zones”The zones of an operator, by id.
Role: any role, or the server’s own uid or root on the socket.
This takes no parameters and no body.
| Answer | Body | Means |
|---|---|---|
| 200 | array of ZoneRow as application/json |
Each zone of an operator that the running revision holds, by id. A zone that the server holds itself, such as localhost, is not listed |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 503 | Problem as application/problem+json |
The read of the zones did not finish. Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ http://localhost/api/zones[ { "enabled": true, "id": "example-net", "kind": "primary", "name": "example.net.", "records": 12, "records_off": 1, "serial": 2026101801, "state": "dynamic" }, { "enabled": true, "frozen_since": 1789137404, "id": "lab-test", "kind": "primary", "name": "lab.test.", "records": 3, "records_off": 0, "serial": 7, "state": "frozen" }]POST /api/zones
Section titled “POST /api/zones”Make a zone in one revision. A primary gets its zone.toml and a records.zone of the
defaults, with the SOA, the NS set of one name server and the addresses of that server where it
is inside the zone. With serial, its zone.toml names that scheme, and its first serial is
the step of the scheme from 0. A stub with servers gets its zone.toml and a records.zone
of those servers. A stub with primaries gets its zone.toml alone, and learns its servers
from them.
Role: operator or admin, or the server’s own uid or root on the socket.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | if-match |
string | no | The ETag of a read of the configuration, as the read gave it, or a list of such tags. It names the revision and its record. A change written against a tag that does not run is refused with 409 |
| header | idempotency-key |
string | no | Names this change, so sending it again answers with the first outcome rather than applying it twice |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | addresses |
array of string | no | The addresses of the name server of a primary, where it is inside the zone, and only then. Sixteen at most. A stub takes no addresses, not even an empty list. |
| body | id |
string | yes | The id of the zone, the name of its directory under zones/: lower-case letters, digits and hyphens, 40 at most. |
| body | kind |
NewZoneKind |
no | primary, the default, or stub. |
| body | name |
string | yes | The apex of the zone, an absolute name in ASCII. A label outside ASCII is written as its A-label, which starts with xn--. |
| body | name_server |
string | no | The name server of the NS set of a primary, an absolute name in ASCII. Left out, zones.name_server of server.toml. |
| body | primaries |
array of string | no | The primaries of a stub that learns its servers from them, as primaries of zone.toml takes them: an address, with a port after it or without one for 53. One to eight. A stub takes primaries or servers, not both, and a primary takes neither, not even an empty list. |
| body | serial |
SerialScheme |
no | How the server moves the serial of a primary, as serial of its zone.toml. The first serial is the step of this scheme from 0. Left out, zones.serial of server.toml, and zone.toml names none. A stub moves no serial, so it takes no serial. |
| body | servers |
array of NewStubServer |
no | The servers of a static stub, which its records.zone keeps: the NS set of its apex, and the addresses of each server inside the zone. One to eight. |
| Answer | Body | Means |
|---|---|---|
| 200 | Applied as application/json |
Made, with the revision it became. A repeat of a request with its key gets this answer of its first try |
| 400 | Problem as application/problem+json |
A body that is not JSON, or a header this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change the configuration, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
A zone of this id exists (zone-exists), a revision that moved or an If-Match that does not match (a tag of another record, as from before a restore, a revision alone, a weak tag, or an empty list), or a change already refused. A request with a key keeps its first refusal, the 404, 409 and 422 of the checks of this route included, so it goes again with a new key, or with none |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 415 | Problem as application/problem+json |
The body is not application/json |
| 422 | Problem as application/problem+json |
The body names no zone this server can make (invalid-zone): a name that does not read or is not in ASCII, a list past its bound, a key of a primary on a stub, serial included, or of a stub on a primary (an empty list counts as a key), or a stub with both primaries and servers, with neither, or with an empty one. Or the defaults write no zone for it (new-zone), or the configuration with the zone would not be valid, such as a primary that is no address or a server outside the zone with an address |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Recording the change failed, or reading the credential failed |
| 503 | Problem as application/problem+json |
The zones are not published yet, other changes landed each time this one was checked (configuration-moving), the change did not settle inside the write timeout, the server is stopping, or too many changes wait (too-many-changes). Or the request ran out of time with nothing of it recorded (out-of-time), which is safe to send again, or the ledger did not answer for its key in time (ledger-unread), so send it again with the same key. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X POST --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{"addresses":["192.168.1.2"],"id":"home-arpa","name":"home.arpa","name_server":"ns.home.arpa","serial":"date"}' \ http://localhost/api/zones{ "command": "api:9f31c0a7de54b18e2b7ac641", "revision": 7}DELETE /api/zones/{id}
Section titled “DELETE /api/zones/{id}”Delete a zone: its zone.toml, its records.zone and every other file of its directory, in
one revision. Its journal stays in the state root, as for a zone deleted by hand. A stub zone
is deleted the same way: its zone.toml, and its records.zone where it is a static stub. The
stub.zone of a learned stub goes as it goes when a stub leaves the configuration.
Role: operator or admin, or the server’s own uid or root on the socket.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | id |
string | yes | The id of the zone, the name of its directory under zones/ |
| header | if-match |
string | no | The ETag of a read of the configuration, as the read gave it, or a list of such tags. It names the revision and its record. A change written against a tag that does not run is refused with 409 |
| header | idempotency-key |
string | no | Names this change, so sending it again answers with the first outcome rather than applying it twice |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| Answer | Body | Means |
|---|---|---|
| 200 | Applied as application/json |
Deleted, with the revision it became. A repeat of a request with its key gets this answer of its first try |
| 400 | Problem as application/problem+json |
The id is not the id of a zone, or a header this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change the configuration, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | Problem as application/problem+json |
The running revision holds no zone of an operator and no stub zone with this id |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
The zone is frozen (zone-frozen): thaw it first. Or a revision that moved or an If-Match that does not match (a tag of another record, as from before a restore, a revision alone, a weak tag, or an empty list), or a change already refused. A request with a key keeps its first refusal, the 404, 409 and 422 of the checks of this route included, so it goes again with a new key, or with none |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 422 | Problem as application/problem+json |
The configuration without the zone would not be valid |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Recording the change failed, reading the credential failed, or the files of the zone could not be listed, in which case nothing was submitted |
| 503 | Problem as application/problem+json |
The zones are not published yet, other changes landed each time this one was checked (configuration-moving), the change did not settle inside the write timeout, the server is stopping, or too many changes wait (too-many-changes). Or the request ran out of time with nothing of it recorded (out-of-time), which is safe to send again, or the ledger did not answer for its key in time (ledger-unread), so send it again with the same key. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X DELETE --unix-socket $S -H "$A" \ http://localhost/api/zones/{id}{ "command": "api:9f31c0a7de54b18e2b7ac641", "revision": 7}GET /api/zones/{id}
Section titled “GET /api/zones/{id}”One zone of an operator.
Role: any role, or the server’s own uid or root on the socket.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | id |
string | yes | The id of the zone, the name of its directory under zones/ |
| Answer | Body | Means |
|---|---|---|
| 200 | ZoneRow as application/json |
The zone, as the list shows it. A stub zone adds stub: where its servers come from, its dnssec and rebind_protection settings, and where its last refresh stands. A zone with ANAME records adds anames: where the set of each owner stands. A primary zone adds replication: what its zone.toml names for zone transfers and NOTIFY, with null for a key that it leaves to [zones]. A primary zone also adds ns_ttl: the ns_ttl of its zone.toml or null, and the lifetime of a new NS set. A primary zone also adds record_expiry: whether its records take an expiry time. A zone whose apex has a row in the serial witness adds served_serial and first_serial: the last serial that the apex served, and the first serial of its history. Every zone adds journal: whether its id holds a trace of a journal, which a convert that keeps the id refuses. Carries cache-control, etag. |
| 400 | Problem as application/problem+json |
The id is not the id of a zone: lower-case letters, digits and hyphens, 40 at most. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | Problem as application/problem+json |
The running revision holds no zone of an operator with this id |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 503 | Problem as application/problem+json |
The read of the zones did not finish. Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ http://localhost/api/zones/{id}{ "enabled": true, "id": "corp-example", "kind": "stub", "name": "corp.example.", "state": "static", "stub": { "dnssec": "validate", "primaries": [ "10.0.0.53:53" ], "rebind_protection": true, "refreshed": 1789137404, "servers": [ { "addresses": [ "10.0.0.53" ], "name": "dc1.corp.example." } ], "source": "learned", "state": "fresh", "timers": { "expire": 604800, "refresh": 3600, "retry": 600 } }}PATCH /api/zones/{id}
Section titled “PATCH /api/zones/{id}”Change settings of the zone.toml of a zone, one at a time. Anything left out is left alone.
Role: operator or admin, or the server’s own uid or root on the socket.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | id |
string | yes | The id of the zone, the name of its directory under zones/ |
| header | if-match |
string | no | The ETag of a read of the configuration, as the read gave it, or a list of such tags. It names the revision and its record. A change written against a tag that does not run is refused with 409 |
| header | idempotency-key |
string | no | Names this change, so sending it again answers with the first outcome rather than applying it twice |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | application/json |
object | yes | The settings of zone.toml to change, such as enabled and default_ttl. A key of a table goes by its dotted name, and a key sent as null is taken out of the file, so its default applies. name and kind, however the key spells them, are refused, also as null: a zone with another apex is another zone, so delete it and make it again, and POST /api/zones/{id}/convert changes the kind. transfer.allow takes the rules of zone transfers as a list of objects, each {"from": [...]}, written as [[transfer.allow]] blocks: [] keeps a [transfer] table with no rule, which closes the zone, and null takes the table out, so the zone takes the rules of [zones]. The table transfer is not sent by its own name. A stub zone takes the keys of a stub, such as enabled, primaries, dnssec and rebind_protection. A setting of a primary that the file of a stub would then hold is refused with 422, transfer.allow as a list or [] among them. A key that the file does not hold, sent as null, changes nothing |
| Answer | Body | Means |
|---|---|---|
| 200 | Applied as application/json |
Applied, with the revision it became. A repeat of a request with its key gets this answer of its first try |
| 400 | Problem as application/problem+json |
The id is not the id of a zone, a body that is not a JSON object of settings, or a header this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change the configuration, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | Problem as application/problem+json |
The running revision holds no zone of an operator and no stub zone with this id |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
The zone is frozen (zone-frozen): edit the files in the configuration root, then thaw it. Or a revision that moved or an If-Match that does not match (a tag of another record, as from before a restore, a revision alone, a weak tag, or an empty list), or a change already refused. A request with a key keeps its first refusal, the 404, 409 and 422 of the checks of this route included, so it goes again with a new key, or with none |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 1 MiB (body-too-large). |
| 415 | Problem as application/problem+json |
The body is not application/json |
| 422 | Problem as application/problem+json |
name or kind (zone-key), a key that does not read as a key of TOML (unreadable-key), or a setting the server cannot use, such as a key of a primary on a stub zone or of a stub on a primary. Or record_expiry turned on where the zone, with the changes of its journal, holds an expiry time at or before now (expiry-past-on), or turned off while it holds one (expiry-held), each with setting record_expiry and the records in detail. A turn on while the clock gate does not trust the clock, or over a zone stopped for its journal, is invalid-configuration with the same setting. A turn on over files whose every NS record of the apex has an expiry time is apex-ns-expiry, with setting zones and the file records.zone. A stub zone that holds the journal of a primary zone under its id takes no change of its settings, not even one that changes nothing; a stub made again under that id holds the same journal, and keeps the settings that it was made with |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Recording the change failed, or reading the credential failed |
| 503 | Problem as application/problem+json |
The zones are not published yet, other changes landed each time this one was checked (configuration-moving), the change did not settle inside the write timeout, the server is stopping, or too many changes wait (too-many-changes). Or the request ran out of time with nothing of it recorded (out-of-time), which is safe to send again, or the ledger did not answer for its key in time (ledger-unread), so send it again with the same key. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X PATCH --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{"default_ttl":600,"enabled":false}' \ http://localhost/api/zones/{id}{ "command": "api:9f31c0a7de54b18e2b7ac641", "revision": 7}POST /api/zones/{id}/checkpoint
Section titled “POST /api/zones/{id}/checkpoint”Checkpoint a zone: write the updates of its journal into records.zone, as a revision of its
own. A zone that the configuration lists as unmarked is bound to its files again, where its
journal is whole.
Role: operator or admin, or the server’s own uid or root on the socket.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | id |
string | yes | The id of the zone, the name of its directory under zones/ |
| header | idempotency-key |
string | no | Names this checkpoint, so sending it again answers with what the ledger holds for it, a refusal included, rather than checkpointing again |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| Answer | Body | Means |
|---|---|---|
| 200 | Checkpointed as application/json |
The zone is at its files: this request made the revision, or the running revision had it there already. A repeat with the key of the first try gets the revision of that try |
| 400 | Problem as application/problem+json |
The id is not the id of a zone, the request has a body, it sends If-Match, which this route does not take, or a key that does not read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change the configuration, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | Problem as application/problem+json |
The running revision holds no zone of an operator with this id, or the id is that of a stub zone |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
The state of the zone is in the way, and a later change or the next start settles it: it is frozen and its files wait for its thaw (zone-frozen), it is stopped or its last update did not settle (zone-state), or a command waits for the next start (unfinished). Or a key whose first try was refused (already-refused) or has not settled (unfinished) |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 422 | Problem as application/problem+json |
The zone takes no checkpoint, and the problem says why and what to do: it has no journal, its journal ends in a torn append, is damaged or belongs to another zone, or it serves its files and is not listed |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Recording the checkpoint failed, or reading the credential failed |
| 503 | Problem as application/problem+json |
The zones are not published yet, too many changes wait, the server is stopping, or the request ran out of time with nothing of it recorded (out-of-time), which is safe to send again. Or the checkpoint did not settle inside the write timeout (still-writing): the answer names its command, and a repeat with the same key answers what it did. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X POST --unix-socket $S -H "$A" \ http://localhost/api/zones/{id}/checkpoint{ "command": "api:checkpoint:home-arpa:1789137404.000000001.0", "result": "made", "revision": 14, "text": "kept", "zone": "home-arpa"}POST /api/zones/{id}/convert
Section titled “POST /api/zones/{id}/convert”Change the kind of a zone between a primary and a stub, or the source of a stub between its
servers and its primaries, in one revision. The zone keeps its apex and the row of its serial
witness. With id, the zone moves to that id in the same revision, and what a journal left
under the old id stays there.
Role: operator or admin, or the server’s own uid or root on the socket.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | id |
string | yes | The id of the zone, the name of its directory under zones/ |
| header | if-match |
string | no | The ETag of a read of the configuration, as the read gave it, or a list of such tags. It names the revision and its record. A change written against a tag that does not run is refused with 409 |
| header | idempotency-key |
string | no | Names this change, so sending it again answers with the first outcome rather than applying it twice |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | addresses |
array of string | no | The addresses of the name server of a primary, as POST /api/zones takes them. |
| body | id |
string | no | A new id for the zone, in the form of the id of POST /api/zones. Left out, or equal to the id of the path, the zone keeps its id. |
| body | kind |
NewZoneKind |
yes | The kind of the zone after the change: primary or stub. A static and a learned stub are one kind with two sources, so a stub that changes its source names stub again. |
| body | name_server |
string | no | The name server of the NS set of a primary, as POST /api/zones takes it. |
| body | primaries |
array of string | no | The primaries of a stub that learns its servers from them, as POST /api/zones takes them. |
| body | serial |
SerialScheme |
no | How the server moves the serial of a primary, as POST /api/zones takes it. |
| body | servers |
array of NewStubServer |
no | The servers of a static stub, as POST /api/zones takes them. |
| Answer | Body | Means |
|---|---|---|
| 200 | Converted as application/json |
Converted, with the revision it became, the id of the zone after the change, and the keys of the old zone.toml that went over and that were dropped. A repeat of a request with its key gets this answer of its first try, its lists from the record of the command |
| 400 | Problem as application/problem+json |
The id is not the id of a zone, a body that is not JSON, or a header this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change the configuration, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | Problem as application/problem+json |
The running revision holds no zone of an operator and no stub zone with this id |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
The zone is a frozen primary (zone-frozen): thaw it, then convert it. Or a zone holds the new id (zone-exists, with setting id). Or a revision that moved or an If-Match that does not match, or a change already refused. A request with a key keeps its first refusal, so it goes again with a new key, or with none |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 415 | Problem as application/problem+json |
The body is not application/json |
| 422 | Problem as application/problem+json |
The body names no zone this server can make (invalid-zone, with the key in setting): a key of another kind, an empty list, both lists of a stub or neither, a list past its bound, a name that does not read, or an id that is not an id. The zone is of that kind and source already (same-kind, with setting kind), with a new id too. A trace of a journal is in the way (zone-journal, with setting id): under the id with no new id, under the new id, or a look for one that failed. The defaults write no records.zone for a primary (new-zone). Or invalid-configuration: the record of the running revision or the old zone.toml does not read, the freeze state of a primary is in doubt, or the configuration with the new zone would not be valid |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Recording the change failed, reading the credential failed, the files of the zone could not be listed, in which case nothing was submitted, or the convert landed and its lists could not be read from its record, in which case the words name its revision and its command |
| 503 | Problem as application/problem+json |
The zones are not published yet, other changes landed each time this one was checked (configuration-moving), the change did not settle inside the write timeout, the server is stopping, or too many changes wait (too-many-changes). Or the request ran out of time with nothing of it recorded (out-of-time), which is safe to send again, or the ledger did not answer for its key in time (ledger-unread), so send it again with the same key. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X POST --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{"id":"corp-example-2","kind":"stub","primaries":["10.0.0.53"]}' \ http://localhost/api/zones/{id}/convert{ "carried": [ "enabled" ], "command": "api:9f31c0a7de54b18e2b7ac641", "dropped": [ "update", "notify", "transfer" ], "revision": 412, "zone": "corp-example-2"}POST /api/zones/{id}/convert/check
Section titled “POST /api/zones/{id}/convert/check”Check a convert of a zone as its save would check it, and change nothing.
Role: operator or admin, or the server’s own uid or root on the socket.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | id |
string | yes | The id of the zone, the name of its directory under zones/ |
| header | if-match |
string | no | The ETag of a read of the configuration, as the convert takes it. A check against a tag that does not run is refused with 409, as its convert is |
| header | idempotency-key |
string | no | The key of the convert that this check speaks for. A key that names a convert that landed answers unchanged with its command and its lists, before any check of the zones, so also where it moved the zone. Any other key runs every check. The check records nothing, so the key stays free for the convert |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated check and ignored for a bearer token |
| body | addresses |
array of string | no | The addresses of the name server of a primary, as POST /api/zones takes them. |
| body | id |
string | no | A new id for the zone, in the form of the id of POST /api/zones. Left out, or equal to the id of the path, the zone keeps its id. |
| body | kind |
NewZoneKind |
yes | The kind of the zone after the change: primary or stub. A static and a learned stub are one kind with two sources, so a stub that changes its source names stub again. |
| body | name_server |
string | no | The name server of the NS set of a primary, as POST /api/zones takes it. |
| body | primaries |
array of string | no | The primaries of a stub that learns its servers from them, as POST /api/zones takes them. |
| body | serial |
SerialScheme |
no | How the server moves the serial of a primary, as POST /api/zones takes it. |
| body | servers |
array of NewStubServer |
no | The servers of a static stub, as POST /api/zones takes them. |
| Answer | Body | Means |
|---|---|---|
| 200 | ConvertChecked as application/json |
The convert passed every check of its save that binds nothing, with the id after it and the keys that would go over and that would be dropped. Or its save would make no new revision (unchanged), with the command that landed and the lists of its record |
| 400 | Problem as application/problem+json |
The id is not the id of a zone, a body that is not JSON, or a header this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change the configuration, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | Problem as application/problem+json |
The running revision holds no zone of an operator and no stub zone with this id, as the convert answers |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
The refusals of the convert: zone-frozen, zone-exists, a revision that moved or an If-Match that does not match, or a change already refused by its key |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 415 | Problem as application/problem+json |
The body is not application/json |
| 422 | Problem as application/problem+json |
The refusals of the convert: invalid-zone, same-kind, zone-journal, new-zone and invalid-configuration, each as the convert gives it. Where a zone owes a result of a change of records that the save tries first, a refusal of the checks carries "results_owed": true |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading the ledger failed, reading the credential failed, the files of the zone could not be listed, or the lists of a convert that landed could not be read from its record |
| 503 | Problem as application/problem+json |
The check did not finish inside the write timeout (still-checking), and it wrote nothing. Or too many changes or checks wait (too-many-changes), other changes landed each time it was checked (configuration-moving), the zones are not published yet, or the server is stopping. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X POST --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{"id":"corp-example-2","kind":"stub","primaries":["10.0.0.53"]}' \ http://localhost/api/zones/{id}/convert/check{ "carried": [ "enabled" ], "dropped": [ "update", "notify", "transfer" ], "results_owed": false, "revision": 412, "unchanged": false, "zone": "corp-example-2"}GET /api/zones/{id}/export
Section titled “GET /api/zones/{id}/export”The zone at its head as a master file.
The text is the one that BIND and Knot read, with every record turned off as its ;off line.
A record with a refresh time ends its line with its ;refreshed= mark, which another server
reads as a comment. ANAME lines are the exception: only this server reads them, and another
server refuses them.
Role: any role, or the server’s own uid or root on the socket.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | id |
string | yes | The id of the zone, the name of its directory under zones/ |
| Answer | Body | Means |
|---|---|---|
| 200 | string as text/dns |
The zone as master file text, with every update applied. It reads back into the same zone. The entity tag is the version of the records that the pages of the records give, which a change of the records through the API will take as If-Match. Carries etag. |
| 400 | Problem as application/problem+json |
The id is not the id of a zone. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | Problem as application/problem+json |
The running revision holds no zone of an operator with this id, or the id is that of a stub zone, which this route does not serve |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 503 | Problem as application/problem+json |
The records of the zone are not known: the zone is stopped for its journal, its last update did not settle, or the state of the zones does not read or lacks an input of the version of the zone. Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ http://localhost/api/zones/{id}/exportPOST /api/zones/{id}/freeze
Section titled “POST /api/zones/{id}/freeze”Freeze a zone: write the updates of its journal into records.zone, and take no change that
does not come from its files until the thaw. Edit the files in the configuration root, then
thaw.
Role: operator or admin, or the server’s own uid or root on the socket.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | id |
string | yes | The id of the zone, the name of its directory under zones/ |
| header | idempotency-key |
string | no | Names this freeze, so sending it again answers with the first outcome, a refusal included, rather than freezing again |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| Answer | Body | Means |
|---|---|---|
| 200 | Frozen as application/json |
Frozen. The zone answers queries as before and takes no update until its thaw. A repeat with the key of the first try gets this again |
| 400 | Problem as application/problem+json |
The id is not the id of a zone, the request sends If-Match, which this route does not take, or a key that does not read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change the configuration, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | Problem as application/problem+json |
The running revision holds no zone of an operator with this id, or the id is that of a stub zone, which this route does not serve |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
The zone is frozen already (zone-frozen): a retry without a key of a freeze whose answer was lost gets this, so the freeze can have landed. Or a key whose first try was refused (already-refused) or has not settled (unfinished) |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 422 | Problem as application/problem+json |
The zone takes no freeze now, and the problem says why: it is stopped, its last update did not settle, a command waits for the next start |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Recording the freeze failed, or reading the credential failed |
| 503 | Problem as application/problem+json |
The zones are not published yet or do not read, other changes landed each time this one was checked, too many changes wait, the freeze did not settle inside the write timeout, or the server is stopping. Or the request ran out of time with nothing of it recorded (out-of-time), which is safe to send again, or the ledger did not answer for its key in time (ledger-unread), so send it again with the same key. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X POST --unix-socket $S -H "$A" \ http://localhost/api/zones/{id}/freeze{ "serial": 2026101901, "since": 1789137404, "zone": "home-arpa"}PUT /api/zones/{id}/import
Section titled “PUT /api/zones/{id}/import”Make a primary zone from the text of a master file, or replace the records of a zone that exists, in one revision.
With name, it makes zone id at that apex: its zone.toml, of the kind primary and with
serial where the query names one, and its records.zone with the text. With no name,
records.zone takes the text, and every other master file of the zone goes, because the file
holds every record. Without an
Idempotency-Key, the same text again is no change. With a key, every request is recorded, so
the same text again is a revision of its own, with the same files. The text must hold all the
records of the zone: an $INCLUDE line is refused, because the file it names is on the machine
that the zone came from. The body is read as UTF-8 text, whatever its Content-Type says.
Role: operator or admin, or the server’s own uid or root on the socket.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | id |
string | yes | The id of the zone, the name of its directory under zones/ |
| query | name |
string | no | The apex of a new zone. With it, the import makes the zone. Without it, the zone exists and its records are replaced. |
| query | serial |
SerialScheme |
no | How the server moves the serial of the new zone, as serial of its zone.toml. Only with name: a replace keeps the zone.toml of the zone. The SOA of the text keeps its serial, and the scheme moves it at the next change. Left out, zones.serial of server.toml. |
| header | if-match |
string | no | The ETag of a read of the configuration, as the read gave it, or a list of such tags. It names the revision and its record. A change written against a tag that does not run is refused with 409, before the master file is parsed |
| header | idempotency-key |
string | no | Names this change, so sending it again answers with the first outcome rather than applying it twice |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | text/plain |
string | yes | The text of the master file, up to 16 MiB, with every record of the zone. It is read as UTF-8 text, whatever the Content-Type says. The body has to arrive within 10 seconds of the head, on every door: 16 MiB takes about 13.4 Mbit/s, which a TCP door over a slow link does not reach |
| Answer | Body | Means |
|---|---|---|
| 200 | Applied as application/json |
Imported, with the revision it became. Without a key, the same text again changes nothing, and answers with the revision that runs. With a key, every request is recorded, so the same text again is a revision of its own, with the same files. A repeat of a request with its key gets this answer of its first try |
| 400 | Problem as application/problem+json |
The id is not the id of a zone, a query this route does not take, a serial that is no scheme or that comes without name, a body that is not UTF-8, or a header this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change the configuration, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | Problem as application/problem+json |
With no name: the running revision holds no zone of an operator with this id, or the id is that of a stub zone, which an import does not change |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
With name: a zone or a stub zone of this id exists (zone-exists). The zone is frozen (zone-frozen): its records are then edited in the configuration root, and tadoru zone thaw reads them. Or a revision that moved or an If-Match that does not match (a tag of another record, as from before a restore, a revision alone, a weak tag, or an empty list), or a change already refused. A request with a key keeps its first refusal, the 404, 409 and 422 of the checks of this route included, so it goes again with a new key, or with none |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 MiB (body-too-large). |
| 422 | Problem as application/problem+json |
The text is no zone of this apex (invalid-import), such as a line that does not read or an $INCLUDE line, the name is not a domain name (invalid-zone), or the configuration with the zone would not be valid, such as a hand edit of a zone that takes updates, which no state of the zone lets an import make. A replace of a zone with record_expiry whose text leaves no NS record of the apex without an expiry time is apex-ns-expiry, with setting zones |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Recording the change failed, reading the credential failed, or the record of the running revision does not say which files the zone holds, in which case nothing was submitted |
| 503 | Problem as application/problem+json |
The zones are not published yet, other changes landed each time this one was checked (configuration-moving), the change did not settle inside the write timeout (still-writing), the server is stopping, or too many changes wait (too-many-changes). Or the request ran out of time with nothing of it recorded (out-of-time), which is safe to send again, or the ledger did not answer for its key in time (ledger-unread), so send it again with the same key. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: Another large body or answer, an upload of a list, the import of a zone or the read of a list file, held the one place of the large bodies for 1 second, and nothing of this one was read (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X PUT --unix-socket $S -H "$A" \ -H 'content-type: text/plain' \ --data-binary $'$TTL 300\n@ IN SOA ns admin 1 3600 600 604800 300\n@ IN NS ns\nns IN A 192.0.2.1\n' \ "http://localhost/api/zones/{id}/import?name=home.arpa&serial=date"{ "command": "api:9f31c0a7de54b18e2b7ac641", "revision": 7}GET /api/zones/{id}/records
Section titled “GET /api/zones/{id}/records”The records of a zone at its head, in pages.
Role: any role, or the server’s own uid or root on the socket.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | id |
string | yes | The id of the zone, the name of its directory under zones/ |
| query | from |
integer | no | Where the page starts: next of the page before. Left out, the first page. A page after the first names the version of the page before too. |
| query | limit |
integer | no | How many records at most. A thousand by default, which is also the most one page carries. |
| query | version |
string | no | The version of the page before, so this page comes from the same records. A version that moved since is a 409, and the reader starts again from the first page. Left out, the page is of the records as they stand, which only the first page can be. |
| Answer | Body | Means |
|---|---|---|
| 200 | RecordsPage as application/json |
One page of the records the zone serves and the records it turns off, with every update applied, the comment and the expiry time of each record that has one, the time that each record last changed on this server where it is known, and the time of the last refresh of a record that ages. The comment, the expiry time and the time of a refresh come from the files and the journal. The entity tag is the version of the records, which a change of the records through the API will take as If-Match. modified_at alone is outside the version and the entity tag, and two reads of one version can give different values of it: a rollback or a hand edit that brings back the same records gives them new times, and a failed write of the times, a failure that stops the times or a restart takes times away. So a client never keeps modified_at by the version or the entity tag. refreshed_at, comment and expires_at are inside the version. Carries etag. |
| 400 | Problem as application/problem+json |
The id is not the id of a zone, the page asks for no record, or a page after the first names no version. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | Problem as application/problem+json |
The running revision holds no zone of an operator with this id, or the id is that of a stub zone, which this route does not serve |
| 409 | Problem as application/problem+json |
The page names a version that moved, so it cannot come from the same records as the page before |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 503 | Problem as application/problem+json |
The records of the zone are not known: the zone is stopped for its journal, its last update did not settle, or the state of the zones does not read or lacks an input of the version of the zone. Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ "http://localhost/api/zones/{id}/records?from=1000&limit=100&version=5f0c6a8d21e94b7a8c3f1d2e4b6a9c0d"{ "next": 2, "records": [ { "off": false, "record": "example.net. 3600 IN NS ns.example.net." }, { "modified_at": 1793534400, "off": true, "record": "www.example.net. 300 IN A 192.0.2.9" }, { "comment": "the laptop of the office", "expires_at": 1796083200, "modified_at": 1793534400, "off": false, "record": "pc.example.net. 3600 IN A 192.0.2.30", "refreshed_at": 1793620800 } ], "version": "5f0c6a8d21e94b7a8c3f1d2e4b6a9c0d", "zone": "example-net"}POST /api/zones/{id}/records
Section titled “POST /api/zones/{id}/records”Change the records of a zone: records to add, remove, turn off and turn on, the lifetime of a whole set, the sets to replace, and the notes of records.
The request states the records that you want. Each line acts where the zone is not yet as it
says, and is in effect where it is, so the same request again changes nothing. A line is one
record in the form that GET /api/zones/{id}/records gives in record, with every name
absolute: an add with no lifetime takes the lifetime of its set, and an add with one must have
it where replace does not name its set. For a set that the zone serves and replace does not
name, set_ttl is the one way to change its lifetime. A removal and a turn off or on take a
line with or without its lifetime. The change goes into the journal of the zone as one
transaction, and moves its serial once. It is not an RFC 2136 update: a line that an update
would pass over is a 422 that names the line, and nothing changes.
replace names a set by its owner and its type. A record that the zone serves in the set leaves
it where no line of add, remove, turn_off or turn_on names it, so add and replace of
one set replace its records. Its records turned off stay off. A replaced set takes the lifetime
of its set_ttl item, else the lifetime of its adds that state one, else the lifetime that the
zone served it with. notes sets the comment and the expiry time of a record that the change
leaves in the zone: an absent field keeps, null clears, and a value sets. An expiry time needs
a zone with record_expiry. A change whose only lines that act are notes keeps the serial.
Every request needs an Idempotency-Key that names the change. A request again with the key
gets the first answer, its status, its body and its ETag, for 24 hours after it settled,
whatever If-Match it sends. A request with other lines under the key is 422 key-reused,
which shows the first answer. A 429 or a 503 keeps nothing, so the same key can still land.
After a restore, every key is new. A large correction of the clock can end the window of a key
early, and a request again after that is a new change, which only a concrete If-Match guards.
If-Match is optional. It takes the ETag of GET /api/zones/{id}/records, the version of the
records of the zone, which only a change of that zone moves. A console sends it, because a
removal with a typo in its data reads as in_effect, and only the version says that the
console read the zone that it changes. A version that moved is a 409 version-moved, and so
is an If-Match that is an empty list, which matches no version. * means whatever is current.
The quiet checkpoint of a zone moves its version too, so a console that edits again after it
gets one 409 and reads again.
Role: operator or admin, or the server’s own uid or root on the socket.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | id |
string | yes | The id of the zone, the name of its directory under zones/ |
| header | idempotency-key |
string | yes | Names this change: 1 to 255 octets of visible ASCII, sent the same way each time. A request again with it gets the first answer |
| header | if-match |
string | no | The ETag of GET /api/zones/{id}/records, or a list of such tags. The change goes on only where one of them is the version of the records now |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | add |
array of string | no | Records to add. A line with no lifetime takes the lifetime of its set. A line with one must have the lifetime of its set, unless replace names the set, which then takes it. |
| body | notes |
array of NoteItem |
no | The notes of records that the change leaves in the zone, served or off: a comment and an expiry time each. |
| body | remove |
array of string | no | Records to remove, with or without their lifetime. |
| body | replace |
array of ReplaceItem |
no | The sets to replace, each by its owner and its type: a record that the zone serves in the set leaves it where no line of add, remove, turn_off or turn_on names it. So add and replace of one set replace its records. The records of the set turned off stay off. |
| body | set_ttl |
array of SetTtl |
no | The lifetime of a whole set. For a set that the zone serves and replace does not name, it is the one way to change its lifetime. |
| body | turn_off |
array of string | no | Records to turn off: the zone keeps each as an ;off line and serves nothing of it. |
| body | turn_on |
array of string | no | Records turned off to serve again, at the lifetime of their set. |
| Answer | Body | Means |
|---|---|---|
| 200 | RecordsChanged as application/json |
The change landed, or every line was in effect already. The ETag is the version of the records after it. Carries etag. |
| 400 | RecordProblem as application/problem+json |
The id is not the id of a zone, or the key or If-Match does not read (bad-request). Or the body is not one this route can use (unreadable-body): JSON that does not read, an unknown field, no line, a line that is not one record with every name absolute, or an item of set_ttl, replace or notes of another form, such as a key sent twice, which list, index and excerpt name. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to make this change, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | RecordProblem as application/problem+json |
This server holds no zone with this id (not-held), kept under the key |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | RecordProblem as application/problem+json |
The records moved since the version of If-Match (version-moved), or the zone is off (zone-off), frozen (zone-frozen), at its files with nothing that marks its updates (zone-listed), or without its journal (journal-lost). Each is kept under the key |
| 413 | RecordProblem as application/problem+json |
More than 1,000 lines and items of all seven lists (too-many-lines). Or: The body passes the limit of this route, 1 MiB (body-too-large). |
| 415 | RecordProblem as application/problem+json |
The body is not sent as application/json (wrong-content-type) |
| 422 | RecordRefusal as application/problem+json |
A rule refuses the change, which rule names, with the line where one caused it: of the request alone (named-twice, two-lifetimes, soa, aname, signer-type, replaces-itself, comment-form, expiry-time), kept nowhere, or of the zone (kind, outside-zone, turned-off, absent, two-lifetimes, lifetime-differs, replaces-record, cname-beside-data, data-at-cname, last-apex-ns, apex-ns-expiry, expiry-off, expiry-time, broken, change-too-large, too-large, cross-file), kept under the key. Or the key names other lines (key-reused), with the first answer in first |
| 429 | RecordProblem as application/problem+json |
A quota of changes in 24 hours is full (over-quota). Retry-After says when its oldest change leaves the window. Too many failed attempts with this credential, or too many attempts at once: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. Carries retry-after. |
| 500 | RecordProblem as application/problem+json |
The change did not land, or its outcome is not known: not-in-journal, unknown, append-refused and unreplayable, kept under the key. Or a defect of this server, kept nowhere: row-unread, key-collision, start-refused or internal |
| 503 | RecordProblem as application/problem+json |
The change cannot go in now, and nothing is kept: an earlier change has not settled (unsettled, with its command), a change under this key waits for a start (recovery-owed), the audit is full (audit-full), too many changes wait or are being read (too-many-changes), the change did not settle in the write timeout (still-writing), no command id was free (ids-taken), the server is stopping (stopping), or the zone or the server cannot take it now (unavailable). Send it again with the same key. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). Carries retry-after. |
curl -s -X POST --unix-socket $S -H "$A" \ -H 'idempotency-key: add-www-1' \ -H 'content-type: application/json' \ -d '{"add":["www.example.com. IN A 192.0.2.10"],"notes":[{"comment":"the web server","expires_at":1796083200,"record":"www.example.com. IN A 192.0.2.10"}],"remove":["old.example.com. 300 IN A 192.0.2.9"],"replace":[{"owner":"www.example.com.","type":"A"}]}' \ http://localhost/api/zones/{id}/records{ "command": "records:5f0c6a8d21e94b7a8c3f1d2e4b6a9c0d:0b1c2d3e4f5061728394a5b6c7d8e9f0", "outcomes": { "add": [ "applied", "in_effect" ], "remove": [ "applied" ], "set_ttl": [ "applied" ], "turn_off": [ "applied" ], "turn_on": [] }, "result": "applied", "serial": 2026102001, "version": "9a1b2c3d4e5f60718293a4b5c6d7e8f9"}POST /api/zones/{id}/records/import
Section titled “POST /api/zones/{id}/records/import”Merge a zone file into the records of a zone that exists.
The body is the text of a zone file, read as UTF-8 whatever its Content-Type says, with the
apex of the zone as its origin. Each record of the file is an add, with the lifetime that the
file gives it: its own, that of $TTL, or the last one stated. A record with no lifetime, no
$TTL before it and no earlier record that states one is refused. The SOA records of the file and its records turned off are skipped
and counted, because the zone keeps its own SOA. The file holds 10,000 records at most, and the
change that the merge makes stays within one transaction of the journal. An $INCLUDE line is
refused, because the file that it names is on the machine that the file came from.
A record that the zone does not serve takes the comment and the expiry time that the file gives
it. Without replace, a record that the zone serves keeps its own. With replace, each set that
the file names ends as the file states it: its records that the file does not hold leave, and
each record takes the notes of the file, an absent one cleared.
The merge goes into the journal of the zone as one transaction, as a change of records does,
with its key and its stored answer. Every request needs an Idempotency-Key, and the same key
with the same file and the same replace gets the first answer for 24 hours after it settled.
Another file under the key, or a key that a change of records used, is 422 key-reused.
If-Match takes the version of the records, as for a change of records.
Role: operator or admin, or the server’s own uid or root on the socket.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | id |
string | yes | The id of the zone, the name of its directory under zones/ |
| query | replace |
boolean | no | Whether each set that the file names takes the records of the file, so the records that the zone serves in it and the file does not name leave it: true or false. Left out, it is false. |
| header | idempotency-key |
string | yes | Names this merge: 1 to 255 octets of visible ASCII, sent the same way each time. A request again with it gets the first answer |
| header | if-match |
string | no | The ETag of GET /api/zones/{id}/records, or a list of such tags. The merge goes on only where one of them is the version of the records now |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | text/plain |
string | yes | The text of the zone file, up to 1 MiB, with the apex of the zone as its origin. It is read as UTF-8 text, whatever the Content-Type says |
| Answer | Body | Means |
|---|---|---|
| 200 | RecordsImported as application/json |
The merge landed, or every record of the file was in effect already. The ETag is the version of the records after it. Carries etag. |
| 400 | RecordProblem as application/problem+json |
The id is not the id of a zone, the key, If-Match or the query does not read, or replace is not true or false (bad-request). Or the body is not UTF-8 (unreadable-body). Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to make this change, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | RecordProblem as application/problem+json |
This server holds no zone with this id (not-held), kept under the key |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | RecordProblem as application/problem+json |
The records moved since the version of If-Match (version-moved), or the zone is off (zone-off), frozen (zone-frozen), at its files with nothing that marks its updates (zone-listed), or without its journal (journal-lost). Each is kept under the key |
| 413 | RecordProblem as application/problem+json |
The file passes 10,000 records, the skipped ones counted (too-many-records), at the line of the record past it. A body past 1 MiB is refused before it is read. Or: The body passes the limit of this route, 1 MiB (body-too-large). |
| 422 | RecordRefusal as application/problem+json |
The file is no zone file that a merge takes (invalid-import): an $INCLUDE line, a line that does not read, a record with no lifetime, or no record at all. Or a rule refuses the merge, which rule names, with list file and the line of the record where one caused it: of the file alone (aname, named-twice, two-lifetimes, replaces-itself, comment-form, expiry-time), kept nowhere, or of the zone (kind, outside-zone, turned-off, lifetime-differs, replaces-record, cname-beside-data, data-at-cname, apex-ns-expiry, expiry-off, expiry-time, broken, change-too-large, too-large, cross-file), kept under the key. Or the key names another request (key-reused), with the first answer in first |
| 429 | RecordProblem as application/problem+json |
A quota of changes in 24 hours is full (over-quota). Retry-After says when its oldest change leaves the window. Too many failed attempts with this credential, or too many attempts at once: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. Carries retry-after. |
| 500 | RecordProblem as application/problem+json |
The merge did not land, or its outcome is not known: not-in-journal, unknown, append-refused and unreplayable, kept under the key. Or a defect of this server, kept nowhere: row-unread, key-collision, start-refused or internal |
| 503 | RecordProblem as application/problem+json |
The merge cannot go in now, and nothing is kept, as for a change of records. The zone also came, or its apex moved, while the file was read (unavailable). Send it again with the same key. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). Carries retry-after. |
curl -s -X POST --unix-socket $S -H "$A" \ -H 'idempotency-key: merge-home-1' \ -H 'content-type: text/plain' \ --data-binary $'$TTL 300\nwww IN A 192.0.2.10 ; the web server\nmail IN MX 10 mx.example.com.\n' \ http://localhost/api/zones/{id}/records/import{ "added": 2, "command": "records:5f0c6a8d21e94b7a8c3f1d2e4b6a9c0d:0b1c2d3e4f5061728394a5b6c7d8e9f0", "in_effect": 5, "removed": 0, "result": "applied", "serial": 2026102002, "skipped": 1, "version": "9a1b2c3d4e5f60718293a4b5c6d7e8f9"}POST /api/zones/{id}/refresh
Section titled “POST /api/zones/{id}/refresh”Refresh a stub zone that learns its servers now: ask its primaries the questions of its timers before the timers say, at most once a minute.
The minute counts from the start of the last try, whatever started it: the timers, a revision or an ask. Inside it, and while a refresh of the zone runs, an ask starts nothing. The answer says what the ask did. Read the zone again for the result.
Role: operator or admin, or the server’s own uid or root on the socket.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | id |
string | yes | The id of the zone, the name of its directory under zones/ |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | application/json |
RefreshBody |
no | Optional: empty, or the JSON object {}. Any key is refused |
| Answer | Body | Means |
|---|---|---|
| 202 | RefreshAsked as application/json |
The refresh task took the ask. started says whether it started a refresh, running whether one runs, and queued whether the zone waits for a free place |
| 400 | Problem as application/problem+json |
The id is not the id of a zone (bad-request), or the body is not JSON (unreadable-body). Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change the configuration, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | Problem as application/problem+json |
The running revision holds no zone of an operator and no stub zone with this id |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
A primary zone or a static stub, which has nothing to refresh (zone-kind). Or zone.toml turns the stub off, so it has no route and no refresh (zone-off). Or the refresh task does not follow the zone yet, as for a moment after a revision, or waits to forget it (zone-pending): ask again |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 415 | Problem as application/problem+json |
A body without the JSON content type |
| 422 | Problem as application/problem+json |
The body holds a key, such as full, which this build does not take, or it is not a JSON object (unreadable-body) |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 503 | Problem as application/problem+json |
The zones are not published yet. Or no refresh task runs (refresh-not-running). Or the queue of asks is full, or the task did not answer within 2 seconds (refresh-busy): nothing started, so ask again. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X POST --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{}' \ http://localhost/api/zones/{id}/refresh{ "next_refresh_at": 1795680060, "queued": false, "running": true, "started": true, "zone": "corp-example"}POST /api/zones/{id}/thaw
Section titled “POST /api/zones/{id}/thaw”Thaw a zone: read its files from the configuration root, check them, and serve them as a new
revision. Where the records changed, the serial of the file must pass the serial of the freeze,
or the body asks for serial_bump.
Role: operator or admin, or the server’s own uid or root on the socket.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | id |
string | yes | The id of the zone, the name of its directory under zones/ |
| header | idempotency-key |
string | no | Names this thaw, so sending it again answers with the first outcome, a refusal included, rather than thawing again |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | application/json |
ThawAsked |
no | Optional. serial_bump moves the serial of the edited file by the scheme of the zone first |
| Answer | Body | Means |
|---|---|---|
| 200 | Thawed as application/json |
Thawed. The files of the zone serve, and it takes updates again. A repeat with the key of the first try gets this again |
| 400 | Problem as application/problem+json |
The id is not the id of a zone, a body that is not JSON, the request sends If-Match, which this route does not take, or a key that does not read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change the configuration, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | Problem as application/problem+json |
The running revision holds no zone of an operator with this id, or the id is that of a stub zone, which this route does not serve |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
The zone is not frozen (zone-not-frozen): a retry without a key of a thaw whose answer was lost gets this, so the thaw can have landed. Or a key whose first try was refused (already-refused) or has not settled (unfinished) |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 415 | Problem as application/problem+json |
A body that is not application/json |
| 422 | Problem as application/problem+json |
A body with a key this route does not take (unreadable-body), files of the zone that do not make a zone that can serve, or a serial that did not pass the serial of the freeze. The zone stays frozen, and the problem names the file and the line. Files of a zone with record_expiry that leave no NS record of the apex without an expiry time are apex-ns-expiry, with setting zones and no line |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Recording the thaw failed, reading the credential failed, or the revision of the thaw runs and its journal did not take the thaw (thaw-unfinished): the zone does not serve until the next start writes it |
| 503 | Problem as application/problem+json |
The zones are not published yet or do not read, other changes landed each time this one was checked, too many changes wait, the thaw did not settle inside the write timeout, or the server is stopping. Or the request ran out of time with nothing of it recorded (out-of-time), which is safe to send again, or the ledger did not answer for its key in time (ledger-unread), so send it again with the same key. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X POST --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{"serial_bump":true}' \ http://localhost/api/zones/{id}/thaw{ "command": "api:thaw:home-arpa:1789137404.000000001", "revision": 12, "zone": "home-arpa"}Revisions
Section titled “Revisions”GET /api/revisions
Section titled “GET /api/revisions”The generation history, newest first, one page at a time.
Role: any role.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| query | before |
integer | no | List the rows with a smaller revision than this one. The next page takes the smallest revision of the page before. Absent, the page starts at the newest row. |
| query | limit |
integer | no | The most rows the page holds, from 1 to 1000, and 200 by default. |
| Answer | Body | Means |
|---|---|---|
| 200 | array of Revision as application/json |
One page of the history, newest first. A refused change is here too, with the reason. An empty array is the end of the history |
| 400 | Problem as application/problem+json |
before is not a revision, or limit is not a number from 1 to 1000. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading the history failed, or the listing of the kept configurations did not read (storage). A listing that fails is never a page where every row reads restorable false |
| 503 | Problem as application/problem+json |
A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ "http://localhost/api/revisions?before=38&limit=200"[ { "actor": "alice", "at": 1789137416, "changed": { "files": [ { "change": "replaced", "file": "server.toml", "settings": [ "max_retries" ] } ] }, "command": "api:2644e6b680cedf4d73fba923", "origin": "api", "restorable": false, "revision": 2, "running": true, "state": "activated", "summary": "set max_retries to 4 in server.toml", "tag": "\"2.4f1c09a2be57d3e8106fa9c4d2b0e771\"" }]GET /api/revisions/{revision}/difference
Section titled “GET /api/revisions/{revision}/difference”What a rollback to an older revision changes now: each file, each setting, and the value that runs beside the value that comes back.
The same comparison as the changed of a row, with the running revision before and the
revision of the path after, with no bound of files or settings and with the values. A
revision whose change failed answers the 422 that a rollback to it answers.
Role: any role.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | revision |
integer | yes | The revision that a rollback would bring back |
| query | after |
string | no | List the files after this path, which is the next of the page before. Absent, the page starts at the first path. |
| query | limit |
integer | no | The most files the page holds, from 1 to 1000, and 200 by default. |
| Answer | Body | Means |
|---|---|---|
| 200 | Difference as application/json |
One page of the files that a rollback changes, in the order of their paths. The running revision gives no files. Send tag in If-Match with the rollback, so a change that lands after the preview answers 409. This is what the files hold. A rollback can also move the serial of a zone, which this does not show, and it is refused where it changes the files of a frozen zone (409 zone-frozen) or while a thaw waits for the start (422), which this does not check |
| 400 | Problem as application/problem+json |
The revision is not a number, after is not a path in the config root, or limit is not a number from 1 to 1000. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A credential that may not read |
| 404 | Problem as application/problem+json |
The revision is not kept: no record of it, or its configuration is gone. The server keeps the 10 configurations before the one that runs |
| 422 | Problem as application/problem+json |
The refusal of a rollback to the revision, with the same type and fields: the row says failed, or its change was refused and the server could not write that, so the row still says staged (revision N failed, so a rollback cannot reach it), or the record names a file under a name that the walk of the config root skips, which an older build could write (Revision N was recorded with the file, whose file is generations/N/<path>) |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
A file does not match its record, the record of the running revision does not read, or the kept configurations could not be listed (storage) |
| 503 | Problem as application/problem+json |
Two comparisons run already and none ended within 5 seconds (busy-comparing), or the running revision changed and went while this one read it (unavailable). Try again. Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ "http://localhost/api/revisions/38/difference?limit=2"{ "files": [ { "change": "replaced", "file": "server.toml", "settings": [ { "restored": 2, "running": 4, "setting": "max_retries" }, { "running": [ "nas.example.com" ], "setting": "rebind_allow" } ] }, { "change": "replaced", "file": "zones/home-arpa/records.zone" } ], "next": "zones/home-arpa/records.zone", "revision": 38, "running": 43, "tag": "\"43.4f1c09a2be57d3e8106fa9c4d2b0e771\""}POST /api/revisions/{revision}/rollback
Section titled “POST /api/revisions/{revision}/rollback”Put an older revision’s content back, as a new revision.
The revisions that a rollback reaches are the rows of GET /api/revisions that read
restorable: a revision whose record and configuration are kept, that does not run, and whose
change did not fail. A row that says failed is refused, and so is a row whose refusal the
server could not write, which still says staged.
Role: operator or admin.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | revision |
integer | yes | The revision whose content to restore |
| header | if-match |
string | no | The ETag of a read of the configuration, as the read gave it, or a list of such tags. It names the revision and its record. A change written against a tag that does not run is refused with 409 |
| header | idempotency-key |
string | no | Names this change, so sending it again answers with the first outcome rather than applying it twice |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| Answer | Body | Means |
|---|---|---|
| 200 | Applied as application/json |
Applied, with the new revision it became |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role below admin whose change gives what an admin alone gives (needs-admin): private = true on a source, a url outside the catalog of known lists through the outbound proxy, or url fetches through a proxy that no list fetch of the revision that runs went through, that the revision that runs does not hold already. Its sources lists each source as id and grant, which is private, proxied or proxy. A role that is not allowed to make this change, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
A revision that moved or an If-Match that does not match (a tag of another record, as from before a restore, a revision alone, a weak tag, or an empty list), a change already refused, a key that names a change of the records of a zone, or a rollback that changes the files of a frozen primary zone (zone-frozen). A request with a key that was refused goes again with a new key, or with none |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 422 | Problem as application/problem+json |
The revision is not one to go back to (invalid-configuration), and the detail says why: revision N failed, so a rollback cannot reach it for a row that says failed, or that still says staged because the server could not write its refusal, revision N is already running, there is no revision N in the command log for a revision with no record, a revision that an older build recorded with a file under a name that the walk of the config root skips (Revision N was recorded with the file, whose file is generations/N/<path> and whose setting is generation), or a directory of its configuration that is gone or does not match its record. A rollback that changes a stub zone which holds the journal of a primary zone, or turns it into a primary, is refused too, its deletion first being the way out: this stub holds the journal of a primary zone, and this rollback changes it, whose file is the directory of the zone in the configuration root and whose setting is zones, whether or not that journal ends in a freeze. A rollback to a revision whose zone.toml turns record_expiry on is refused where the zone, with the changes of its journal, holds an expiry time at or before now (expiry-past-on, setting record_expiry, the records in detail), and while the clock gate does not trust the clock (invalid-configuration, the same setting). A rollback that turns the key off is never refused for its expiry times. A rollback to files whose every NS record of the apex has an expiry time, which a build before that rule took, is refused (apex-ns-expiry, setting zones, the file records.zone). The file names the directory of the revision, relative to the state root (generations/N) for a row that says failed, or the configuration root for one that runs, and for the first three the setting is payload. The refused rollback is a revision of its own, which says failed |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Recording the change failed, or reading the credential failed |
| 503 | Problem as application/problem+json |
Not settled inside the write timeout, and the outcome is unknown. Or the server is stopping (stopping): that change was refused and changed nothing, and the same change can be sent again once the server is back. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X POST --unix-socket $S -H "$A" \ http://localhost/api/revisions/4/rollback{ "command": "api:6c11a254b8879d46b4680d06", "revision": 5}Accounts
Section titled “Accounts”GET /api/accounts
Section titled “GET /api/accounts”Who has an account, and what each of them is allowed to do.
Role: admin, because who exists is not part of what a reader reads.
This takes no parameters and no body.
| Answer | Body | Means |
|---|---|---|
| 200 | array of AccountRow as application/json |
The accounts, by name |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to read this: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading or writing the store failed |
| 503 | Problem as application/problem+json |
A read of the accounts did not end within 3 seconds (accounts-busy) |
curl -s --unix-socket $S -H "$A" \ http://localhost/api/accounts[ { "can_log_in": true, "created_at": 1789137404, "id": "b470dfe3a6d01b92", "name": "alice", "role": "admin", "updated_at": 1789137404 }, { "can_log_in": false, "created_at": 1789137404, "display": "Bob Smith", "id": "7de6046c6554b95c", "name": "bob", "role": "operator", "updated_at": 1789137404 }]POST /api/accounts
Section titled “POST /api/accounts”Make an account.
Role: admin.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | display |
string | no | The name to show a person instead of the login name. At most 128 characters and no control characters. |
| body | name |
string | yes | The name to log in with: lower case letters, digits, and - _ ., at most 64 characters. Refused otherwise, so that one person cannot become two accounts. |
| body | role |
string | yes | admin, operator or viewer. Required: there is no safe one to assume. |
| Answer | Body | Means |
|---|---|---|
| 201 | AccountRow as application/json |
The account now exists, and has no password |
| 400 | Problem as application/problem+json |
The body is not JSON, or not an object. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change who exists, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
That name is taken |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 422 | Problem as application/problem+json |
A name or a role the server cannot use |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading or writing the store failed |
| 503 | Problem as application/problem+json |
The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X POST --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{"display":"Bob Smith","name":"bob","role":"operator"}' \ http://localhost/api/accounts{ "can_log_in": false, "created_at": 1789137404, "display": "Bob Smith", "id": "7de6046c6554b95c", "name": "bob", "role": "operator", "updated_at": 1789137404}GET /api/accounts/history
Section titled “GET /api/accounts/history”What was done to the accounts, and by whom.
Role: admin.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| query | before |
integer | no | List the changes with a smaller seq than this one. The next page takes the smallest seq of the page before. Absent, the page starts at the newest change. |
| query | limit |
integer | no | The most rows the page holds, from 1 to 1000, and 200 by default. |
| Answer | Body | Means |
|---|---|---|
| 200 | array of AccountChangeRow as application/json |
One page of the changes, newest first, in the order of the writes. An empty array is the end of the history |
| 400 | Problem as application/problem+json |
before is not a seq, or limit is not a number from 1 to 1000. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to read this: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading or writing the store failed |
| 503 | Problem as application/problem+json |
A read of the accounts did not end within 3 seconds (accounts-busy) |
curl -s --unix-socket $S -H "$A" \ "http://localhost/api/accounts/history?before=38&limit=200"[ { "account": "7de6046c6554b95c", "action": "password", "actor": "b470dfe3a6d01b92", "actor_name": "alice", "at": 1789137416, "name": "bob", "seq": 42 }, { "account": "7de6046c6554b95c", "action": "create", "actor": "b470dfe3a6d01b92", "actor_name": "alice", "at": 1789137404, "detail": "operator", "name": "bob", "seq": 41 }]DELETE /api/accounts/{account}
Section titled “DELETE /api/accounts/{account}”Remove an account, and everything that proves it.
Role: admin.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | account |
string | yes | The account’s identifier, which a rename does not move |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| Answer | Body | Means |
|---|---|---|
| 204 | none | The account, its tokens and its sessions are gone |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change who exists, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | Problem as application/problem+json |
No account with that identifier |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
The last administrator who can log in |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading or writing the store failed |
| 503 | Problem as application/problem+json |
A read of the accounts did not end within 3 seconds (accounts-busy). Or: The bodies in flight filled their budget for 5 seconds (busy). |
curl -s -X DELETE --unix-socket $S -H "$A" \ http://localhost/api/accounts/7de6046c6554b95cPATCH /api/accounts/{account}
Section titled “PATCH /api/accounts/{account}”Change an account’s role, its name, or the name shown for it.
Role: admin.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | account |
string | yes | The account’s identifier, which a rename does not move |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | display |
string | no | The name to show, at most 128 characters and no control characters. An empty string clears it. |
| body | name |
string | no | A new name: lower case letters, digits, and - _ ., at most 64 characters. The tokens and the sessions stay, because they hang off the identifier rather than the name. |
| body | role |
string | no | A new role: admin, operator or viewer. |
| Answer | Body | Means |
|---|---|---|
| 200 | AccountRow as application/json |
The account as it is now |
| 400 | Problem as application/problem+json |
The body is not JSON, or not an object. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change who exists, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | Problem as application/problem+json |
No account with that identifier |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
The new name is taken, or this is the last administrator |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 422 | Problem as application/problem+json |
A name or a role the server cannot use |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading or writing the store failed |
| 503 | Problem as application/problem+json |
A read of the accounts did not end within 3 seconds (accounts-busy). Or: The bodies in flight filled their budget for 5 seconds (busy). |
curl -s -X PATCH --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{"display":"Bob","role":"viewer"}' \ http://localhost/api/accounts/7de6046c6554b95c{ "can_log_in": true, "created_at": 1789137404, "display": "Bob", "id": "7de6046c6554b95c", "name": "bob", "role": "viewer", "updated_at": 1789137416}PUT /api/accounts/{account}/password
Section titled “PUT /api/accounts/{account}/password”Set your own password. An administrator can set anybody’s.
This is what makes an account somebody added able to log in. Changing your own takes the password being replaced, always, so a borrowed session cannot lock its owner out. An administrator setting somebody else’s does not, because they are not proving that they are that person.
Role: your own, whatever your role, or anybody’s with admin.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | account |
string | yes | Whose password, by the account’s identifier |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | current |
string | no | The password being replaced. Required for your own password, and ignored for an administrator setting somebody else’s. |
| body | password |
string | yes | The new password, at least 12 characters. |
| Answer | Body | Means |
|---|---|---|
| 204 | none | The password is changed and that account’s sessions are over |
| 400 | Problem as application/problem+json |
A body this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or the current password is wrong. No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 403 | Problem as application/problem+json |
Somebody else’s password, without the role for it, or a session cookie without its forgery token. A session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 404 | Problem as application/problem+json |
No account with that identifier |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 415 | Problem as application/problem+json |
The content type is not one this route takes. A JSON body needs application/json, and a configuration file is sent as text |
| 422 | Problem as application/problem+json |
A password too short to be one |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading or writing the store failed |
| 503 | Problem as application/problem+json |
Too many passwords are being checked at once. The check is deliberately slow, so a few run at a time. Or: A read of the accounts did not end within 3 seconds (accounts-busy). Or: The bodies in flight filled their budget for 5 seconds (busy). |
curl -s -X PUT --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{"password":"bob long passphrase"}' \ http://localhost/api/accounts/7de6046c6554b95c/passwordTokens
Section titled “Tokens”GET /api/tokens
Section titled “GET /api/tokens”The tokens that act for you.
Role: any role for your own, and admin to see everybody’s.
This takes no parameters and no body.
| Answer | Body | Means |
|---|---|---|
| 200 | array of TokenRow as application/json |
Your tokens, or every account’s for an administrator, newest first |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading or writing the store failed |
| 503 | Problem as application/problem+json |
A read of the accounts did not end within 3 seconds (accounts-busy) |
curl -s --unix-socket $S -H "$A" \ http://localhost/api/tokens[ { "account": "b470dfe3a6d01b92", "created_at": 1789137404, "id": "7a9282af6cc6", "label": "a dashboard" }]POST /api/tokens
Section titled “POST /api/tokens”Make a token that acts for you.
Role: any role. The token acts as you, so it carries your role.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | application/json |
NewToken |
no | A label, or no body at all for a token with none |
| Answer | Body | Means |
|---|---|---|
| 200 | Created as application/json |
The token, shown this once only |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 422 | Problem as application/problem+json |
A label longer than 200 characters |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Writing the token failed |
| 503 | Problem as application/problem+json |
The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X POST --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{"label":"a dashboard"}' \ http://localhost/api/tokens{ "id": "7a9282af6cc6", "token": "7a9282af6cc6.9c459c458bee553bf742646574ac3299e0d29315c25230cfbabc28950e8c0f3a"}DELETE /api/tokens/{token}
Section titled “DELETE /api/tokens/{token}”Revoke a token.
Role: your own, whatever your role, or anybody’s with admin.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | token |
string | yes | The token’s identifier, which is the part before the dot. Not the token itself |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| Answer | Body | Means |
|---|---|---|
| 204 | none | It is gone |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
Somebody else’s token, or a session cookie without its forgery token. A session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 404 | Problem as application/problem+json |
There is no such token |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading or writing the store failed |
| 503 | Problem as application/problem+json |
A read of the accounts did not end within 3 seconds (accounts-busy). Or: The bodies in flight filled their budget for 5 seconds (busy). |
curl -s -X DELETE --unix-socket $S -H "$A" \ http://localhost/api/tokens/7a9282af6cc6Query log
Section titled “Query log”GET /api/queries
Section titled “GET /api/queries”What was asked, and answered, between two moments, a page at a time.
A first read sends no cursor and gets the newest rows. Send the before of an answer for the
next older page, and its after to poll for the rows written since. Each row comes once
across the pages of one walk. A cursor carries no filter: change a filter, and an old cursor
reads the new filter from its place.
sort and order give another order, such as the slowest answers first with
sort=duration. A before walks on in the order it was made in, so send it back with the
same sort and order. An after reads the rows written since under any order.
Role: any role.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| query | from |
integer | no | From this moment, in milliseconds since the Unix epoch. Left out, it means the oldest row the log still holds. |
| query | to |
integer | no | To this moment, in milliseconds since the Unix epoch. Left out, there is no upper end, so a row of the current second, or one with an at ahead of the clock of this server, comes too. |
| query | client |
string | no | One client’s address. Leave it out for every client. |
| query | name |
string | no | One name, in any case: the log holds each name in lower case. Letters outside ASCII are refused: send the xn-- form of the name. With store_names off, a new row holds no name, and this does not find it. |
| query | subtree |
boolean | no | With name: true finds the names under it too, on a boundary of labels. false by default. Not without name, and not with the root. |
| query | name_contains |
string | no | Part of a name, in any case: the rows whose name holds this text. It is a plain substring with no wildcard, so % and _ are characters too. It matches the name as the log writes it: in lower case, with its last dot, and with a byte outside ASCII as its escape, such as \195. 1 to 255 characters from ! to ~: a rule of the search, so a name with many escapes can be longer. It combines with every other filter, and name and subtree work as before. With store_names off, a new row holds no name, and this does not find it. |
| query | qtype |
array of string | no | Record types by name, such as AAAA or TYPE65, or by number, separated by commas: any of them matches. 16 at most. |
| query | rcode |
array of string | no | Response codes by name, such as SERVFAIL or RCODE23, or by number up to 4095, separated by commas: any of them matches. 16 at most. |
| query | failure |
boolean | no | true finds the failed answers: a query, not blocked, with a code other than NOERROR and NXDOMAIN. false finds every other row. |
| query | source |
array of QuerySource |
no | Sources, separated by commas: any of them matches. cache, stale, synthesized, forwarded, recursed, local or blocked. 16 at most. |
| query | policy |
array of QueryPolicy |
no | Policies, separated by commas: any of them matches. applied, bypassed, disabled or group-off. 16 at most. |
| query | group |
string | no | One group, as client_group names it. A row of a build before that column has none, and neither has a new row written with store_clients off, so this does not find them. |
| query | client_name |
string | no | One client, as client_name names it. A new row written with store_clients off has none, so this does not find it. |
| query | limit |
integer | no | How many rows at most, in the order of sort and order, from 1 to 1000. A thousand by default. 0 reads as 1, and more than 1000 as 1000. The answer says the number it used in limit. |
| query | sort |
QuerySort |
no | What the rows are sorted by: time, when the query arrived, or duration, how long the answer took. time by default. Rows of equal duration are sorted by time, in the same direction. |
| query | order |
QueryOrder |
no | Which way the rows run: desc, the newest or the slowest first, or asc, the oldest or the fastest first. desc by default. |
| query | before |
string | no | Walk on to the next page, in the order of sort and order: the before of the answer before, sent back as it came. Newest first, that is the older rows. It holds the place that the walk reached and the newest row it can give, so a row written since is left to after, and each row comes once. A cursor of another sort or order is refused (bad-cursor). Not with after. |
| query | after |
string | no | Read the rows written since: the after of the answer before, sent back as it came. A row that the server wrote late comes here whatever its at. It reads under any sort and order, and its rows come in that order. Not with before. |
| Answer | Body | Means |
|---|---|---|
| 200 | Queries as application/json |
The rows, in the order of sort and order |
| 400 | Problem as application/problem+json |
A range, a filter, a sort or an order this cannot read, with what it takes, subtree without name or with the root, a name_contains that is empty, longer than 255 characters, or holds a space, a control character or a letter outside ASCII, a cursor that is not one of this server or is of another sort or order (bad-cursor), or both before and after. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 429 | Problem as application/problem+json |
This read got no place within 1 second (busy), with Retry-After: 1. Two reads at once hold a place: a read with no cursor that has any filter, or sort=duration; every read with before; and a read with after that has any filter, a from above 0, or a to below 9223372036854775807. A read with after, no filter, no from above 0 and no lower to takes no place in either sort. Too many failed attempts with this credential, or too many attempts at once: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 500 | Problem as application/problem+json |
Reading the query log failed |
| 503 | Problem as application/problem+json |
The query log is not running (unavailable), or it is still opening its database (query-log-starting). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ "http://localhost/api/queries?from=1789134000000&to=1789137600000&client=192.0.2.10&limit=100&before=v1.1789137500000.120.130"{ "after": "v1.130", "caught_up": true, "dropped_in_range": 0, "limit": 100, "order": "desc", "rows": [ { "answers": 2, "at": 1789137428125, "client": "192.0.2.10", "elapsed_us": 14213, "extended_errors": [], "id": 99, "kind": "query", "name": "example.com.", "policy": "applied", "qtype": 1, "rcode": 0, "source": "forwarded" } ], "sort": "time", "unreadable": 0}POST /api/queries/redact
Section titled “POST /api/queries/redact”Clear a column in the rows already written.
Turning a privacy setting off stops new rows carrying a value. This clears the rows that are already there. It is written down in the query log’s own record, because clearing a column is a thing somebody did.
First it measures what it can write, about the size of the rows of the log and of the index of
the column, and refuses with 507 no-room where the disk does not hold that: nothing is
cleared, and the detail names both figures.
A redaction of client keeps the counts of each hour first, by the privacy settings. Before
the query log has read them it answers 503 privacy-not-read, and clears and records nothing.
A running server reads them before it serves the API, so it does not send this answer: it is
a guard.
Role: operator or admin.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | column |
string | yes | Which column to clear: name or client. |
| body | purge |
boolean | no | Also drop the aggregates built from that column. Off by default. A cleared row and a kept top list leave the value readable in the list. Somebody asking for a value to be gone means the list too. A redaction of client, with or without purge, keeps the devices and transports counts of GET /api/stats/hourly. A count names no address, so the counts of an hour stay right. But on a network with one client of DNS over HTTPS, the https count of an hour still says when that machine asked, and how much. |
| Answer | Body | Means |
|---|---|---|
| 200 | Redacted as application/json |
The column is clear |
| 400 | Problem as application/problem+json |
A column this build does not know. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change anything, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading the query log failed |
| 503 | Problem as application/problem+json |
The query log is not running (unavailable), it is still opening its database (query-log-starting), or it has not read the privacy settings yet, which a redaction of client needs (privacy-not-read). That last one cleared nothing and recorded nothing. A running server reads the settings before it serves the API, so it does not send this answer: it is a guard. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
| 507 | Problem as application/problem+json |
Too little free space for what the redaction can write, on the disk of the query log or of its temporary files (no-room). Nothing was cleared, and the detail names both figures |
curl -s -X POST --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{"column":"client","purge":false}' \ http://localhost/api/queries/redact{ "column": "client", "rows": 2, "still_carried": 0}Statistics
Section titled “Statistics”GET /api/stats/hourly
Section titled “GET /api/stats/hourly”What happened, hour by hour.
From the buckets, which are kept for five years (1826 days) after the hour they count, so they
outlive the rows they were folded from. The hour that holds now, and the hour before it in
the minutes after it ended, are counted from the query log where the buckets do not hold all of
it yet, and counting marks them. One count of them answers every read of the statistics for
10 seconds, so they can be that far behind the log. Such an hour that the read did not count
answers what was folded of it, and behind marks it. An older hour answers what was folded of
it, or is absent, until the folding reaches it.
One answer holds 744 hours (31 days) at most, so its size has a bound. Ask for a longer
range in parts, and start each part at the start of the hour after the hour of the to of
the part before.
Role: any role.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| query | from |
integer | no | From this moment, in milliseconds since the Unix epoch. Left out, it means the 744 hours (31 days) that end with the hour of to. A range that holds more than 744 hours is refused. |
| query | to |
integer | no | To this moment, in milliseconds since the Unix epoch. The default is now. Both ends are inside, so the hour that starts at to, or holds it, is in the answer. The next part of a long range starts at the start of the hour after the hour of the last to. |
| Answer | Body | Means |
|---|---|---|
| 200 | array of Hour as application/json |
The hours, oldest first |
| 400 | Problem as application/problem+json |
A range this cannot read, or one that holds more than 744 hours (range-too-long). Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading the query log failed |
| 503 | Problem as application/problem+json |
The query log is not running (unavailable), or it is still opening its database (query-log-starting). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ "http://localhost/api/stats/hourly?from=1789134000000&to=1789137600000"[ { "authoritative": 40, "behind": false, "blocked": 0, "cached": 1201, "counting": false, "devices": 7, "failed": 3, "failures": 6, "forwarded": 590, "hour": 1789134000000, "kept": "all", "local": 44, "p50_us": 180, "p95_us": 14200, "p99_us": 31000, "qtypes": { "A": 1020, "AAAA": 690, "HTTPS": 110, "PTR": 21, "other": 1 }, "queries": 1842, "rcodes": { "NOERROR": 1700, "NXDOMAIN": 136, "REFUSED": 3, "SERVFAIL": 3 }, "recursed": 0, "stale": 2, "synthesized": 5, "transports": { "h3": 12, "https": 48, "quic": 0, "tcp": 12, "tls": 160, "udp": 1610 } }]GET /api/stats/latency
Section titled “GET /api/stats/latency”How long the answers of a range of hours took: the 50th, 95th and 99th percentiles.
Each figure is the band of time that holds it. Each hour keeps how many of its answers took
each band of time, in 42 bands: under 0.1 ms, eight bands a decade up to 10 s, and 10 s or
more. The bands of the hours add up, so the exact percentile of the same answers is inside the
band of the answer. Two edges next to each other differ by at most 34 %. The exact percentiles
of each hour stay in GET /api/stats/hourly.
Any range of hours, with no bound: the answer has one size. Hours that an older build counted
keep no bands, and are left out: answers against queries says so, and since names the
oldest hour that keeps them. The hour that holds now is counted as on GET /api/stats/hourly.
Role: any role.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| query | from |
integer | no | From this moment, in milliseconds since the Unix epoch. Left out, it means every hour that the buckets still hold. There is no bound of hours. |
| query | to |
integer | no | To this moment, in milliseconds since the Unix epoch. The default is now. Both ends are inside, so the hour that starts at to, or holds it, is in the answer. |
| Answer | Body | Means |
|---|---|---|
| 200 | Latency as application/json |
The band of each percentile, and the answers that they count |
| 400 | Problem as application/problem+json |
A range this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading the query log failed |
| 503 | Problem as application/problem+json |
The query log is not running (unavailable), or it is still opening its database (query-log-starting). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ "http://localhost/api/stats/latency?from=1789134000000&to=1789137600000"{ "answers": 51234, "behind": false, "counting": true, "p50": { "from_us": 0, "to_us": 100 }, "p95": { "from_us": 31600, "to_us": 42200 }, "p99": { "from_us": 10000000 }, "queries": 51300, "since": 1789134000000}GET /api/stats/top
Section titled “GET /api/stats/top”The busiest names or clients across a range.
From the lists of the hours. The hour that holds now, and the hour before it in the minutes
after it ended, come from the query log where the lists do not hold all of it yet, up to 10
seconds behind it, as GET /api/stats/hourly counts them. With store_names or
store_clients off, such an hour keeps the list that the last fold left, and other takes its
new questions.
names_since says how far back the lists name anything. The oldest hours lose their lists
first, to the share of retention_mib that the lists may take, and keep their counts.
names_missing says whether a later hour with questions names nothing.
Role: any role.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| query | kind |
TopKind |
no | Which list: domains for the names asked for, clients for the addresses that asked. domains by default. |
| query | from |
integer | no | From this moment, in milliseconds since the Unix epoch. Left out, it means every hour the buckets still hold. |
| query | to |
integer | no | To this moment, in milliseconds since the Unix epoch. The default is now. |
| query | limit |
integer | no | How many at most, and a thousand at the very most. A hundred by default, and everything the list leaves out is summed into one other row. |
| Answer | Body | Means |
|---|---|---|
| 200 | TopList as application/json |
The busiest first, and how far back the list names them |
| 400 | Problem as application/problem+json |
A kind or a range this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading the query log failed |
| 503 | Problem as application/problem+json |
The query log is not running (unavailable), or it is still opening its database (query-log-starting). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ "http://localhost/api/stats/top?kind=domains&from=1789134000000&to=1789137600000&limit=20"{ "kept": "one_in", "names_missing": false, "names_since": 1789134000000, "one_in": 10, "ranks": [ { "blocked": 0, "key": "example.com.", "queries": 412 }, { "blocked": 0, "key": "other", "queries": 118 } ]}GET /api/stats/top-blocked
Section titled “GET /api/stats/top-blocked”The names with the most blocked questions across a range.
Ranked by the blocked questions, so a name that is blocked often and asked less than the
busiest names is here, and in the other row of GET /api/stats/top. The hour that holds
now, and the hour before it in the minutes after it ended, come from the query log where the
lists do not hold all of it yet, as on GET /api/stats/top. exact says whether the list is
the whole truth, and names_since how far back it names anything. names_missing says
whether a later hour with blocked questions names nothing.
Role: any role.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| query | from |
integer | no | From this moment, in milliseconds since the Unix epoch. Left out, it means every hour the buckets still hold. |
| query | to |
integer | no | To this moment, in milliseconds since the Unix epoch. The default is now. |
| query | limit |
integer | no | How many names at most, and a thousand at the very most. A hundred by default, and the blocked questions the list leaves out are summed into one other row. |
| Answer | Body | Means |
|---|---|---|
| 200 | TopBlocked as application/json |
The most blocked first, and whether the list is exact |
| 400 | Problem as application/problem+json |
A range or a limit this cannot read. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading the query log failed |
| 503 | Problem as application/problem+json |
The query log is not running (unavailable), or it is still opening its database (query-log-starting). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ "http://localhost/api/stats/top-blocked?from=1789134000000&to=1789137600000&limit=20"{ "exact": false, "kept": "one_in", "names": [ { "blocked": 412, "key": "ads.example." }, { "blocked": 18, "key": "other" } ], "names_missing": false, "names_since": 1789134000000, "one_in": 10}GET /api/cache
Section titled “GET /api/cache”What the cache holds at one name, and which labels below it hold something.
A reader’s credentials, because the cache holds the same kind of fact as the query log: which names this network asked. A name the cache holds nothing at answers 200 with empty lists.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| query | name |
string | no | The name to look at, in ASCII. An internationalized name is sent as its A-label. The root, ., by default. |
| query | limit |
integer | no | The most labels below lists, from 1 to 1000, and 100 by default. |
| query | after |
string | no | List the labels after this one, which is the more of the page before. |
| Answer | Body | Means |
|---|---|---|
| 200 | CacheView as application/json |
What the cache holds at the name |
| 400 | Problem as application/problem+json |
name is not a name, after is not a label, or limit is outside 1 to 1000. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or credentials this server does not accept: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 429 | Problem as application/problem+json |
Another browse is running. The answer carries Retry-After: 1. Too many failed attempts with this credential, or too many attempts at once: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 503 | Problem as application/problem+json |
Nothing answers cache requests, or the browse outlasted the wait. Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ "http://localhost/api/cache?name=example.com&limit=100&after=www"POST /api/cache/flush
Section titled “POST /api/cache/flush”Remove entries from the cache: at one name, at a name and every name below it, or everything.
Runtime state rather than configuration: nothing replays it and nothing replicates it, and a
second flush of one name leaves what the first left. So it takes no If-Match and no
Idempotency-Key. Each name above the one flushed also loses what answers it from above: a
denial of a whole name, a DNAME, and the closest zone cut unless that is the root’s. The answer
counts what went. The record of a flush is a log line with the caller and the counts.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| body | all |
boolean | no | true to flush everything. |
| body | below |
boolean | no | With name, flush every name below it as well. false by default. |
| body | name |
string | no | The name to flush, in ASCII. |
| Answer | Body | Means |
|---|---|---|
| 200 | CacheFlushed as application/json |
The flush ran, and the answer counts what it removed |
| 400 | Problem as application/problem+json |
No body, or a body that is not JSON. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or credentials this server does not accept: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A caller whose role does not include this: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 415 | Problem as application/problem+json |
The content type is not one this route takes. A JSON body needs application/json |
| 422 | Problem as application/problem+json |
An unknown field, name and all together, neither, all: false, below with all, or a bad name |
| 429 | Problem as application/problem+json |
Another flush is running. The answer carries Retry-After: 1. Too many failed attempts with this credential, or too many attempts at once: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 500 | Problem as application/problem+json |
The memory is flushed, and the snapshot on disk can still hold what went, so the next start can load it again |
| 503 | Problem as application/problem+json |
Nothing answers cache requests, or the flush outlasted the wait and its outcome is unknown. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X POST --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{"below":true,"name":"example.com"}' \ http://localhost/api/cache/flush{ "flushed": { "answers": 3, "delegations": 1, "links": 2, "spans": 1, "tailored": 1 }}DNS client
Section titled “DNS client”POST /api/dns-client
Section titled “POST /api/dns-client”Ask one DNS server one question, as an operator.
The role is operator or admin, and a session sends its forgery token. The word of the kernel
on the socket proves nobody here, so the socket needs a token too. The body is the
question and the server alone, 16 KiB at most. A server can be an address, an entry in the form
of forwarders, or a host name, which this server looks up and pins to one address.
One query runs at a time for the whole server, and 60 run in any minute. Where server names
addresses and the rule refuses each of them, such as a loopback or link-local address other than
a DNS listener of this server, the answer is 422 target-refused, and the query counts nothing.
A host name is looked up after the server took the query, so a host name whose every address the
rule refuses answers 200 with the outcome refused, and counts in the 60. The limits do not
stop a slow scan of a private network, and they cannot see where a network translates an
address: the manual page manual/server/dns-client.md says what they do not do.
The answer is 200 whatever the server answered. outcome says how the query ended, and each
attempt says how it ended. The words of outcome and of an attempt are the set of this version:
a later version can add one, so a client shows a word it does not know as another outcome. Each
record of the message that a zone can hold has a zone_line for POST /api/zones/{id}/records.
A refusal of a field is 422 unusable-query, and its setting names the field. No refusal, no
Debug and no line of the log holds the text of server. The 200 answer does show parts of it
as the caller wrote them: the host name, the name of the certificate and the path of a DoH
server. A path can hold a token, so a client that keeps or logs the answer treats server of
the answer as it treats what it sent.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated request and ignored for a bearer token |
| body | checking_disabled |
boolean | no | The CD bit, false by default. |
| body | class |
string | no | IN, the default, or CH. |
| body | dnssec |
boolean | no | The DO bit of the OPT record, false by default. It needs edns. |
| body | edns |
boolean | no | Whether the query carries an OPT record, true by default. |
| body | name |
string | yes | The name, in ASCII. An internationalized name is sent as its A-label. |
| body | payload_size |
integer | no | The payload size of the OPT record, 512 to 4096, 1232 by default. It needs edns. |
| body | recursion |
boolean | no | The RD bit, true by default. |
| body | server |
string | yes | The server: an address with a port or without, an entry of forwarders that starts with tcp://, tls://, https://, quic:// or h3://, or a host name, alone or after a scheme. |
| body | tcp_after_truncation |
boolean | no | Whether a UDP reply with TC is asked again over TCP, true by default. |
| body | timeout_ms |
integer | no | The time of one attempt in milliseconds, 100 to 5000, 3000 by default. |
| body | transport |
string | no | udp, tcp, tls, https, quic or h3. udp by default, or the transport of the scheme of server, which it must agree with. |
| body | type |
string | no | A type by its name, as TYPE and its number, or by its number alone. A by default. AXFR, IXFR, OPT, TKEY, TSIG, MAILA and MAILB are refused. |
| Answer | Body | Means |
|---|---|---|
| 200 | DnsClientReply as application/json |
The query was asked, whatever the server answered. outcome says how it ended |
| 400 | Problem as application/problem+json |
The body does not read as JSON (unreadable-body). Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to make this change, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 415 | Problem as application/problem+json |
The body is not application/json (wrong-content-type) |
| 422 | Problem as application/problem+json |
The body is not an object of the fields of a query, or names a field that a query does not take (unreadable-body). A field that the checks refuse (unusable-query), whose setting names the field. The rule of the target refuses every address that server names (target-refused, with setting server): nothing was sent, and nothing counts in the limit. A host name whose every address the rule refuses is not this answer: it answers 200 with the outcome refused, and counts |
| 429 | Problem as application/problem+json |
Another query of the DNS client is running (dns-client-busy, with Retry-After: 1). The DNS client took 60 queries in the last minute (dns-client-rate, with Retry-After in seconds). Too many failed attempts with this credential, or too many attempts at once: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 503 | Problem as application/problem+json |
Nothing answers the DNS client, the task of the query failed or did not take it within 1 second, the query did not answer by its deadline, or the conversion of its reply failed (dns-client-unavailable). Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X POST --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{"name":"www.example.com","server":"tls://dns.example (192.0.2.53)","type":"AAAA"}' \ http://localhost/api/dns-clientBlocking
Section titled “Blocking”GET /api/blocking/catalog
Section titled “GET /api/blocking/catalog”The known blocklists, in the order that the console shows them.
Role: any role, as the other reads of the blocklists. The table is fixed by the release, and
source is the only field that reads the running revision. The socket proves nobody here.
This takes no parameters and no body.
| Answer | Body | Means |
|---|---|---|
| 200 | array of CatalogEntry as application/json |
Every known list, in the order of the table. source names the first source of the running revision with the same address, and is absent where none has it. The scheme and the host count without case, the rest of the address byte for byte. names is an estimate of the date as_of |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or credentials this server does not accept: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential, or too many attempts at once: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Reading the store failed |
| 503 | Problem as application/problem+json |
A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ http://localhost/api/blocking/catalog[ { "action": "block", "as_of": "2026-09-15", "format": "auto", "homepage": "https://github.com/hagezi/dns-blocklists", "id": "hagezi-pro", "license": "GPL-3.0-only", "names": 224572, "publisher": "HaGeZi", "source": "hagezi-pro", "subtree": true, "title": "HaGeZi's Multi PRO - extended protection (recommended)", "topic": "ads", "url": "https://cdn.jsdelivr.net/gh/hagezi/dns-blocklists@latest/wildcard/pro-onlydomains.txt" }]GET /api/blocking/export
Section titled “GET /api/blocking/export”The names of the allow or the block list of the revision that runs, as a file.
The file that tadoru blocklist export writes: one name a line, sorted, and the note of a name
as # lines above it. Only the operator’s own entries of that list: the names of a source,
the patterns of [[regex]] and the other list are not in it. The text and the tag name one
revision, the one that runs, and not an edit of the config root that waits. An empty list is
empty text. The import of this file into the same list adds nothing, and a note does not come
back with it.
Role: any. No socket: the offline tadoru blocklist export reads the config root.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| query | list |
ExportList |
yes | allow or block. |
| Answer | Body | Means |
|---|---|---|
| 200 | string as text/plain; charset=utf-8 |
The names of the list, one a line, sorted, with the note of each name as # lines above it. Carries etag. |
| 400 | Problem as application/problem+json |
No list, a word that is not allow or block, or another query key. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential, or too many attempts at once: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 503 | Problem as application/problem+json |
A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ "http://localhost/api/blocking/export?list=block""# the banner of the news site\nads.example.com\ntracker.example.net\n"POST /api/blocking/import
Section titled “POST /api/blocking/import”Import a file of names into the allow or the block list of blocking.toml, or a file of
patterns into its [[regex]] entries, as one revision.
The file is read as tadoru blocklist import reads it: plain names, *.name lines and hosts
lines for allow and block, and one pattern a line with ;querytype=, ;reply= and
;invert for regex. A comment and a blank line are skipped. All or nothing: one line that
the import cannot take refuses the whole file, and the refusal names the line. What the file
holds is added to what the list holds, and a name or a rule that is there already is counted,
not added. The import is checked against blocking.toml of the revision that runs, and written
against that revision, so a change in between is a 409. A file that adds nothing, sent with no
key, changes nothing. With a key it makes a revision of its own with the same blocking.toml,
so a retry of the key gets that answer. A key sent again with another file or another into is
another import. The body is read whatever its Content-Type says.
Role: operator or admin, or the server’s own uid or root on the socket.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| query | into |
ImportInto |
yes | allow or block for a file of names, regex for a file of patterns. |
| header | if-match |
string | no | The ETag of a read of the configuration, as the read gave it, or a list of such tags. An import written against a tag that does not run is refused with 409, before the file is read |
| header | idempotency-key |
string | no | Names this import, by the file and into, so sending it again answers with the first outcome rather than importing twice. The same key with another file or another into is another import |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | text/plain |
string | yes | The file, up to 4 MiB, the bound of blocking.toml: one name or one pattern a line. Any content type is taken, so curl --data-binary @names.txt works. A line that is not UTF-8 is refused as that line |
| Answer | Body | Means |
|---|---|---|
| 200 | ListImported as application/json |
Imported, with the revision it became and the counts. A keyed repeat gets revision and command of its first try and repeat: true, with no counts, whatever runs now. A file that adds nothing, sent with no key, answers unchanged: true with the revision that runs, and no command |
| 400 | Problem as application/problem+json |
No into, a word that is not allow, block or regex, another query key, an empty or unreadable Idempotency-Key, or an If-Match this cannot read. Nothing is recorded, with a key too. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows, and not the server’s own uid or root on the socket: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to make this change, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
An If-Match that does not name the revision that runs, or a revision that moved between the read of blocking.toml and the write (stale-revision): nothing was imported, so read again and send it again. Or the first try of the key was refused (already-refused), with its words: send it again with a new key, or with none. A request with a key keeps its first refusal, the 409 of an If-Match and each 422 included. A revision that moved is not kept, so the same request with the same key reads the new revision and can land |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 4 MiB (body-too-large). |
| 422 | Problem as application/problem+json |
A line of the file that the import cannot take, or a file that holds no name or no rule (invalid-import), with line where one line is at fault. A pattern file of more than 200 different rules is refused at the 201st, as a line. A ;reply=IP rule where blocking.toml names no block_v4 or block_v6 is invalid-import too, with its line and file blocking.toml. A list that would pass its bound, 10,000 names in one list or 200 patterns, with what it holds already (too-many-entries): a file of names is read up to the name past the bound, and refused there. Or blocking.toml with the import would not be valid (invalid-configuration), with file and setting |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential, or too many attempts at once: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
blocking.toml of the revision that runs could not be read, or a thread of the import before the write did not end: nothing was submitted (storage, internal). Or the thread of the write, or of the record of a refusal, did not end: the answer names the command, whose outcome is not known, so send it again with the same key, or look for the command in GET /api/revisions |
| 503 | Problem as application/problem+json |
The import ran out of time with nothing of it recorded (out-of-time), which is safe to send again. Too many changes wait (too-many-changes), with nothing submitted. The ledger did not answer for the key in time (ledger-unread): an earlier try may have landed, so send it again with the same key. The change did not settle in time (still-writing): its outcome is not known, and the answer names the command, so send it again with the same key, or look for it in GET /api/revisions. Or the server is stopping (stopping), and nothing changed. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X POST --unix-socket $S -H "$A" \ -H 'content-type: text/plain' \ --data-binary $'ads.example.com\n0.0.0.0 tracker.example.net\n' \ "http://localhost/api/blocking/import?into=block"{ "added": 2, "already": 1, "command": "api:0be1c0a7de54b18e2b7ac641", "revision": 9}POST /api/blocking/refresh
Section titled “POST /api/blocking/refresh”Read every source now, one after the other, whatever their intervals say.
One pass at a time, so a refresh asked for while any other pass runs is refused rather than queued. It takes no credential from the socket’s own uid, because no command of the command line asks for it.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| Answer | Body | Means |
|---|---|---|
| 200 | RefreshAll as application/json |
The run went over every source, and this is what each pass did |
| 202 | Problem as application/problem+json |
The run is taking longer than this request waits (pass-running). This request started it, and it carries on |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to make this change, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
A pass is already running, so this request started nothing (pass-running) |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential, or too many attempts at once: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
A pass inside the run panicked (pass-failed). The sources before it keep what their passes did |
| 503 | Problem as application/problem+json |
Nothing keeps the lists current, so there is nothing to refresh (blocking-not-running). Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X POST --unix-socket $S -H "$A" \ http://localhost/api/blocking/refresh{ "sources": [ { "attempt": { "at": 1789137416, "declared_expiry": 480, "state": "read", "stored": true, "succeeded_at": 1789137416 }, "id": "hagezi-pro", "outcome": "ran", "report": { "action": "block", "id": "hagezi-pro", "interval_minutes": 480, "last_attempt": { "at": 1789137416, "declared_expiry": 480, "state": "read", "stored": true, "succeeded_at": 1789137416 }, "next_at": 1789166216, "origin": "https://cdn.jsdelivr.net/gh/hagezi/dns-blocklists@latest/wildcard/pro-onlydomains.txt", "state": "ok", "uploaded": false } }, { "id": "old-list", "outcome": "removed" } ]}GET /api/blocking/search
Section titled “GET /api/blocking/search”What the blocking test does with one name for one client: which rule decides, in which list, for which group, and the other rules that cover the name.
A reader’s credentials. The socket’s word counts for nothing here. It writes nothing: no counter, no log row, no switch.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| query | name |
string | yes | The name, in ASCII, and required. An internationalized name is sent as its A-label. |
| query | client |
string | no | An address, which picks the client as a query from it does: its exact addresses, then its subnets, and not an arrived_on selector. An IPv4 address written as IPv6 (::ffff:192.0.2.1) reads as plain IPv4, as on the query path, so it picks the client whose selector names 192.0.2.1. clients.toml refuses a selector in the ::ffff: form, so none names it that way. The compatible form ::192.0.2.1, a zone id and a port are refused. Give this or client_name, not both. |
| query | client_name |
string | no | A client of clients.toml, or default. It has no address, so bypass is not tested. |
| query | qtype |
string | no | A type by name, as TYPE and its number, or by number: A by default. Any type from 0 to 65535 is read, a transfer type too. A pattern rule reads it. |
| Answer | Body | Means |
|---|---|---|
| 200 | Search as application/json |
What the blocking test does with the name for this client |
| 400 | Problem as application/problem+json |
A parameter that this cannot read, or both or neither of client and client_name (bad-request). Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | Problem as application/problem+json |
client_name names no client of the running revision (no-client) |
| 429 | Problem as application/problem+json |
Another search is running (search-busy). The answer carries Retry-After: 1. Too many failed attempts with this credential, or too many attempts at once: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 503 | Problem as application/problem+json |
Nothing answers searches, the search failed, or it did not answer in time (search-unavailable). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ "http://localhost/api/blocking/search?name=ads.example.com&client=192.0.2.10&qtype=AAAA"GET /api/blocking/sources
Section titled “GET /api/blocking/sources”What every blocklist source is doing.
The answer to “why is this list not blocking”, in one read. It comes from the two pointers the
refresh task publishes and the running configuration, so the report itself reads no file: the
credential a caller sends is read from auth.sqlite the same as on every other route.
This takes no parameters and no body.
| Answer | Body | Means |
|---|---|---|
| 200 | array of SourceReport as application/json |
Every source the configuration names |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or credentials this server does not accept: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential, or too many attempts at once: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 503 | Problem as application/problem+json |
Nothing keeps the lists current, so there is nothing to report. Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ http://localhost/api/blocking/sources[ { "action": "block", "id": "hagezi-pro", "interval_minutes": 480, "last_attempt": { "at": 1789137416, "declared_expiry": 480, "state": "read", "succeeded_at": 1789137416 }, "next_at": 1789166216, "origin": "https://cdn.jsdelivr.net/gh/hagezi/dns-blocklists@latest/wildcard/pro-onlydomains.txt", "serving": { "bytes": 5187248, "counts": { "candidates": 224572, "duplicates": 0, "ignored": 13, "invalid": 0, "lines": 224585, "unsupported": 0 }, "fetched_at": 1789137416, "rules": 224572 }, "state": "ok", "uploaded": false }]POST /api/blocking/sources/{id}/accept
Section titled “POST /api/blocking/sources/{id}/accept”Serve the body a gate refused, because an operator looked at it and decided.
The body is the one the record named, by its checksum. A publisher who changed their file between
the operator reading that number and this fetch gets the ordinary gates instead: what was accepted
was that body and not that address (blocklist::gate::Refusal::Changed).
The four gates about content are not asked again, because the operator answered them. The two about bytes stay: they are what this machine can hold and read back.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | id |
string | yes | The id the configuration gave the source |
| body | checksum |
string | yes | The checksum the record shows for the refused body, as 64 hexadecimal characters. Required rather than convenient. It names one body rather than “whatever arrives next”, so an accept cannot become a habit that turns the gate off, and a sweep that refused a different body in the meantime is a refusal rather than a body nobody looked at. |
| Answer | Body | Means |
|---|---|---|
| 200 | SourceReport as application/json |
The pass ran, and this is the source afterwards |
| 202 | Problem as application/json |
The pass is taking longer than this request waits, and carries on |
| 400 | Problem as application/problem+json |
No checksum, or text that is not one. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or credentials this server does not accept: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A caller whose role does not include this: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | Problem as application/json |
The running configuration names no such source |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/json |
A pass is running, nothing was refused, the refused body is another one, or the configuration moved |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential, or too many attempts at once: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/json |
The pass ended without an answer |
| 503 | Problem as application/problem+json |
Nothing keeps the lists current, so there is nothing to accept. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X POST --unix-socket $S -H "$A" \ http://localhost/api/blocking/sources/{id}/acceptDELETE /api/blocking/sources/{id}/list
Section titled “DELETE /api/blocking/sources/{id}/list”Delete the list file of source id, and the source where it reads it, in one revision.
The source must read blocklists/<id>.txt, the place of an upload, and no other source may read
it. A file at that place that no source reads, which a PATCH that removed its source left, goes
alone. A source whose file the revision does not hold goes alone. A group of clients.toml that
names the source refuses the delete with the words of the check of the configuration. The
command is named by the id alone, so a repeat of its key gets the first answer, whatever the
revision holds by then. A revision that moved between the read of the route and the write is
409, and nothing is deleted.
Role: operator or admin. No socket.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | id |
string | yes | The id of the source: lower case letters, digits and hyphens, 40 bytes at most |
| header | if-match |
string | no | The ETag of a read of the configuration or of the list, as the read gave it, or a list of such tags. It names the revision and its record. A delete written against a tag that does not run is refused with 409 |
| header | idempotency-key |
string | no | Names this delete, so sending it again answers with the first outcome rather than deleting twice |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| Answer | Body | Means |
|---|---|---|
| 200 | Applied as application/json |
Deleted, with the revision it became. A repeat of a request with its key gets the answer of its first try |
| 400 | Problem as application/problem+json |
An If-Match or an Idempotency-Key that this cannot read. Nothing is recorded. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change the configuration, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | Problem as application/problem+json |
The id is not an id a source can have, or the revision names no source with it and holds no file at blocklists/<id>.txt (not-found) |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/problem+json |
The source reads a URL or another path (source-not-uploaded), another source reads the file (list-shared), the revision that the delete read no longer runs or an If-Match that does not match (stale-revision), or a delete already refused by its key (already-refused). A request with a key keeps its first refusal, so it goes again with a new key, or with none |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 422 | Problem as application/problem+json |
The configuration without the source would not be valid, such as a group of clients.toml that names it in sources |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
Recording the change failed, the files of the revision could not be listed, or a task of the delete did not end. Where the answer names the command, its outcome is not known: send it again with the same key |
| 503 | Problem as application/problem+json |
The delete did not settle inside the write timeout (still-writing), with its command, the server is stopping, too many changes wait (too-many-changes), the delete ran out of time with nothing of it recorded (out-of-time), or the ledger did not answer for its key in time (ledger-unread). Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X DELETE --unix-socket $S -H "$A" \ http://localhost/api/blocking/sources/{id}/list{ "command": "api:6c2f80d1a94e37b5f0e2c8a1", "revision": 14}GET /api/blocking/sources/{id}/list
Section titled “GET /api/blocking/sources/{id}/list”Give the list file of source id, as the running revision holds it.
A source with a path gives the bytes of its file in the generation of the running revision,
at its path with each ./ step taken out. They are text/plain; charset=utf-8 where they are
UTF-8 and application/octet-stream where they are not, and never converted. The ETag names
the revision, so the answer can go back as the If-Match of the delete. A file larger than 1 MiB
takes the one place of the large bodies while its bytes are in flight. The body has 120 seconds
to reach the client from the moment it is ready, and ends with an error after them.
Role: any role. No socket.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | id |
string | yes | The id of the source: lower case letters, digits and hyphens, 40 bytes at most |
| Answer | Body | Means |
|---|---|---|
| 200 | string as application/octet-stream |
The list file, byte for byte as the running revision holds it: text/plain; charset=utf-8 where it is UTF-8, and application/octet-stream where it is not. Carries etag. |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | Problem as application/problem+json |
The id is not an id a source can have, the running revision names no source with it, or the revision holds no file at the path of the source (not-found). The detail says which |
| 409 | Problem as application/problem+json |
The source reads a URL, so it has no list file (no-list-file). Or the revision that the read named stopped running and its files went before they were read (stale-revision): read again |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
The file of the running revision does not read as its record says (storage), or the read did not end (internal) |
| 503 | Problem as application/problem+json |
Another large body or answer held the one place of the large bodies for 1 second (busy), which a file larger than 1 MiB takes, or the read did not end within 10 seconds (out-of-time). Send it again. Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ http://localhost/api/blocking/sources/{id}/listPUT /api/blocking/sources/{id}/list
Section titled “PUT /api/blocking/sources/{id}/list”Upload the text of a list as the list file of source id, blocklists/<id>.txt, in one
revision with its [[source]].
Where the configuration names no source id, the upload adds one at the end of the source
array, reading the file. Where it names one that reads the file, the upload writes the new
version, and with action it changes the action of the source too. The text is checked as the
pass reads it first, so a list that the pass refuses is refused here, before a revision. A list
that holds less than the source asks for, of the list that serves or else of the copy on disk,
is 409 list-shrinks, with its checksum. The same request with accept=<checksum> lands the
file, with every other gate, and runs the pass that takes it, held to the revision of the
upload: accepted says whether it published the list, and 202 with pass_running says that
it still runs. Where another pass held the lists until the deadline, or nothing keeps the lists
current, no pass starts, and accepted is false: the pass that the revision wakes refuses the
list as smaller, and POST /api/blocking/sources/{id}/accept with the checksum of
last_attempt.refused takes it. The same text and source as they run, with no key, change
nothing, and with accept they run the pass that takes it. A change of the source array
writes each [[source]] block again, as a PATCH of source does, so the comment lines inside
the blocks go. The body is read as UTF-8 text, whatever its Content-Type says.
Role: operator or admin. No socket.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | id |
string | yes | The id of the source: lower case letters, digits and hyphens, 40 bytes at most |
| query | action |
UploadAction |
no | block or allow. Left out, a new source blocks its names, and a source that exists keeps its action. |
| query | accept |
string | no | The checksum of this list as list-shrinks gave it, 64 hexadecimal digits, to land a list that holds less of the list before than the source asks for, and to run the pass that takes it. Another checksum is 422 accept-mismatch. |
| header | if-match |
string | no | The ETag of a read of the configuration, as the read gave it, or a list of such tags. A change written against a tag that does not run is refused with 409, before the list is checked |
| header | idempotency-key |
string | no | Names this upload, by the id, the text and the query, so sending it again answers with the first outcome rather than applying it twice |
| header | x-csrf-token |
string | no | The forgery token from the session, required for a cookie-authenticated change and ignored for a bearer token |
| body | text/plain |
string | yes | The text of the list, up to 16 MiB: names, hosts lines or Adblock rules, one a line. It is read as UTF-8 text, whatever the Content-Type says, so curl --data-binary @list.txt works. The body has to arrive within 10 seconds of the head, and the whole upload answers within 20 seconds of it |
| Answer | Body | Means |
|---|---|---|
| 200 | ListUploaded as application/json |
Uploaded, with the revision it became. A keyed repeat gets revision, command and source of its first try and repeat: true. The same text and the same source as they run, sent with no key, change nothing and answer unchanged: true, with accept too. A 200 confirms the revision: the pass that it wakes reads the list, and GET /api/blocking/sources says what it did. With accept, accepted says whether the pass that takes the list published it |
| 202 | ListUploaded as application/json |
With accept: the revision landed, or runs this text already (unchanged: true), and the pass that takes the list still runs at the answer (pass_running: true). It ends after the answer, and GET /api/blocking/sources says whether it published |
| 400 | Problem as application/problem+json |
A body that is not UTF-8 (unreadable-body), a query this route does not take, an accept that is not a checksum, or a header this cannot read. Nothing is recorded, with a key too. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to change the configuration, or a session cookie without its forgery token: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | Problem as application/problem+json |
The id is not one a source can have |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | ListShrinks or Problem as application/problem+json |
The list holds less of the list that serves than the source asks for (list-shrinks), with the numbers of the gate and checksum: the same request with accept=<checksum> lands it and runs the pass that takes it. The source of the id reads its list from somewhere else (source-not-uploaded), another source reads blocklists/<id>.txt (list-shared), or a revision that moved or an If-Match that does not match (stale-revision). A request with a key keeps its first refusal, the 409 and 422 of the checks of this route included, and a retry answers already-refused with its words, so send it again with a new key, or with none, to read its numbers |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 MiB (body-too-large). |
| 422 | ListUnusable or Problem as application/problem+json |
A gate refuses the list (list-unusable), with the gate and its numbers. Or the configuration with the upload would not be valid, such as a 65th source (invalid-configuration), a problem with no gate. Or accept names another checksum than the one of the list (accept-mismatch) |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential. It is a fixed window per credential, and the answer says how long to wait: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/problem+json |
The files of the revision could not be listed, or a thread of the upload before the write did not end, and nothing was submitted. Or the thread of the write or of the record of a refusal did not end: the answer names the command, whose outcome is not known, so send it again with the same key, or look for the command in GET /api/revisions |
| 503 | Problem as application/problem+json |
The upload ran out of time with nothing of it recorded (out-of-time), which is safe to send again. The change did not settle in time (still-writing), so send it again with the same key. The ledger did not answer for the key in time (ledger-unread). Or too many changes wait (too-many-changes). Or: The bodies in flight filled their budget for 5 seconds (busy). Or: Another large body or answer, an upload of a list, the import of a zone or the read of a list file, held the one place of the large bodies for 1 second, and nothing of this one was read (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X PUT --unix-socket $S -H "$A" \ -H 'content-type: text/plain' \ --data-binary $'ads.example.com\ntracker.example.net\n' \ http://localhost/api/blocking/sources/{id}/list{ "command": "api:4be1c0a7de54b18e2b7ac641", "counts": { "cancelled": 0, "cancels_unmatched": 0, "candidates": 2, "duplicates": 0, "ignored": 0, "invalid": 0, "lines": 2, "unread": { "cosmetic": 0, "leading_dot": 0, "modifier": 0, "other": 0, "regex": 0, "url": 0, "wildcard": 0 }, "unsupported": 0 }, "created": true, "revision": 12, "source": "ours"}POST /api/blocking/sources/{id}/refresh
Section titled “POST /api/blocking/sources/{id}/refresh”Read one source now, whatever its interval says.
One pass at a time, so a refresh asked for while a sweep runs is refused rather than queued: a caller who waited would hold this request open for as long as a sweep takes, and the pass that is running is doing what they asked.
The answer is the row this source has afterwards, which is the same shape GET /api/blocking/sources gives. A caller that asked for a refresh wants to know what it did.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | id |
string | yes | The id the configuration gave the source |
| Answer | Body | Means |
|---|---|---|
| 200 | SourceReport as application/json |
The pass ran, and this is the source afterwards |
| 202 | Problem as application/json |
The pass is taking longer than this request waits, and carries on |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or credentials this server does not accept: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A caller whose role does not include this: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 404 | Problem as application/json |
The running configuration names no such source |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 409 | Problem as application/json |
A pass is already running, or the configuration moved while it ran |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential, or too many attempts at once: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 500 | Problem as application/json |
The pass ended without an answer |
| 503 | Problem as application/problem+json |
Nothing keeps the lists current, so there is nothing to refresh. Or: The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X POST --unix-socket $S -H "$A" \ http://localhost/api/blocking/sources/{id}/refreshGET /api/blocking/state
Section titled “GET /api/blocking/state”The switch and until when it is off, the setting enabled of blocking.toml, and whether
blocking is in force.
A reader’s credentials, the same as the blocklist reads beside it. The switch is not a
secret: /api/health carries it too, and that route is open. What this rule buys is one
answer to “who reads this API”, rather than a route with its own.
This takes no parameters and no body.
| Answer | Body | Means |
|---|---|---|
| 200 | BlockingState as application/json |
The switch, the setting and blocking in force, right now |
| 400 | Problem as application/problem+json |
On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or credentials this server does not accept: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential, or too many attempts at once: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 503 | Problem as application/problem+json |
A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ http://localhost/api/blocking/state{ "enabled": true, "in_force": "off", "remaining_seconds": 542, "state": "off"}PUT /api/blocking/state
Section titled “PUT /api/blocking/state”Turn the switch off for a while, or on again.
This changes the switch alone. The setting enabled of blocking.toml is a revision, and
while it is false, blocking stays off after an enable: the answer says in_force: off.
Runtime state rather than configuration: it lives in memory, and a restart brings the switch back on whatever this asked for. What makes an untimed disable safe is that it is loud, and this route is one of the four places that say so. The audit trail for a disable is the log line with the caller’s id and the length asked for. The switch is not a revision, so it has no audit row of its own.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| body | disabled |
boolean | yes | true to turn blocking off, false to turn it back on. |
| body | seconds |
integer | no | How long to stay off, from 1 to 86400 seconds. Absent means until an enable. Refused together with disabled: false, because there is no length to turn blocking on for. |
| Answer | Body | Means |
|---|---|---|
| 200 | BlockingState as application/json |
The switch after this request, the setting and blocking in force. An enable while enabled is false turns the switch on and answers in_force: off |
| 400 | Problem as application/problem+json |
No body, or a body that is not JSON. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or credentials this server does not accept: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A caller whose role does not include this: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 408 | Problem as application/problem+json |
The body was not whole 10 seconds after the head (body-too-slow). |
| 413 | Problem as application/problem+json |
The body passes the limit of this route, 16 KiB (body-too-large). |
| 415 | Problem as application/problem+json |
The content type is not one this route takes. A JSON body needs application/json |
| 422 | Problem as application/problem+json |
A field missing, a field this body does not take, seconds outside 1 to 86400, or seconds together with disabled: false |
| 429 | Problem as application/problem+json |
Too many failed attempts with this credential, or too many attempts at once: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 503 | Problem as application/problem+json |
The bodies in flight filled their budget for 5 seconds (busy). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s -X PUT --unix-socket $S -H "$A" \ -H 'content-type: application/json' \ -d '{"disabled":true,"seconds":600}' \ http://localhost/api/blocking/state{ "enabled": true, "in_force": "off", "remaining_seconds": 600, "state": "off"}GET /api/logs
Section titled “GET /api/logs”The recent lines of the log, from the ring of the server: the newest lines, a page of the
past with before, or a poll with after.
The ring keeps the last 10,000 lines, or 4 MiB of them, from the start of the server, at the
levels that the log writes. Two reads run at once for the whole server. A page stops at
limit lines, or at the first line that takes its JSON to 1 MiB or past it, so it can hold that
line more. A page that the client does not take within 30 seconds of its build loses its bytes,
and its connection closes gracefully: the other streams of HTTP/2 finish within 10 seconds.
Role: operator or admin. The word of the kernel on the socket proves nobody for this route, so a call on the socket needs a token or a session.
| In | Name | Type | Required | Description |
|---|---|---|---|---|
| query | level |
LogLevel |
no | The quietest level to give: error, warn, info, debug or trace. warn gives the warnings and the errors. info by default. |
| query | since |
integer | no | The oldest time to give, in seconds since 1970. |
| query | until |
integer | no | The newest time to give, in seconds since 1970, and not that second itself. |
| query | before |
string | no | A cursor of a page: the lines older than it, newest first. A page of the past. |
| query | after |
string | no | A cursor of a page: the lines newer than it, oldest first. A poll. |
| query | limit |
integer | no | The most lines of the page, 1 to 1000. 200 by default. |
| Answer | Body | Means |
|---|---|---|
| 200 | LogPage as application/json |
A page of the recent lines of the log, by level and by time. older and more_newer say that more lines match |
| 400 | Problem as application/problem+json |
A parameter given twice, or one that is not text: the detail is a parameter is given twice, or is not text. Or a value that does not read: a level, a number of seconds, a cursor, a limit out of 1 to 1000, since past until, or before with after, where the detail names the parameter and not its value. Or: On a TCP door, a proxy of api_trust named no single client in its header (proxy-header). This comes before every other answer. |
| 401 | Problem as application/problem+json |
No credentials, or none this server knows: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 403 | Problem as application/problem+json |
A role that is not allowed to read this: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. |
| 429 | Problem as application/problem+json |
Two reads of the log run already (logs-busy), with Retry-After: 1. Too many failed attempts with this credential, or too many attempts at once: the guard answers that before it reads the body, so it comes before any 400 or 415 of the body. Any other reason for this answer comes from the handler, after the guard let the request in. |
| 500 | Problem as application/problem+json |
The read of the log failed. The detail names the task, and the log says why |
| 503 | Problem as application/problem+json |
This server keeps no recent lines, or this connection cannot watch the delivery of a page (logs-unavailable). Or: A read of the accounts did not end within 3 seconds (accounts-busy). |
curl -s --unix-socket $S -H "$A" \ "http://localhost/api/logs?level=warn&since=1762790000&limit=200"Schemas
Section titled “Schemas”Accepting
Section titled “Accepting”The body an operator accepted, named by its checksum.
| Field | Type | Required | Description |
|---|---|---|---|
checksum |
string | yes | The checksum the record shows for the refused body, as 64 hexadecimal characters. Required rather than convenient. It names one body rather than “whatever arrives next”, so an accept cannot become a habit that turns the gate off, and a sweep that refused a different body in the meantime is a refusal rather than a body nobody looked at. |
AccountChangeRow
Section titled “AccountChangeRow”One account change, as a read answers it.
| Field | Type | Required | Description |
|---|---|---|---|
account |
string | yes | Which account it was done to, by identifier. |
action |
string | yes | What was done: create, rename, role, display, password, delete, token or revoke-token. |
actor |
string | yes | Who did it, by identifier, or setup or cli for the ones nobody was logged in for. |
actor_name |
string | yes | The name that actor had at the time, so a reader recognises who it was without looking up a row that can be gone. |
at |
integer | yes | When it happened, in seconds since the Unix epoch. |
detail |
string | no | What changed, in a few words: the new role, the new name, or a token’s label. Never a secret. |
name |
string | yes | The name that account had at the time. |
seq |
integer | yes | The place of the change in the order of the writes: it grows with each change and does not move. The next page takes the smallest seq of a page as before. |
AccountRole
Section titled “AccountRole”The role of an account.
One of admin, operator, viewer.
AccountRow
Section titled “AccountRow”One account, as a read answers it. Never a verifier.
| Field | Type | Required | Description |
|---|---|---|---|
can_log_in |
boolean | yes | Whether this account has a password. An account can exist without one. |
created_at |
integer | yes | When the account was made, in seconds since the Unix epoch. |
display |
string | no | The name to show a person instead of the login name. Absent for an account without one. |
id |
string | yes | Immutable. What a change is recorded against, and what a rename does not move. |
name |
string | yes | What somebody types to log in: lower case letters, digits, and - _ .. |
role |
AccountRole |
yes | admin, operator or viewer. |
updated_at |
integer | yes | When it last changed, in seconds since the Unix epoch. |
AnameRow
Section titled “AnameRow”One ANAME owner of a zone, and where its set stands.
| Field | Type | Required | Description |
|---|---|---|---|
checked |
integer | no | When the sample that gives state was taken, in seconds since 1970. Absent where no sample holds the owner yet. |
owner |
string | yes | The owner, with its final dot. A wildcard owner is written as one. |
state |
AnameState |
yes | Where its set stood at the last sample of the flattening task, which runs at each revision and every ten seconds, as dns_aname_sets counts it. |
succeeded |
integer | no | When a lookup last wrote its set, in seconds since 1970, since the server started or the ANAME records of the owner changed. Absent before the first. |
AnameState
Section titled “AnameState”Where the set of an ANAME owner stands.
One of fresh, stale, missing, pending.
AnchorsHealth
Section titled “AnchorsHealth”The root keys this server trusts, and the refresh that keeps them current (RFC 5011).
The server asks the root for its keys about once a day, and takes a new key only after it has seen the key for 30 days.
| Field | Type | Required | Description |
|---|---|---|---|
damaged |
boolean | no | Whether the start found trust-anchors.toml damaged. It renamed the file to trust-anchors.toml.damaged and started from the keys built into the server. Absent where the file was sound. It stays until the next start. |
deleted |
boolean | no | Whether the last trusted root key revoked itself. Only a new build or a deleted trust-anchors.toml then gives the server a key again. Absent where it did not. |
last_success |
integer | no | When the last refresh that worked ended, in seconds since the Unix epoch. Absent before the first. |
ok |
boolean | yes | Whether validation has a root key to start from. A key is trusted, the time is not past stale_at, and the clock is not wrong. The server does not refresh the keys under a wrong clock, and that clock cannot tell that they are stale. false makes every signed name fail, now or soon. |
pending |
array of PendingKeyHealth |
no | Each new root key that waits out its 30 days. Absent where none waits. |
problem |
string | no | Why the last refresh failed. Absent where it worked, and before the first. The server tries again later, and keeps the keys it trusts. |
stale_at |
integer | yes | When ok goes false if no refresh works before it, in seconds since the Unix epoch. It is three refresh intervals after last_success, or after the start where there is no success yet. A new install is then not red before its first refresh. |
trusted |
array of integer | yes | The key tags of the root keys this server trusts. Empty where it trusts none. |
AnswerTotals
Section titled “AnswerTotals”How much the answer cache holds.
| Field | Type | Required | Description |
|---|---|---|---|
bytes |
integer | yes | |
names |
integer | yes | Owner names of the configuration running now, in the shared part and in the part of each stub zone at its trust epoch, each once. |
older |
integer | yes | Owner names of another part, each once: an older configuration, or an older trust epoch of a stub zone, which moves where the stub gets a new chain of trust. No query reaches them. They stay until eviction or their time to live removes them. |
Applied
Section titled “Applied”What a change answers with.
| Field | Type | Required | Description |
|---|---|---|---|
command |
string | yes | The identifier it was recorded under, so a client can ask about it. |
revision |
integer | yes | The revision the change became. |
still_stored |
array of StillStored |
no | What the rows already written still carry. Present for a change that turned a privacy setting off. Turning store_names off stops new rows carrying the name. It does not erase the ones already there, so this field names what is left. |
waits_for_restart |
array of string | no | The settings of node.toml whose change waits for a restart, as they stand when the answer is made, in the order of its rules. Absent while none waits. Another change can land between this one and the answer, so the list is of the revision that runs then, and not of this change alone. |
AttemptState
Section titled “AttemptState”What the last pass over one blocklist source ended as.
One of read, unchanged, recompiled, refused, unreachable, failed.
BelowEntry
Section titled “BelowEntry”One label below the name, and how many names at or below it hold something.
| Field | Type | Required | Description |
|---|---|---|---|
label |
string | yes | |
names |
integer | yes |
BlockedMode
Section titled “BlockedMode”The shape of a blocked answer, as mode writes it.
One of zero, nodata, nxdomain, address.
BlockedRank
Section titled “BlockedRank”One blocked name in the list of the most blocked.
| Field | Type | Required | Description |
|---|---|---|---|
blocked |
integer | yes | How many questions for that name were blocked in the range. |
key |
string | yes | The name, or other for the blocked questions the list left out. |
BlockedReason
Section titled “BlockedReason”Why a group of records that is past its expiry time is still in its zone.
One of gate, clock, outage, state, rule, cross-file, failed.
Blocking
Section titled “Blocking”blocking.toml: the lists this server blocks from, and the names an operator decided
about.
Mostly entries rather than settings. Each list is a TOML array of tables: [[source]],
[[block]] and [[allow]]. The two scalars decide how often a source is read.
| Field | Type | Required | Description |
|---|---|---|---|
allow |
array of BlockingEntry |
no | Names this operator allows whatever the lists say. |
answer_ttl_seconds |
integer | no | How long a blocked answer lives, in seconds. Two by default: an operator who allows a name waits that long rather than five minutes. |
block |
array of BlockingEntry |
no | Names this operator blocks whatever a block list says. An allow source, and an @@ line of a source with exceptions = "global", still allow them. |
block_report |
boolean | no | Whether a TXT question about a blocked name answers with the list and the rule. On by default. |
block_v4 |
string | no | The IPv4 address to answer with. Only where the mode is address: any other mode refuses an address. |
block_v6 |
string | no | The IPv6 address to answer with. Only where the mode is address: any other mode refuses an address. |
bypass |
array of string | no | A client address or subnet a rule never blocks. Empty by default. |
canary |
boolean | no | Whether use-application-dns.net is answered NXDOMAIN, which tells Firefox that this network filters DNS. On by default. Turn it off on a server that filters nothing. |
cname_blocking |
boolean | no | Whether the names inside an answer are tested as well as the name asked for. On by default. It catches a tracker reached through an alias of the site that asked for it. |
enabled |
boolean | no | Whether blocking is on. false turns it off for every client, as a revision that a restart keeps: no rule is tested, and the canary and Private Relay answers are off too. On by default, and absent means on: a read gives true or false. A build older than this key refuses a file that holds it, whatever it says. The switch of tadoru blocking disable turns blocking off in memory beside this, and blocking is in force only where both say on. The lists stay current while it is off. |
max_compiled_bytes |
integer | no | The most bytes one source’s compiled set may take. 256 mebibytes by default. |
max_count_drift_percent |
integer | no | How far below the count its own header declares a body may read, as a percentage. 5 by default: a download a proxy cut short passes every other check. |
max_invalid_percent |
integer | no | How much of a body’s rule lines may be unreadable, as a percentage. 20 by default: an error page from a proxy reads as thousands of unreadable lines. |
max_source_bytes |
integer | no | The most decoded bytes one source’s body may hold. 64 mebibytes by default. |
min_refresh_minutes |
integer | no | The shortest interval this server will use, in minutes, whatever a publisher declares. An hour by default, at least 1, and at most the hours of refresh_hours. The publisher decides their cadence and this machine decides what it can afford. |
min_rules |
integer | no | The fewest rules of its action a published list may compile to: block rules for a block source, and allow rules for an allow source. 100 by default. A source with a path keeps its own floor of 1, because a file in the config root is what you typed. |
min_share_percent |
integer | no | How much of what a source held before a new body must still hold, as a percentage. 50 by default: a list that lost half its names is a broken publisher rather than an edit. |
mode |
string | no | What to answer for a name a rule blocks: zero for the null address, nodata for an empty answer, nxdomain, or address for one of your own. zero by default, which is what keeps a client talking to this server. address needs block_v4 or block_v6. |
private_relay |
string | no | What to do about the names Apple Private Relay starts up through: allow, which is the default, or block, which turns Private Relay off for this network. |
refresh_hours |
integer | no | How many hours between reads of a source, where the source names no number of its own. A day by default, which is what both publishers’ lists change in. |
regex |
array of BlockingRegex |
no | Rules that match a name by its shape rather than by the name. |
source |
array of BlockingSource |
no | The lists to block from, in the order they are tried. |
BlockingEntry
Section titled “BlockingEntry”One [[block]] or [[allow]]: a name an operator decided about.
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | yes | The name. It covers the names under it, the same as a plain name in a source with subtree on. |
note |
string | no | Why, for the person reading the file in a year. Nothing reads it, and it goes in the audit row of the change that added it. |
BlockingHealth
Section titled “BlockingHealth”Whether every list this server was told to block from is blocking.
A dashboard showing green while nothing is blocked is a dashboard hiding a failure of blocking, so a source serving no rules makes this not ok.
| Field | Type | Required | Description |
|---|---|---|---|
empty |
array of EmptySource |
no | The sources that are serving nothing, with what the last pass over each of them said. Empty where every source is serving. A start that has not finished its first pass has every source in here, which is the honest answer for those few seconds. |
ok |
boolean | yes | Whether every configured source is serving rules. |
serving |
integer | yes | How many of them are serving rules right now. |
sources |
integer | yes | How many sources the running configuration names. |
BlockingPatch
Section titled “BlockingPatch”The body of PATCH /api/blocking: the settings of blocking.toml to change. A key that the body leaves out stays as it is, and a key sent as null goes back to its default. source, block, allow and regex take the whole list and replace every block of it: the comment lines above each block stay by place, and those inside a block are lost. A list equal to the one that runs changes nothing, and an empty list or null takes every block out.
| Field | Type | Required | Description |
|---|---|---|---|
allow |
array of BlockingEntry |
no | Names this operator allows whatever the lists say. |
answer_ttl_seconds |
integer | no | How long a blocked answer lives, in seconds. Two by default: an operator who allows a name waits that long rather than five minutes. |
block |
array of BlockingEntry |
no | Names this operator blocks whatever a block list says. An allow source, and an @@ line of a source with exceptions = "global", still allow them. |
block_report |
boolean | no | Whether a TXT question about a blocked name answers with the list and the rule. On by default. |
block_v4 |
string | no | The IPv4 address to answer with. Only where the mode is address: any other mode refuses an address. |
block_v6 |
string | no | The IPv6 address to answer with. Only where the mode is address: any other mode refuses an address. |
bypass |
array of string | no | A client address or subnet a rule never blocks. Empty by default. |
canary |
boolean | no | Whether use-application-dns.net is answered NXDOMAIN, which tells Firefox that this network filters DNS. On by default. Turn it off on a server that filters nothing. |
cname_blocking |
boolean | no | Whether the names inside an answer are tested as well as the name asked for. On by default. It catches a tracker reached through an alias of the site that asked for it. |
enabled |
boolean | no | Whether blocking is on. false turns it off for every client, as a revision that a restart keeps: no rule is tested, and the canary and Private Relay answers are off too. On by default, and absent means on: a read gives true or false. A build older than this key refuses a file that holds it, whatever it says. The switch of tadoru blocking disable turns blocking off in memory beside this, and blocking is in force only where both say on. The lists stay current while it is off. |
max_compiled_bytes |
integer | no | The most bytes one source’s compiled set may take. 256 mebibytes by default. |
max_count_drift_percent |
integer | no | How far below the count its own header declares a body may read, as a percentage. 5 by default: a download a proxy cut short passes every other check. |
max_invalid_percent |
integer | no | How much of a body’s rule lines may be unreadable, as a percentage. 20 by default: an error page from a proxy reads as thousands of unreadable lines. |
max_source_bytes |
integer | no | The most decoded bytes one source’s body may hold. 64 mebibytes by default. |
min_refresh_minutes |
integer | no | The shortest interval this server will use, in minutes, whatever a publisher declares. An hour by default, at least 1, and at most the hours of refresh_hours. The publisher decides their cadence and this machine decides what it can afford. |
min_rules |
integer | no | The fewest rules of its action a published list may compile to: block rules for a block source, and allow rules for an allow source. 100 by default. A source with a path keeps its own floor of 1, because a file in the config root is what you typed. |
min_share_percent |
integer | no | How much of what a source held before a new body must still hold, as a percentage. 50 by default: a list that lost half its names is a broken publisher rather than an edit. |
mode |
string | no | What to answer for a name a rule blocks: zero for the null address, nodata for an empty answer, nxdomain, or address for one of your own. zero by default, which is what keeps a client talking to this server. address needs block_v4 or block_v6. |
private_relay |
string | no | What to do about the names Apple Private Relay starts up through: allow, which is the default, or block, which turns Private Relay off for this network. |
refresh_hours |
integer | no | How many hours between reads of a source, where the source names no number of its own. A day by default, which is what both publishers’ lists change in. |
regex |
array of BlockingRegex |
no | Rules that match a name by its shape rather than by the name. |
source |
array of BlockingSource |
no | The lists to block from, in the order they are tried. |
BlockingRegex
Section titled “BlockingRegex”One [[regex]]: a rule that matches a name by pattern rather than by name.
Typed fields rather than the modifiers a common blocker writes inside the pattern string. Three decisions inside one string cannot be checked one at a time, and a typo in the middle is a rule that quietly means something else.
| Field | Type | Required | Description |
|---|---|---|---|
action |
string | no | What a match does: block, which is the default, or allow. An allow rule wins over every block, the same as an [[allow]] entry. An allow rule answers nothing, so it takes no mode, block_v4 or block_v6. |
block_v4 |
string | no | The IPv4 address to answer with. Only where this rule’s mode is address, which an address needs written. |
block_v6 |
string | no | The IPv6 address to answer with. Only where this rule’s mode is address, which an address needs written. |
groups |
array of string | no | The groups this rule applies to, by name. Every group where the key is absent, and an empty list is refused: a rule for nobody is a rule nothing reads. |
invert |
boolean | no | Whether the rule fires for the names the pattern does not match. Off by default. An inverted block rule blocks everything apart from what the pattern matches. |
mode |
string | no | What a blocked answer is for this rule: zero, nodata, nxdomain or address. The group’s answer where this rule names none. address needs block_v4 or block_v6, and an allow rule takes no mode. |
note |
string | no | Why, for the person reading the file in a year. Nothing reads it. |
pattern |
string | yes | The expression, matched against the name in lower case with no trailing dot. It is required, and it is matched unanchored, so ads\. matches img.ads.example.com. |
qtype |
array of string | no | The query types this rule applies to, such as ["A", "AAAA"]. Every type where the key is absent, and 16 distinct types at most: a type named twice counts once. An empty list is refused. |
BlockingSource
Section titled “BlockingSource”One [[source]]: a published list, named by an id, at a URL or at a path.
| Field | Type | Required | Description |
|---|---|---|---|
action |
string | no | What the rules of this list do: block, which is the default, or allow. An allow source reads every rule of its body as a name to allow, a plain name and a ||name^ line alike, and cancels every block of the groups that use it. It takes no exceptions. |
exceptions |
string | no | Whose blocks this source’s own allow rules cancel: source for its own, which is the default, or global for every source. A block source alone takes it. |
format |
string | no | Which dialect to read this list as: auto, which classifies each line on its own, or abp for Adblock Plus, which counts everything that is not one of its forms. auto by default, and it reads an Adblock list without being told. |
id |
string | yes | What to call this source. Lower case letters, digits and hyphens, 40 bytes at most, and unique in the file. It names the files the content is written to and the block_list column of a blocked query’s row, so it is checked like a name. |
max_compiled_bytes |
integer | no | The most bytes this one source’s compiled set may take. |
max_count_drift_percent |
integer | no | How far below its own declared count this one source’s body may read, as a percentage. |
max_invalid_percent |
integer | no | How much of this one source’s rule lines may be unreadable, as a percentage. |
max_source_bytes |
integer | no | The most decoded bytes this one source’s body may hold. |
min_rules |
integer | no | The fewest rules of its action this one source may compile to: block rules for a block source, and allow rules for an allow source. |
min_share_percent |
integer | no | How much of what this one source held before a new body must still hold, as a percentage. |
path |
string | no | A file to read instead, relative to the config root. One of url or path, never both. No leading /, no .., and no symbolic link anywhere along it. 512 bytes and 8 parts at most. |
private |
boolean | no | Whether the url may lead to an address inside this network: true, for a list served on a machine of the house or on this one. Off by default, so every hop of the fetch reaches a public address or the fetch ends. Only an admin sets it. It covers the host and the port that the url names; a redirect to another host reaches a public address alone. It never reaches the unspecified address, link-local, multicast or broadcast. A path source takes no private = true: it is refused with the setting private. A read gives true or null. |
refresh_hours |
integer | no | How many hours between reads of this one source. It wins over the file’s own number and over the expiry the publisher declares. |
subtree |
boolean | no | Whether a plain name in this list covers the names under it. On by default, which is what both publishers mean by their plain-domain files. |
url |
string | no | Where to fetch it. https only: a blocklist over plain HTTP is a list anybody on the path can edit. One of url or path, never both. 2048 bytes at most, counted after the spaces at its ends are trimmed. |
BlockingState
Section titled “BlockingState”The switch, the setting enabled of blocking.toml, and whether blocking is in force.
Not tagged with a revision: the switch is runtime state a restart forgets, not a generation, so it has no entity tag to send back in If-Match. The setting is part of the running revision, and GET /api/blocking carries its tag.
| Field | Type | Required | Description |
|---|---|---|---|
enabled |
boolean | yes | The setting enabled of blocking.toml in the running revision. false turns blocking off for every client, whatever the switch says. |
in_force |
BlockingSwitch |
yes | Whether blocking is in force: on where the switch is on and enabled is true, and off otherwise. |
remaining_seconds |
integer | no | Seconds left on a timed disable of the switch. Absent for on and for an untimed one. |
state |
BlockingSwitch |
yes | The switch in memory of tadoru blocking disable: on or off. |
BlockingSwitch
Section titled “BlockingSwitch”On or off: the switch in memory, or blocking in force.
One of on, off.
CacheEntry
Section titled “CacheEntry”One value the cache holds at the name, for one type.
| Field | Type | Required | Description |
|---|---|---|---|
forward |
string | no | The suffix of the [[forward]] whose part of the cache holds this value, at the trust epoch of the forward. Absent for every other part, and where store_names is off. |
kind |
EntryKind |
yes | |
records |
array of string | no | The records, one master file line each, with the time to live that is left. Only for records. |
soa |
string | no | The SOA the denial came with, as one master file line. Only for no-records and no-name, and absent for a denial that came with no SOA. |
stale |
boolean | yes | Past its time to live, and kept to answer while the upstreams do not. |
stub |
string | no | The apex of the stub zone whose part of the cache holds this value, which a query of this type reads. At the apex of a stub, a DS value is in the part of the route above it. Absent for the shared part, and where store_names is off. |
ttl |
integer | yes | The time to live a client is told now. For a stale value, the time to live a stale answer goes out with. |
type |
string | yes | The record type, such as A or TYPE65280. |
validation |
ValidationState |
yes |
CacheFlushed
Section titled “CacheFlushed”What a flush removed.
| Field | Type | Required | Description |
|---|---|---|---|
flushed |
FlushCounts |
yes |
CacheTotals
Section titled “CacheTotals”How much each store holds, whole.
| Field | Type | Required | Description |
|---|---|---|---|
answers |
AnswerTotals |
yes | |
delegations |
CutTotals |
yes | |
spans |
SpanTotals |
yes | |
tailored |
TailoredTotals |
yes |
CacheView
Section titled “CacheView”What the cache holds at one name, and which labels below it hold something.
| Field | Type | Required | Description |
|---|---|---|---|
below |
array of BelowEntry |
yes | The labels directly below the name, in canonical order. |
delegation |
CutEntry |
no | The zone cut at this exact name, from the walk of its route: the walk of its stub zone, or the walk from the root. Absent where neither holds one, as where the server forwards and no stub routes the name. |
denied_by |
string | no | The closest name above that holds a denial of the whole name, which answers this name too. |
does_not_exist |
NameDenied |
no | |
entries |
array of CacheEntry |
yes | One per type. |
forward |
string | no | The suffix of the [[forward]] whose part of the cache holds the name, where one routes it, at the trust epoch of the forward. Absent for every other part, and where store_names is off. |
more |
string | no | The after of the next page, or null on the last page. |
name |
string | yes | |
names_hidden |
boolean | yes | true where store_names is off. Then below lists nothing, so the answer names no name the caller did not send. |
stub |
string | no | The apex of the stub zone whose part of the cache holds the name, where a stub routes it. The entries, the denial above and the cut are then those that the walk of the stub stored, which a query of the name reads. Absent for the shared part, and where store_names is off, because it is a name the caller did not send. |
tailored |
array of TailoredEntry |
yes | |
totals |
CacheTotals |
yes |
CatalogEntry
Section titled “CatalogEntry”One known list.
| Field | Type | Required | Description |
|---|---|---|---|
action |
SourceAction |
yes | Whether the source blocks the names of the list or gives them back. |
as_of |
string | yes | The date of the estimate names, YYYY-MM-DD. |
format |
CatalogFormat |
yes | The dialect that the source reads the list as. |
homepage |
string | yes | The page of the project, https. |
id |
string | yes | The source id that the console proposes. The operator can change it. |
license |
string | yes | The license of the list: an SPDX identifier where it has one, or its name. |
names |
integer | yes | An estimate of how many names the list held on as_of. It is not the size of the list today. |
publisher |
string | yes | Who keeps the list. |
source |
string | no | The id of the first source of the running revision that reads this url. The scheme and the host count without case, and the rest of the address byte for byte. Absent where none does. |
subtree |
boolean | yes | Whether a plain name of the list covers the names under it. |
title |
string | yes | The name of the list, as its publisher writes it. |
topic |
CatalogTopic |
yes | What the list is for. |
url |
string | yes | The address of the list, https. |
CatalogFormat
Section titled “CatalogFormat”The dialect that a source reads the list as, the key format of a [[source]].
One of auto, abp.
CatalogTopic
Section titled “CatalogTopic”What a known list is for.
One of ads, privacy, security, adult, gambling, social, fixes.
CertificateFingerprints
Section titled “CertificateFingerprints”The two SHA-256 fingerprints of a certificate that the server made. A renewal keeps the key, so
public_key_sha256 stays and certificate_sha256 changes.
| Field | Type | Required | Description |
|---|---|---|---|
certificate_sha256 |
string | yes | SHA-256 over the DER of the leaf, as pairs of uppercase hexadecimal digits split by colons, the form in which a browser shows it. |
public_key_sha256 |
string | yes | SHA-256 over the SubjectPublicKeyInfo of the leaf, in padded standard base64, the form of a pin of the key (RFC 7469 section 2.4). |
CertificateHealth
Section titled “CertificateHealth”One certificate that the encrypted listeners serve, or wait for.
The server looks at the metadata of the files every 30 seconds and reads them where it moved, so
a certificate that certbot renews reaches the listeners within about a minute, without a
revision. A certificate from ACME is ordered and renewed by the server, and so is one that the
server makes with tls_self_signed, which carries its fingerprints. A dashboard alerts on ok
going false.
| Field | Type | Required | Description |
|---|---|---|---|
expires_at |
integer | no | When the certificate that serves now expires, in seconds since the Unix epoch. Absent while the server waits for its first certificate, from ACME or from a PKCS #12 file. |
file |
string | yes | The certificate file that node.toml names, pki/acme/current for ACME, or pki/self-signed/current for the certificate that the server makes. |
fingerprints |
CertificateFingerprints |
no | The fingerprints of the certificate that the server makes with tls_self_signed, once one serves. Absent for the other sources. Compare them with what a browser or a client shows. |
ok |
boolean | yes | Whether state is ok. |
problem |
string | no | Why the last read of the files was refused, or why the last ACME order failed. A refusal of the authority names the step and a category: the problem type where RFC 8555 names it, the HTTP status where the answer held no problem document, or “a problem that this server does not know”. It never holds the detail text of the authority. A failure on the way, such as an authority that does not answer, names that. The certificate before it keeps serving, where one served. Absent where the last attempt worked. |
state |
CertificateHealthState |
yes | ok; expires_soon, inside 14 days for files and for a certificate that the server made, and inside a sixth of the lifetime for ACME; reload_failed where the last read of the files was refused; renewal_failing where the last ACME order failed, or where the server could not make, store or serve the certificate of tls_self_signed, or cannot renew it before the clock is trusted, before or after its first certificate; waiting_for_acme before the first ACME certificate; waiting_for_files before the first read of a PKCS #12 file, where no read was refused yet, a problem like waiting_for_acme, because every handshake fails until then; or expired. Where two hold, the word is the first of expired, reload_failed or renewal_failing, and expires_soon. Before the first certificate, a refusal reads reload_failed and a failed order renewal_failing, with no expires_at. |
CertificateHealthState
Section titled “CertificateHealthState”Where a certificate that the encrypted listeners serve stands.
One of ok, expires_soon, reload_failed, renewal_failing, waiting_for_acme, waiting_for_files, expired.
Change
Section titled “Change”How a file changed.
One of added, replaced, removed.
ChangeAccount
Section titled “ChangeAccount”What to change about an account. Anything left out is left alone.
| Field | Type | Required | Description |
|---|---|---|---|
display |
string | no | The name to show, at most 128 characters and no control characters. An empty string clears it. |
name |
string | no | A new name: lower case letters, digits, and - _ ., at most 64 characters. The tokens and the sessions stay, because they hang off the identifier rather than the name. |
role |
string | no | A new role: admin, operator or viewer. |
ChangeResult
Section titled “ChangeResult”The result of a change of records.
One of applied, unchanged.
Changes
Section titled “Changes”What changed in the files of one revision: each file, and the settings of each, by name and with no value. At most 64 files, and 32 settings for each file.
| Field | Type | Required | Description |
|---|---|---|---|
files |
array of FileChange |
yes | The files that changed, in the order of their paths, at most 64. |
more |
integer | no | How many files past the first 64 changed. Absent at 0. |
CheckedChange
Section titled “CheckedChange”What a dry run of a change answers: what the save of the same request would do.
| Field | Type | Required | Description |
|---|---|---|---|
command |
string | no | The command that the request names, where the ledger holds it as applied: the change of the Idempotency-Key, or without a key the same body against the same revision. The save answers with that command and its revision again. Absent otherwise. |
results_owed |
boolean | yes | Whether a zone owes a result of a change of records that the save tries to settle first. The try can change the answer both ways, so this answer is provisional while it is true. A refusal of the checks carries the same member, "results_owed": true, where it holds. |
revision |
integer | no | The revision that ran where the change was checked. For an unchanged change, the revision that holds what it writes. Where command is present, the revision that command became. Absent where no revision runs. |
unchanged |
boolean | yes | Whether the save would make no new revision. Without an Idempotency-Key, that is a change that writes what already runs. With a key, that is a key that names a change already applied, and a save with a key makes a revision even where the change writes what runs. |
waits_for_restart |
array of string | yes | The settings of node.toml whose change would wait for a restart, against what the process serves now, in the order of its rules. Empty where none would. |
CheckpointResult
Section titled “CheckpointResult”Whether a checkpoint wrote a revision.
One of made, already.
CheckpointText
Section titled “CheckpointText”What the new records.zone of a checkpoint is.
One of kept, export.
Checkpointed
Section titled “Checkpointed”What a checkpoint answers.
| Field | Type | Required | Description |
|---|---|---|---|
command |
string | no | The command of the checkpoint, where it made one. |
result |
CheckpointResult |
yes | made, where the command of this request wrote a revision, or already, where the running revision has the zone at its files and nothing was written. |
revision |
integer | yes | The revision that holds the zone at its files: the one the command made, or the one that runs. |
text |
CheckpointText |
no | kept, where the new records.zone kept the comments and the layout of the file, or export, where it is the export of the zone, which keeps the comment of each record and drops the other comments and the layout. Absent where nothing was made, or where a repeat of a key answers from the ledger, which does not keep it. |
zone |
string | yes | The id of the zone. |
ClientGroup
Section titled “ClientGroup”One group, as the running revision holds it.
| Field | Type | Required | Description |
|---|---|---|---|
allows |
integer | yes | How many names of its own this group allows. |
block_v4 |
string | no | The IPv4 address this group answers with, where its mode is address. |
block_v6 |
string | no | The IPv6 address this group answers with, where its mode is address. |
blocking |
boolean | yes | Whether anything is tested for this group at all. false blocks nothing, including the names the group itself names. |
blocks |
integer | yes | How many names of its own this group blocks, above the baseline entries. |
canary |
boolean | no | Whether use-application-dns.net is answered NXDOMAIN for this group, which tells Firefox that this network filters DNS. Absent where the group names no answer, and then the blocking.toml answer applies, the same as mode. |
cname_blocking |
boolean | no | Whether this group tests the names inside an answer as well as the name asked for. Absent where the group names no answer, and then the blocking.toml answer applies. The group’s own setting rather than the answer resolved out of the two files, the same as mode. |
mode |
BlockedMode |
no | What a blocked answer is for this group: zero, nodata, nxdomain or address. Absent where the group names no mode, and then the blocking.toml answer applies. This is the group’s own setting rather than the answer resolved out of the two files. |
name |
string | yes | What the group is called, which is what a blocked row carries in block_group. |
private_relay |
PrivateRelay |
no | What this group does about the two names Apple Private Relay starts up through: allow or block. Absent where the group names no answer, and then the blocking.toml answer applies. |
resolved_sources |
array of string | yes | Which sources that is in this revision, in the order they are tried. Beside the word rather than instead of it. all follows a source added tomorrow and a list does not, so an answer holding the resolved list alone cannot say whether the next revision changes this group. |
sources |
GroupSources |
yes | What the file wrote: all for sources = "all", or named for a list of ids. |
ClientPolicy
Section titled “ClientPolicy”The clients and the groups of the running revision, and clients.toml as that revision holds
it.
Two lists, and a client carries the name of its group rather than a copy of the policy. To read
what one machine is tested against, take its group and find that name in groups. The lists
answer what a query gets, and file answers what the file says.
| Field | Type | Required | Description |
|---|---|---|---|
clients |
array of ClientRow |
yes | Every client this revision names, default first. |
file |
Clients |
yes | clients.toml as the running revision holds it, in the shape that a change of the file takes back. A top-level key the file leaves out is left out here too, and a key that an entry leaves out is null. A file that is not there is an object with no key. It differs from the lists in three places. The lists name default as a client, give the group of a client that names none, and count the entries of a group that the file lists. |
groups |
array of ClientGroup |
yes | Every group this revision holds, default first. |
ClientRow
Section titled “ClientRow”One client, the group whose policy applies to it, and the selectors that pick it.
The selectors are the ones the server matches with, as the running revision checked them, and
not the text of the file: file of the answer holds that.
| Field | Type | Required | Description |
|---|---|---|---|
addresses |
array of string | yes | The source addresses that are this client, sorted, such as 192.168.1.20. Empty for default. |
arrived_on |
array of string | yes | The listening addresses of this server that make a query this client, sorted. Empty for default. |
group |
string | yes | The group this client joined, or default where it named none. |
name |
string | yes | The name a log row carries. default is the client every unmatched query gets. |
subnets |
array of string | yes | The prefixes whose addresses are this client, longest first, such as 192.168.20.0/24. A prefix of one address reads as the address alone, such as 192.0.2.9. Empty for default. |
Clients
Section titled “Clients”clients.toml: who is asking, by name, and the policy each one is under.
Entries only. Each [[client]] is a name and the selectors that pick it out, each
[[group]] is a policy a client joins, and the file carries no settings of its own.
Both in one file because a group is what a client is for.
| Field | Type | Required | Description |
|---|---|---|---|
client |
array of ClientsClient |
no | The clients this server knows about. 256 at most. |
group |
array of ClientsGroup |
no | The groups a client joins. 64 at most, and default is one of them whether the file writes it, so a file that leaves it out holds 63 others. |
ClientsClient
Section titled “ClientsClient”One [[client]]: a name, and the selectors that pick it out.
| Field | Type | Required | Description |
|---|---|---|---|
addresses |
array of string | no | Source addresses that are this client, of either family. A subnet goes in subnets, and a link-local IPv6 address is refused. A client has one selector at least and 64 at most, across addresses, subnets and arrived_on together. |
arrived_on |
array of string | no | Listening addresses of this server. A query sent to one of them is this client, which is how an operator names a link rather than a machine. It counts toward the 64 selectors of the client. |
group |
string | no | The [[group]] this client is in, by name. A client with no group is in default, and a name no [[group]] in this file declares is refused. |
name |
string | yes | What to call this client. Lower case letters, digits and hyphens, 40 bytes at most, and unique in the file. It names the client in a query log row, so it is checked like a name. default is refused: that is the name every query matching no selector has. |
subnets |
array of string | no | Prefixes whose addresses are this client, such as 192.168.20.0/24. A bare address is a range of one. /0 is refused, because that is what the default client means. It counts toward the 64 selectors of the client. |
ClientsGroup
Section titled “ClientsGroup”One [[group]]: a blocking policy with a name, that a client joins.
A group says which sources apply to its clients, which names it allows or blocks above
the entries in blocking.toml, and what a blocked answer looks like for it.
| Field | Type | Required | Description |
|---|---|---|---|
allow |
array of string | no | Names allowed for this group alone, above the [[allow]] entries of blocking.toml. A name covers the names under it. No note here, unlike a baseline entry. 1000 at most. |
block |
array of string | no | Names blocked for this group alone, above the [[block]] entries of blocking.toml. 1000 at most. |
block_v4 |
string | no | The IPv4 address to answer with. Only where this group’s mode is address, which an address needs written. |
block_v6 |
string | no | The IPv6 address to answer with. Only where this group’s mode is address, which an address needs written. |
blocking |
boolean | no | Whether anything is tested for this group at all. true by default, and false is how an operator says “no blocking for these machines”. |
canary |
boolean | no | Whether the canary domain is answered NXDOMAIN for this group. The canary of blocking.toml where this group names none. |
cname_blocking |
boolean | no | Whether the names inside an answer are tested for this group as well as the name asked for. The cname_blocking of blocking.toml where this group names none. |
mode |
string | no | What a blocked answer is for this group: zero, nodata, nxdomain or address. The mode of blocking.toml where this group names none. address needs block_v4 or block_v6. |
name |
string | yes | What to call this group. The alphabet and the length of a client name. default is allowed here and means the group every client with no group key is in. |
private_relay |
string | no | What this group does about the Private Relay names: allow or block. The private_relay of blocking.toml where this group names none. |
sources |
ClientsSourceChoice |
yes | Which sources of blocking.toml apply: the word all, or a list of 64 of their ids at most. It is required, because an absent key that meant all and an empty list that meant none were two lines differing by two characters. |
ClientsPatch
Section titled “ClientsPatch”The body of PATCH /api/clients: the lists of clients.toml to change, as file of GET /api/clients gives them. A list that the body leaves out stays as it is. client and group take the whole list and replace every block of it, so a key that an entry leaves out takes its default: the comment lines above each block stay by place, and those inside a block are lost. A list equal to the one that runs changes nothing, and an empty list or null takes every block out. The two lists are checked together, so a group renamed goes in one body with the clients that name it.
| Field | Type | Required | Description |
|---|---|---|---|
client |
array of ClientsClient |
no | The clients this server knows about. 256 at most. |
group |
array of ClientsGroup |
no | The groups a client joins. 64 at most, and default is one of them whether the file writes it, so a file that leaves it out holds 63 others. |
ClientsSourceChoice
Section titled “ClientsSourceChoice”sources = "all", or sources = ["one", "two"].
Two shapes for one key, because “every enabled source, including one added tomorrow” is a thing a file says rather than a thing a missing key implies. Untagged, so TOML reads the word and the list without a wrapper an operator would have to write.
No fields.
ClockHealth
Section titled “ClockHealth”How far the server trusts the wall clock.
A signature is judged against the time, and a board with no clock battery starts in 1970. So until a time client sets the clock, the names of the time servers answer without validation, and the other signed names can fail on their times. This object says which of those holds.
| Field | Type | Required | Description |
|---|---|---|---|
floor |
integer | yes | The time this build cannot come before, in seconds since the Unix epoch. |
grace |
boolean | yes | Whether the grace names answer without validation, which is wrong and unconfirmed. |
grace_left |
integer | no | The seconds left in the grace window. Present only under unconfirmed. |
graced |
integer | yes | The answers a grace name got without validation, since the start. |
now |
integer | yes | The clock this server reads, in seconds since the Unix epoch. |
refused |
integer | yes | The SERVFAILs the clock caused, since the start. Under assumed this counts the answers whose signatures failed on their times, so a count that grows says the clock is wrong. |
state |
ClockHealthState |
yes | wrong, unconfirmed, synchronized or assumed. wrong is a clock earlier than this build. unconfirmed is a start with no time client yet, inside the grace window. synchronized is a time client that set the clock. assumed is a window that ended with no time client, where the clock is used as it reads. |
witnessed |
boolean | yes | Whether the file that says a time client set the clock was seen. true beside wrong says that a time client and this build disagree about the time. |
ClockHealthState
Section titled “ClockHealthState”How far the server trusts the wall clock.
One of wrong, unconfirmed, synchronized, assumed.
ConvertChecked
Section titled “ConvertChecked”What a check of a convert answers: what the convert of the same request would do.
| Field | Type | Required | Description |
|---|---|---|---|
carried |
array of string | yes | The keys of the old zone.toml that would go over, other than name and kind, in the order of the file. Where command is present, those of its record. |
command |
string | no | The command that the request names, where the ledger holds it as applied. The convert answers with that command and its revision again. Absent otherwise. |
dropped |
array of string | yes | The keys of the old zone.toml that would be dropped, in the order of the file. Where command is present, those of its record. |
results_owed |
boolean | yes | Whether a zone owes a result of a change of records that the convert tries to settle first, as in the answer of the other checks. The answer is provisional while it is true. |
revision |
integer | no | The revision that ran where the convert was checked. Where command is present, the revision that command became. |
unchanged |
boolean | yes | Whether the convert would make no new revision: a key that names a convert already applied, or without a key the same body against the same revision as a convert that landed. |
zone |
string | yes | The id of the zone after the change. |
ConvertZone
Section titled “ConvertZone”A change of the kind of a zone, or of the source of a stub. The keys are those of
POST /api/zones for the new kind, other than name: a convert keeps the apex.
| Field | Type | Required | Description |
|---|---|---|---|
addresses |
array of string | no | The addresses of the name server of a primary, as POST /api/zones takes them. |
id |
string | no | A new id for the zone, in the form of the id of POST /api/zones. Left out, or equal to the id of the path, the zone keeps its id. |
kind |
NewZoneKind |
yes | The kind of the zone after the change: primary or stub. A static and a learned stub are one kind with two sources, so a stub that changes its source names stub again. |
name_server |
string | no | The name server of the NS set of a primary, as POST /api/zones takes it. |
primaries |
array of string | no | The primaries of a stub that learns its servers from them, as POST /api/zones takes them. |
serial |
SerialScheme |
no | How the server moves the serial of a primary, as POST /api/zones takes it. |
servers |
array of NewStubServer |
no | The servers of a static stub, as POST /api/zones takes them. |
Converted
Section titled “Converted”What a convert answers.
| Field | Type | Required | Description |
|---|---|---|---|
carried |
array of string | yes | The keys of the old zone.toml that went over to the new one, other than name and kind, in the order of the old file. A table such as [transfer] counts as one key. |
command |
string | yes | The identifier that the convert was recorded under. |
dropped |
array of string | yes | The keys of the old zone.toml that the new kind does not take and that were dropped, in the order of the old file. |
revision |
integer | yes | The revision that the convert became. |
zone |
string | yes | The id of the zone after the change, so a client opens the right page. |
Created
Section titled “Created”A new token, shown once.
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | The public half, which is what the list shows and what revoking it names. |
token |
string | yes | The only copy that will ever exist. It is not stored and cannot be read again. |
CutEntry
Section titled “CutEntry”The servers of the zone cut at the name, as the walk of its route holds them: the walk from the root, or the walk of its stub.
| Field | Type | Required | Description |
|---|---|---|---|
failing |
boolean | yes | Whether every server of the zone is failing now. |
servers |
array of CutServer |
yes | The servers. Empty where store_names is off, because their names are names the caller did not send. |
ttl |
integer | yes | What is left of the time to live of the servers’ names. Zero where it ran out, which the cut outlives. |
CutServer
Section titled “CutServer”One server of a zone cut, and the addresses held for it.
| Field | Type | Required | Description |
|---|---|---|---|
addresses |
array of string | yes | |
name |
string | yes |
CutTotals
Section titled “CutTotals”How much the stores of zone cuts hold: the store of the walk from the root and that of the walk of each stub zone.
| Field | Type | Required | Description |
|---|---|---|---|
bytes |
integer | yes | |
cuts |
integer | yes | The names of the cuts, each once, though several stores hold it. |
Difference
Section titled “Difference”What a rollback to revision changes now, one page of files in the order of their paths.
| Field | Type | Required | Description |
|---|---|---|---|
files |
array of FileDifference |
yes | The files whose digests differ, each with every setting that differs and its two values. Empty for the running revision. |
next |
string | no | The after of the next page: the last file of this page. Absent on the last page. |
revision |
integer | yes | The revision of the path, whose content a rollback brings back. |
running |
integer | yes | The revision that runs, which the files are compared with. A later page can name another one where a change landed in between, and then the reader starts again. |
tag |
string | yes | The entity tag of the running revision, quotes and all, as If-Match takes it. A rollback sent with it after this preview answers 409 where anything changed in between. |
DiscoveryAnswered
Section titled “DiscoveryAnswered”One plain address with encrypted listeners, and whether the local zones give the name it.
| Field | Type | Required | Description |
|---|---|---|---|
address |
string | yes | |
answers |
boolean | yes |
DiscoveryCertificate
Section titled “DiscoveryCertificate”The three parts of the certificate report of discovery.
| Field | Type | Required | Description |
|---|---|---|---|
addresses |
array of DiscoveryUpgrade |
yes | Each plain address, and what a client that asks there can do: verified where the answer names the encrypted listeners at the address and the certificate holds the address, opportunistic where the answer names a DoT or DoQ listener there and the certificate does not hold the address, and none otherwise. DoH has no opportunistic profile. A public certificate on a private address reads opportunistic, which is the common case at home. |
answered |
array of DiscoveryAnswered |
yes | Each plain address with encrypted listeners beside it, and whether the local zones give name that address. |
valid_for_name |
boolean | yes | Whether the certificate holds name, which a client set up with the name by hand checks. |
DiscoveryHealth
Section titled “DiscoveryHealth”What a client that asks for the encrypted endpoints of this node is told.
The answer names the encrypted listeners on one plain address: the one address that the local
zones of the node give tls_server_name. A dashboard alerts on ok going false.
| Field | Type | Required | Description |
|---|---|---|---|
certificate |
DiscoveryCertificate |
no | What the certificate that serves gives a client that moves. Absent while no certificate serves. None of it changes ok: a certificate that holds the address and not the name is correct for a client that found the server by its address. |
local_answer |
array of string | yes | The addresses that the local zones of this node give the name. |
name |
string | yes | tls_server_name. |
ok |
boolean | yes | Whether problems is empty and a certificate serves. The answer names no listener while no certificate serves, such as before the first ACME order finishes. |
problems |
array of string | no | Why an address, a listener or the whole answer is not named, one sentence each. Absent where every encrypted listener on a plain address is named. |
sets |
array of string | yes | The plain address whose encrypted listeners the answer names. Empty where the answer names none. |
DiscoveryUpgrade
Section titled “DiscoveryUpgrade”One plain address, and what a client that found the server by it can do.
| Field | Type | Required | Description |
|---|---|---|---|
address |
string | yes | |
upgrade |
DiscoveryUpgradeKind |
yes | verified, opportunistic or none. |
DiscoveryUpgradeKind
Section titled “DiscoveryUpgradeKind”What a client that found this server by one plain address can do, by the certificate.
One of verified, opportunistic, none.
DnsClientAttempt
Section titled “DnsClientAttempt”One exchange over one transport.
| Field | Type | Required | Description |
|---|---|---|---|
age |
integer | no | The Age header of a DoH reply. The TTLs of the message stay as the server sent them. |
content_type |
string | no | The content type of a DoH reply, where it named one. |
dropped_datagrams |
integer | no | The datagrams that came back over UDP and did not answer. |
elapsed_us |
integer | yes | The microseconds of the attempt. That of the last attempt is “the time it took”. |
handshake_us |
integer | no | The microseconds of the handshake of TLS or QUIC, which elapsed_us holds. |
outcome |
DnsClientAttemptOutcome |
yes | |
problem |
string | no | What went wrong, for an outcome other than answered. |
size |
integer | no | The octets of the reply that came. |
status |
integer | no | The status of a DoH reply. |
transport |
DnsClientTransport |
yes |
DnsClientAttemptOutcome
Section titled “DnsClientAttemptOutcome”How one attempt ended.
One of answered, timeout, unreachable, refused, tls, http, malformed, local.
DnsClientCounts
Section titled “DnsClientCounts”The four counts of the header, as the server wrote them. A reply that is too-large keeps
them. The additional count holds the OPT record.
| Field | Type | Required | Description |
|---|---|---|---|
additional |
integer | yes | |
answer |
integer | yes | |
authority |
integer | yes | |
question |
integer | yes |
DnsClientEdns
Section titled “DnsClientEdns”The OPT record of the reply (RFC 6891).
| Field | Type | Required | Description |
|---|---|---|---|
dnssec_ok |
boolean | yes | The DO bit. |
extended_errors |
array of DnsClientExtendedError |
yes | The Extended DNS Errors that read, in their order (RFC 8914). |
options |
array of DnsClientOption |
yes | Every other option, in its order, by its code and its length. An option of code 15 that does not read as an Extended DNS Error is here too. |
payload_size |
integer | yes | |
version |
integer | yes |
DnsClientExtendedError
Section titled “DnsClientExtendedError”One Extended DNS Error.
| Field | Type | Required | Description |
|---|---|---|---|
code |
integer | yes | The INFO-CODE. |
name |
string | no | The name that the registry gives the code, where this server knows it. |
text |
string | yes | The extra text, empty where the option carries none. |
DnsClientFlags
Section titled “DnsClientFlags”The flags of the header (RFC 1035 section 4.1.1, RFC 4035 section 3.2).
| Field | Type | Required | Description |
|---|---|---|---|
aa |
boolean | yes | |
ad |
boolean | yes | |
cd |
boolean | yes | |
qr |
boolean | yes | |
ra |
boolean | yes | |
rd |
boolean | yes | |
tc |
boolean | yes |
DnsClientMessage
Section titled “DnsClientMessage”The message of the last attempt that answered.
| Field | Type | Required | Description |
|---|---|---|---|
additional |
array of DnsClientRecord |
yes | The additional section, without the OPT record, which is edns. Empty in a reply that is too-large. |
answer |
array of DnsClientRecord |
yes | The answer section. Empty in a reply that is too-large. |
authority |
array of DnsClientRecord |
yes | The authority section. Empty in a reply that is too-large. |
counts |
DnsClientCounts |
yes | |
edns |
DnsClientEdns |
no | The OPT record. Absent where the reply has none, and in a reply that is too-large. |
flags |
DnsClientFlags |
yes | |
id |
integer | yes | The ID of the reply. |
opcode |
string | yes | The opcode, such as QUERY, or OPCODE7 for one with no name. |
question |
array of DnsClientQuestion |
yes | The questions. Empty in a reply that is too-large. |
rcode |
string | yes | The response code, with the extended code of the OPT record joined in, such as NOERROR, BADVERS or RCODE23. |
DnsClientOption
Section titled “DnsClientOption”One option of the OPT record that is not an Extended DNS Error.
| Field | Type | Required | Description |
|---|---|---|---|
code |
integer | yes | |
length |
integer | yes | The octets of its value. |
DnsClientOutcome
Section titled “DnsClientOutcome”How the query ended: the outcome of its attempts, or one of the query itself.
One of answered, timeout, unreachable, refused, tls, http, malformed, local, unresolved, too-large.
DnsClientQuery
Section titled “DnsClientQuery”The body of POST /api/dns-client. [DnsClientQuery::read] reads it.
server and name are required, and their refusal names them. Every other field can be left
out, or be null, which reads as left out. A field that this body does not name is refused, and
so is a value of the wrong JSON type: both answer 422 unreadable-body, as every body of the
API, with words that repeat no part of the body.
| Field | Type | Required | Description |
|---|---|---|---|
checking_disabled |
boolean | no | The CD bit, false by default. |
class |
string | no | IN, the default, or CH. |
dnssec |
boolean | no | The DO bit of the OPT record, false by default. It needs edns. |
edns |
boolean | no | Whether the query carries an OPT record, true by default. |
name |
string | yes | The name, in ASCII. An internationalized name is sent as its A-label. |
payload_size |
integer | no | The payload size of the OPT record, 512 to 4096, 1232 by default. It needs edns. |
recursion |
boolean | no | The RD bit, true by default. |
server |
string | yes | The server: an address with a port or without, an entry of forwarders that starts with tcp://, tls://, https://, quic:// or h3://, or a host name, alone or after a scheme. |
tcp_after_truncation |
boolean | no | Whether a UDP reply with TC is asked again over TCP, true by default. |
timeout_ms |
integer | no | The time of one attempt in milliseconds, 100 to 5000, 3000 by default. |
transport |
string | no | udp, tcp, tls, https, quic or h3. udp by default, or the transport of the scheme of server, which it must agree with. |
type |
string | no | A type by its name, as TYPE and its number, or by its number alone. A by default. AXFR, IXFR, OPT, TKEY, TSIG, MAILA and MAILB are refused. |
DnsClientQuestion
Section titled “DnsClientQuestion”One question.
| Field | Type | Required | Description |
|---|---|---|---|
class |
string | yes | The class, such as IN or CH. |
name |
string | yes | The name, in the case that the server wrote, escaped as a zone file escapes it. |
type |
string | yes | The type, such as AAAA or TYPE65280. |
DnsClientRecord
Section titled “DnsClientRecord”One record of a section.
| Field | Type | Required | Description |
|---|---|---|---|
class |
string | yes | The class, such as IN or CH. |
data |
string | yes | The data in its presentation form. Data of a class other than IN is in the generic form of RFC 3597. |
not_addable |
NotAddableReason |
no | Why the record has no zone_line. Absent where it has one. |
owner |
string | yes | The owner, in the case that the server wrote, escaped as a zone file escapes it. |
ttl |
integer | yes | The TTL that the server sent, as a resolver reads it. A DoH reply keeps its TTLs, and its Age is in the attempt. A value of the wire with its top bit set reads as 0 (RFC 2181 section 8), here and in zone_line, and wire_ttl holds it. |
type |
string | yes | The type, such as MX or TYPE65280. |
wire_ttl |
integer | no | The TTL field as the wire holds it, where its top bit is set and ttl reads it as 0. The server broke RFC 2181 section 8 there. Absent for every other record. |
zone_line |
string | no | The line of the record for add of POST /api/zones/{id}/records, where a zone can hold the record. Absent otherwise, and not_addable says why. |
DnsClientReply
Section titled “DnsClientReply”What the route answers with 200: the server, the outcome, each attempt, and the message.
| Field | Type | Required | Description |
|---|---|---|---|
attempts |
array of DnsClientAttempt |
yes | |
message |
DnsClientMessage |
no | The message of the last attempt that answered. For too-large, its header part and its counts alone, with no question, no record and no edns. Absent where no attempt answered, where the octets do not read (malformed), and where no time was left to convert it (timeout). |
outcome |
DnsClientOutcome |
yes | |
problem |
string | no | What went wrong with the query itself, where the attempts do not say it. Absent where the query answered, and where the problem of the last attempt is the whole story. - too-large: the bound that the reply passed, such as “the text of the reply passes 1 MiB”. - malformed from the conversion: why the octets do not read. - timeout of the conversion: “no time was left to convert the reply”. - unresolved and refused of a host name: what the lookup gave, and the rule of each address. |
server |
DnsClientServer |
yes |
DnsClientServer
Section titled “DnsClientServer”The server that the query went to.
| Field | Type | Required | Description |
|---|---|---|---|
address |
string | no | The address that the query went to. Absent where no query left. |
certificate_name |
string | no | The name that the certificate must hold, for tls, https, quic and h3. |
host_name |
string | no | The host name that the request named, where it named one. |
path |
string | no | The path of a DoH server. |
port |
integer | yes | |
resolved |
array of string | yes | Every address that the lookup of the host name gave. Empty where the request named an address. |
DnsClientTransport
Section titled “DnsClientTransport”A transport of the DNS client.
One of udp, tcp, tls, https, quic, h3.
DnssecHealth
Section titled “DnssecHealth”What DNSSEC validation is doing.
A dashboard alerts on ok going false. One route that strips the signatures breaks every signed
name under it, and this server does not turn validation off by itself.
| Field | Type | Required | Description |
|---|---|---|---|
anchors |
AnchorsHealth |
no | The root keys that validation starts from, and how their refresh goes. |
negative_trust_anchors |
array of NegativeTrustAnchorHealth |
no | Each [[negative_trust_anchor]] of the running configuration, in the order of the file, and where it stands. Absent where the file holds none. An entry does not change ok, because an operator wrote it. |
no_answer |
array of string | no | The routes that brought no key back, named the same way. Nothing is known about these, and a route that drops the probe is not a route that passed it. Absent where every route answered. |
ok |
boolean | yes | Whether every route that validates answered the probe with the signatures, and the root keys are ok where anchors is present. |
signatures_stripped |
array of string | no | The routes that answered the root’s keys with no signature over them, by the suffix of a [[forward]] or upstreams for the ordinary route. Absent where no route did. |
EffectivePlace
Section titled “EffectivePlace”Where the store runs.
| Field | Type | Required | Description |
|---|---|---|---|
directory |
string | yes | The directory of telemetry.sqlite: a path of this server for a person to read, not for a program to parse. |
memory_mib |
integer | no | The room of a store in memory, which only a restart changes. Absent on the disk. |
storage |
TelemetryStorage |
yes |
EmptiedReason
Section titled “EmptiedReason”Why a store in memory started empty. The set is closed. A client that meets a word that it does not know, from a later build, shows it as other.
One of room, marker_unread.
EmptySource
Section titled “EmptySource”One source that is serving nothing, and why.
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | The id the configuration gave it. |
problem |
string | no | Why: a gate’s refusal with its numbers, or what could not be reached. What could not be reached is the text, with addresses and ports, for an admin and for a caller on the socket with no credential, and the words of its kind, with no address, for every other caller. Absent where the last pass worked, which is a source that holds nothing to serve. |
state |
AttemptState |
no | What the last pass over it ended as: read, unchanged, recompiled, refused, unreachable or failed. Absent where no pass has run under the settings this source names now, which is a source somebody just added and one whose settings just changed. |
unreached |
UnreachedKind |
no | Why the last pass reached no body, by kind, for every role, as LastAttempt.unreached of GET /api/blocking/sources gives it: the same 11 words. Absent where the list has no failed attempt with a kind, which is a list the last pass read, one a gate refused, a list nobody has read yet, and a record of a build before the kinds. |
EntryKind
Section titled “EntryKind”What a value of one type is.
One of records, no-records, failed, no-name.
ExpiryHealth
Section titled “ExpiryHealth”What blocks the expiry sweep, for the full health report: the zone clock and the gate once, and each zone whose sweep a check refused or a write failed. Absent where nothing blocks a record past its time.
| Field | Type | Required | Description |
|---|---|---|---|
checked_at |
integer | no | When the server last looked, in seconds since 1970. |
clock |
ZoneClockHealth |
no | The zone clock, where it holds a zone past its time, where it or the task of the sweep broke, or where a write of aging.clock failed. |
gate |
GateWord |
no | The verdict of the clock gate, wrong or unconfirmed, where it lets no record leave. |
zones |
array of ExpiryZoneHealth |
no | Each zone whose last sweep a rule or a check across files refused, or that failed. |
ExpiryZoneHealth
Section titled “ExpiryZoneHealth”A zone whose expiry sweep a check refused, or that failed.
| Field | Type | Required | Description |
|---|---|---|---|
blocked |
BlockedReason |
yes | rule, cross-file or failed. |
retry_at |
integer | no | When the server tries the zone again, in seconds since 1970, an estimate. |
zone |
string | yes | The id of the zone. |
ExportList
Section titled “ExportList”Which list an export writes.
One of allow, block.
Failure
Section titled “Failure”A change the server refused.
| Field | Type | Required | Description |
|---|---|---|---|
at |
integer | yes | When it was refused, in seconds since the Unix epoch. |
problem |
string | yes | Why it was refused, in the words the caller was given. |
revision |
integer | yes | The revision the refused change asked for. The number is spent: a refusal is in the history like anything else. |
FileChange
Section titled “FileChange”What changed in one file.
| Field | Type | Required | Description |
|---|---|---|---|
change |
Change |
yes | added, replaced or removed. |
file |
string | yes | The path in the config root. |
more_settings |
integer | no | How many settings past the first 32 differ, with each name longer than 256 bytes. Absent at 0. |
settings |
array of string | no | The settings that differ, by dotted name, for a file of settings whose texts both read as TOML. A table that one side alone holds gives its keys, or its own name where it is empty, because an empty table can mean something, as an empty [update.aging] turns aging on. An empty list means that only comments or the layout changed. Absent for a master file, for a file whose text did not read, and where the names did not fit in the row. |
FileDifference
Section titled “FileDifference”What a rollback changes in one file.
| Field | Type | Required | Description |
|---|---|---|---|
change |
Change |
yes | added for a file that the rollback brings back, removed for one that it deletes, and replaced for one whose content it changes. |
file |
string | yes | The path in the config root. |
settings |
array of SettingDifference |
no | Each setting that differs, for a file of settings whose two texts read as TOML. An empty list means that only comments or the layout differ. Absent for a master file, which holds records: a rollback can also move the serial of a zone whose records.zone is the same, and this does not show it. |
FlushCache
Section titled “FlushCache”What POST /api/cache/flush asks for: a name, a name and every name below it, or everything.
Unknown fields are refused, because a misread body here removes more than the caller meant. A
body with both name and all, with neither, or with all: false is refused too.
| Field | Type | Required | Description |
|---|---|---|---|
all |
boolean | no | true to flush everything. |
below |
boolean | no | With name, flush every name below it as well. false by default. |
name |
string | no | The name to flush, in ASCII. |
FlushCounts
Section titled “FlushCounts”How much a flush removed from each store.
| Field | Type | Required | Description |
|---|---|---|---|
answers |
integer | yes | Names of the answer cache, of every configuration, and names above that lost a denial. |
delegations |
integer | yes | Zone cuts. |
links |
integer | yes | Links of the chains of trust, which is what the signature check proved about a zone. |
spans |
integer | yes | Zones that lost the ranges of names that their checked denials prove absent. |
tailored |
integer | yes | Answers stored for one client network. |
Forward
Section titled “Forward”One [[forward]]: a suffix, and where the names inside it go.
It is how a house gets names for the machines the router knows about. The router holds the names it handed out, and this server holds nothing about them.
| Field | Type | Required | Description |
|---|---|---|---|
dnssec |
string | no | Whether this suffix is validated: validate, which is the default, or insecure for a local zone with no chain to the root. A validating resolver treats unsigned data from a zone the public tree does not hold as bogus, and answers SERVFAIL for every name in it. |
note |
string | no | Why this suffix is insecure, in your own words. It shows in the file, on the API and in the log, and no client receives it. 255 bytes at most, no control characters, and only on an entry whose dnssec is insecure. |
rebind_protection |
boolean | no | Whether an answer from this destination that points at a private address is refused. On by default, the same as the setting of that name. Turn it off for a forward to a resolver on your own network, which answers private addresses for the names it handed out. It then applies to the names of this suffix alone, and a name outside the suffix in the same answer is still refused. |
suffix |
string | no | The name this entry is about, and every name under it, such as home.lan or 1.168.192.in-addr.arpa. The longest matching suffix wins. The root is refused, because that is what forwarders already means, and so are localhost and invalid. |
to |
array of string | no | Where to send a query for a name inside the suffix. Each destination takes a form of forwarders. A plain address takes a port after it, or defaults to 53, and so does tcp:// and an address, which asks over TCP alone. A tls://, https://, quic:// or h3:// entry holds its addresses in parentheses. One destination is required, and 8 addresses in all. One forward holds plain destinations or encrypted ones, not both. A wildcard address and a port of zero are refused. So is one of this machine’s own listeners, because a query to it comes back here and waits for itself. |
ForwarderCatalogEntry
Section titled “ForwarderCatalogEntry”One public service, a profile of one operator.
| Field | Type | Required | Description |
|---|---|---|---|
as_of |
string | yes | The date that the operator’s pages were read, YYYY-MM-DD. |
dnssec |
ForwarderStated |
yes | Whether it validates DNSSEC. |
ecs |
ForwarderStated |
yes | Whether it sends EDNS Client Subnet onward. |
entries |
array of ForwarderTransportEntries |
yes | For each transport that it offers, the entries that reach it. |
filters |
array of ForwarderFilter |
yes | What it refuses to answer. Empty where it filters nothing. |
homepage |
string | yes | The page of the service, https. |
id |
string | yes | The name of the profile, unique in the table, such as quad9-secure. |
in_use |
array of ForwarderTransport |
yes | The transports whose every entry stands in one list of the running revision: the forwarders list, or the to of one [[forward]]. Two entries are the same where they read to the same transport, name, port, path and set of addresses. The order does not count. |
operator |
string | yes | Who runs the service. |
privacy |
string | yes | The page of its privacy policy, https. |
service |
string | yes | The name of the service, from the page of its operator. |
ForwarderFilter
Section titled “ForwarderFilter”What a service refuses to answer.
One of malware, adult, ads.
ForwarderStated
Section titled “ForwarderStated”What the pages of the operator say about a property of a service.
One of yes, no, unknown.
ForwarderTransport
Section titled “ForwarderTransport”The transport of an entry of forwarders.
One of udp, tcp, tls, https, quic, h3.
ForwarderTransportEntries
Section titled “ForwarderTransportEntries”The entries of forwarders that reach a service over one transport.
| Field | Type | Required | Description |
|---|---|---|---|
entries |
array of string | yes | The entries, each as an entry of forwarders is written. A plain service has one entry for each address. An encrypted one has one entry, with its addresses in parentheses. |
transport |
ForwarderTransport |
yes | The transport of every entry of the list. |
Frozen
Section titled “Frozen”What a freeze answers.
| Field | Type | Required | Description |
|---|---|---|---|
serial |
integer | yes | The serial of the zone at the freeze, which the edited file must pass where its records change. |
since |
integer | yes | When the freeze was made, in seconds since 1970. |
zone |
string | yes | The id of the zone. |
FullReason
Section titled “FullReason”Why a store in memory is full. The set is closed. A client that meets a word that it does not know, from a later build, shows it as other.
One of allowance, mount, sqlite, checkpoint.
GateWord
Section titled “GateWord”The verdict of the clock gate.
One of wrong, unconfirmed.
What a change gives that an admin alone gives, for one source.
The set is closed: a client that meets another word reads it as a grant it does not know.
One of private, proxied, proxy.
GrantedSource
Section titled “GrantedSource”One source of a 403 needs-admin: its id, and what the change gives that an admin alone gives.
| Field | Type | Required | Description |
|---|---|---|---|
grant |
Grant |
yes | What the change gives for it. |
id |
string | yes | The id of the source, as blocking.toml names it. |
GroupSources
Section titled “GroupSources”What the sources of a client group wrote: every enabled source, or a list of ids.
One of all, named.
Health
Section titled “Health”Whether the server is answering, and what it is answering with.
| Field | Type | Required | Description |
|---|---|---|---|
blocking |
BlockingHealth |
no | What the lists are doing, where this build keeps them current. |
blocking_disabled |
BlockingState |
no | The switch and the setting enabled of blocking.toml, while blocking is not in force, and absent while it is. Blocking is not in force while the switch is off or the setting is false, and state and enabled say which. The same reason as last_failure: a dashboard alerts on this appearing rather than on reading its value, so the common case, blocking in force, says nothing about it at all. It does not depend on blocking, which is absent where no task keeps the lists current. |
certificates |
array of CertificateHealth |
no | Each certificate that the encrypted listeners serve, or wait for. Absent where node.toml names no certificate files and no ACME names. |
clock |
ClockHealth |
no | How far the server trusts the wall clock for DNSSEC. Present on every running server, in every state, whether or not anything validates. |
discovery |
DiscoveryHealth |
no | The encrypted endpoints this node names to a client that asks plain DNS for _dns.resolver.arpa, and why it names none where it does not. Absent where node.toml names no tls_server_name, turns advertise_encrypted off, or names no address in tls_listen, https_listen, quic_listen or http3_listen. |
dnssec |
DnssecHealth |
no | What DNSSEC validation is doing, where it is on. Absent where no route validates, and before the first probe of a start finishes. |
expiry |
ExpiryHealth |
no | What blocks the removal of records at their expiry times: the zone clock and the clock gate once, and each zone whose last sweep a check refused or that failed. Absent where nothing blocks, and on the answer that needs no credential. |
last_failure |
Failure |
no | The newest change that was refused, when there is one. A monitoring system asks this: something tried to change the configuration and the server would not have it. Without it, a refusal lives only in a log line nobody is reading. |
listen |
array of string | yes | Each entry of listen, as node.toml writes it back: the address with its port, and @ with the device after them for an entry that names one, such as "192.0.2.1:53@eth0". |
listener_devices |
array of ListenerDeviceHealth |
no | Each served listener with a device whose sockets do not all hold the index of the device of the name of its entry, as the server last read them, every 10 seconds. It lists the faults that a read saw, not every listener. A socket on an index that no device has takes no query. A restart binds the device of the name, once a device has it. It gives the kernel index of the device of the sockets, the index of the device that has the name now, and the new name of a renamed device. Absent where every socket holds the device of its name, on a system that is not Linux, and on the answer that needs no credential. |
live |
boolean | yes | Always true in a response: a server that cannot answer this does not answer at all, which is the only honest liveness check. |
query_log |
QueryLogHealth |
yes | The state of the query log: opening while the database opens, ready once it is open, and off when it did not open or this build has no query log. The server answers DNS in all three. A write that fails after ready shows as lost rows in the server log, not in this field. |
revision |
integer | yes | The generation the query path is using. |
secrets |
array of SecretHealth |
no | Each secret of the node that is unreadable, not absent, with the word of why. No setting reads a secret of the node yet. Fix the owner or the mode of the file, or remove it. Absent where every secret is set or not set, and on the answer that needs no credential. |
telemetry |
TelemetryHealth |
no | Where the query log is asked to run and where it runs, and why it is off, full, unmeasured, started empty or beside an old copy. Absent on the answer that needs no credential, and where this build has no query log. |
upstreams |
integer | yes | How many upstreams are configured. |
zones |
array of ZoneHealth |
no | Each zone that takes no dynamic update as its journal says, with the reason, and each zone turned off. A zone turned off answers no name, a stopped zone answers SERVFAIL for every name in it, a zone at its files answers from its files, and the answers of an unsettled zone can hold an update that did not finish. A frozen zone answers as before until its thaw, and carries a note where it has been frozen for more than a day. None of them takes a dynamic update. Absent where every zone takes updates. |
HoldEndWord
Section titled “HoldEndWord”How a hold of the zone clock ends.
One of quiet, resume.
One hour of the aggregates.
| Field | Type | Required | Description |
|---|---|---|---|
authoritative |
integer | no | How many this server answered from a zone that it holds: a local answer with the AA bit. At most local. An alias of a zone that an upstream finished counts in forwarded or recursed alone. A question of an older build has no AA bit, so the count can be short in the hour of an upgrade. Absent for an hour that an older build counted. |
behind |
boolean | yes | Whether the hour answers what was folded of it, though rows of it wait that the answer did not count: the hour holds more than 30 000 rows, or the read waited a second for another count. Such an hour can be minutes behind the query log, and counting is true too. It is false for an hour counted from the query log, which is 10 seconds behind it at most, and for every hour that the folding has reached. One exception: after a restart, until the first fold reaches the rows that the server wrote since, the read cannot tell which rows of an hour of more than 30 000 rows wait, so such an hour can read true though it is folded. |
blocked |
integer | yes | How many of them a blocklist answered. |
cached |
integer | yes | How many the cache answered without asking anybody. |
counting |
boolean | yes | Whether the hour is still being counted. It is true for the hour that holds now, and for the hour before it where rows of it wait for a fold. Such an hour comes from the query log, up to 10 seconds behind it, or from what was folded of it where the hour holds more than 30 000 rows or the read waited a second for another count. behind tells the two apart. An hour that reads false can still change: a later fold, or a row written late into it, can move its counts. |
devices |
integer | no | How many distinct devices asked. A client that clients.toml names counts once, whatever addresses it used. A client with no name counts once for each address, so a phone with temporary IPv6 addresses can count more than once. Absent for an hour where no question names a client, for an hour first counted with store_clients off, and for an hour that an older build counted. |
failed |
integer | yes | How many were answered with SERVFAIL, such as after a timeout or where no upstream answered. failures counts every code of a failure. |
failures |
integer | no | How many failed: not blocked, with a code other than NOERROR and NXDOMAIN. These are the rows that failure=true of GET /api/queries finds. failed counts SERVFAIL alone. Absent for an hour that an older build counted. |
forwarded |
integer | no | How many were asked upstream. Absent for an hour that an older build counted. |
hour |
integer | yes | The start of the hour, in milliseconds since the Unix epoch. |
kept |
Kept |
yes | What the rows that devices, p50_us, p95_us and p99_us of the hour rest on were kept as. The counts of the hour count every question, and this says nothing of them. |
local |
integer | no | How many answers this server wrote itself: those from a zone, and also a REFUSED or a SERVFAIL of its own. local less authoritative is the rest of them. Absent for an hour that an older build counted. |
one_in |
integer | no | The N of kept: one_in, from 2 to 1000. Absent for every other kept. |
p50_us |
integer | yes | How long an answer took, in microseconds, at the middle and the tail. Not an average: a small number of very slow answers is what a person notices, and it barely moves a mean. |
p95_us |
integer | yes | The slowest answer in the fastest 95 out of 100, in microseconds. |
p99_us |
integer | yes | The same for 99 out of 100, which is where a person notices. |
qtypes |
object | no | How many asked for each record type, by its name, such as A, AAAA or TYPE65280 for a number with no name. The 32 most frequent types of the hour, and other for the rest, so the counts sum to queries. A name of a type is upper case, so other is never one. Absent for an hour that an older build counted. |
queries |
integer | yes | How many queries arrived in that hour. |
rcodes |
object | no | How many were answered with each response code, by its name, such as NOERROR, SERVFAIL or RCODE23 for a number with no name. The 16 most frequent codes of the hour, and other for the rest, so the counts sum to queries. Absent for an hour that an older build counted. |
recursed |
integer | no | How many were walked from the root, in the recursive mode. Absent for an hour that an older build counted. |
stale |
integer | no | How many the cache answered past the time to live, because no current answer came. Absent for an hour that an older build counted. |
synthesized |
integer | no | How many were made from denials that the server proved before, with no query upstream. Absent for an hour that an older build counted. |
transports |
HourTransports |
no | How many came over each transport. Absent for an hour that an older build counted. |
HourTransports
Section titled “HourTransports”The questions of one hour by the transport that they came over.
A question with no transport counts in none of them: a question of an older build, and a
question written with store_clients off. So the sum can be less than queries.
| Field | Type | Required | Description |
|---|---|---|---|
h3 |
integer | yes | DNS over HTTPS on HTTP/3. 0 for an hour that a build that counted HTTP/3 as https counted, which counted those questions in https. |
https |
integer | yes | DNS over HTTPS on HTTP/2 or HTTP/1.1, doh.sock included. An hour that a build that counted HTTP/3 as https counted holds DNS over HTTPS on HTTP/3 here too. |
quic |
integer | yes | DNS over QUIC. |
tcp |
integer | yes | DNS over TCP. |
tls |
integer | yes | DNS over TLS. |
udp |
integer | yes | DNS over UDP. |
Identity
Section titled “Identity”Who somebody is, after they proved it.
| Field | Type | Required | Description |
|---|---|---|---|
csrf |
string | no | The value a page echoes in the x-csrf-token header, for a session. A bearer token needs none, because a browser does not send one by itself. |
expires_at |
integer | no | When the session ends, in seconds since the Unix epoch: eight hours after the login. A read of the session does not move it. Absent where no session started. |
id |
string | yes | The account’s immutable identifier, which is what a change to this account names. |
role |
AccountRole |
yes | admin, operator or viewer. |
user |
string | yes | The name that account logs in with. |
ImportInto
Section titled “ImportInto”Where the entries of an import go.
One of allow, block, regex.
What runs: the version of the binary and of the API, the build, and since when.
| Field | Type | Required | Description |
|---|---|---|---|
build |
string | no | The commit of the build, absent where the build did not know it. |
contract |
string | yes | The version of the API, the same as info.version of the OpenAPI document. |
node |
string | no | The name of the node: name of node.toml, or else the host name of the machine. Absent with neither. |
started_at |
integer | yes | The wall clock at the start of the process, in seconds since the Unix epoch. |
update |
Update |
no | What the update check found. Present only while update_check of node.toml is on. |
uptime_seconds |
integer | yes | The seconds since the start, by the monotonic clock. A move of the wall clock leaves it alone. |
version |
string | yes | The version of the binary. A release names its version, such as 0.1.0, and a build of main names the version and the number of its run, such as 0.1.0-dev.42. |
waits_for_restart |
array of string | no | The settings of the running revision whose change waits for a restart, in the order of the rules of node.toml. Absent while none waits. |
What the rows behind a figure were kept as, under keep_one_row_in of server.toml.
A log that keeps one question in N as a row counts every other question, so the counts stay exact. A list, a count of devices and the percentiles of an hour rest on the rows, and a row kept one in N stands for N questions, so those figures are estimates.
all: every question is a row, so nothing is estimated.one_in: each row was kept as one question inone_in, and weighs that many.mixed: the rows were kept under more than one N, or beside questions skipped under an N that no row shows, or in an hour that an older build counted while it kept one question in N.counts_alone: no row holds an N, so the questions are counted and no list names them. They are inotheralone. Such an hour has no devices, and its percentiles come from the counts.
A change between two N above 1 does not start the count of the questions again. So at each such
change, at most (old N - 1) + (new N - 1) questions, on both sides of the change, can be counted
in an hour whose rows show the other N, or in an hour of counts alone. The first hour reads
one_in with the N of its rows. A range that holds the hour of counts alone and hours of the
other N reads one_in with that N.
One of all, one_in, mixed, counts_alone.
LastAttempt
Section titled “LastAttempt”What the last pass over one source did.
| Field | Type | Required | Description |
|---|---|---|---|
at |
integer | yes | When that pass ran, in seconds since the epoch. A recompile of the stored body is a pass, and nothing was asked of the source in it. |
declared_expiry |
integer | no | The expiry the publisher declared in the body that pass read, in minutes. |
problem |
string | no | Why that pass kept nothing, where it kept nothing. A gate’s own numbers, or what could not be reached. What could not be reached is the text, with addresses and ports, for an admin and for the server’s own uid or root on the socket with no credential. Every other role reads the words of unreached, which name no address. |
refused |
string | no | The body that pass refused, hashed, where this server read the whole of it. What POST /api/blocking/sources/{id}/accept names. A read that stopped at the size limit has none, because half a body has no checksum. |
same_body_as |
string | no | Another source that held the same body in that pass. One list under two names counts its names twice in every report. It is what that pass saw rather than a statement about now: two sources read in different passes are not compared. |
state |
AttemptState |
yes | What it ended as: read, unchanged, recompiled, refused, unreachable or failed. |
stored |
boolean | no | Whether the content that pass made current also reached the disk. False is a full disk or a permission: the set is serving and a restart will not have it. |
succeeded_at |
integer | no | When the source itself last answered, in seconds since the epoch. A 304 counts, because the origin answered. A recompile of the stored body does not: nothing was asked of the source, and counting it would report a host that has been down for a week as fresh. |
unreached |
UnreachedKind |
no | Why that pass reached no body, by kind, for every role: inside (an address inside this network, which a source reaches only with private = true), redirected_inside, forbidden (an address no source reaches), unresolved, unconnected, proxy, status, redirects, answer, file or defect. Absent where the pass kept a body, where a gate refused it, and for a record of a build before the kinds. The set of words is closed. |
LastTryRow
Section titled “LastTryRow”The last try of a learned stub that ended.
| Field | Type | Required | Description |
|---|---|---|---|
at |
integer | yes | When the try ended, in seconds since 1970. |
detail |
string | yes | The words of the server, at most 512 bytes: the primary that answered and the servers that it taught, or each primary and why it failed, such as a refusal or a timeout. |
outcome |
TryOutcome |
yes | How it ended. |
Latency
Section titled “Latency”How long the answers of a range of hours took, at the middle and at the tail.
| Field | Type | Required | Description |
|---|---|---|---|
answers |
integer | yes | How many answers the figures count: the questions of the hours of the range that keep their bands of time. |
behind |
boolean | yes | Whether an hour of the range answers what was folded of it, though rows of it wait that the figures do not count: the hour holds more than 30,000 rows, or another read counted it for longer than 1 second. The figures can then be minutes behind the query log, and they hold none of the questions of such an hour before its first fold. counting is true too. |
counting |
boolean | yes | Whether an hour of the range is still being counted, as counting of GET /api/stats/hourly: the hour that holds now, or the hour before it while the folding has not reached all of its rows. Such an hour is counted from the query log, up to 10 seconds behind it. Where the hour has more than 30,000 rows, or another read counts it for longer than 1 second, it answers what was folded of it, which can be minutes behind, and none of its questions before its first fold. It is true then too, and behind says so. |
p50 |
LatencyBand |
no | The band of time that holds the median: at least half of the answers took less than its to_us, and fewer than half took less than its from_us. Absent where answers is 0. |
p95 |
LatencyBand |
no | The band that holds the 95th percentile, the same way. |
p99 |
LatencyBand |
no | The band that holds the 99th percentile, the same way. |
queries |
integer | yes | How many questions the range holds, as GET /api/stats/hourly sums them. More than answers where an hour keeps no bands: an hour that an older build counted, before the bands, and that no new row has reached; an hour of 2^31 questions or more; an hour with a negative time, which only a damaged file holds; and an hour whose bands in the file do not read, or do not sum to its questions. Such an hour can come after since too. |
since |
integer | no | The start of the oldest hour of the range that keeps bands, in milliseconds since the Unix epoch. Absent where no hour of the range keeps them. |
LatencyBand
Section titled “LatencyBand”One band of time: the answers that took at least from_us and less than to_us.
| Field | Type | Required | Description |
|---|---|---|---|
from_us |
integer | yes | The lower edge, in microseconds, inside the band. 0 for the band under 100 µs. |
to_us |
integer | no | The upper edge, in microseconds, outside the band. Absent for the last band, 10 s and more. |
LineOutcome
Section titled “LineOutcome”What one line did: applied where it acted, in_effect where the zone was as it says.
One of applied, in_effect.
ListCounts
Section titled “ListCounts”What the reader made of a refused list.
The counts of a source report, with the three that the sort makes optional: a gate that refuses the list before the sort leaves them unknown, and they are then absent rather than 0.
| Field | Type | Required | Description |
|---|---|---|---|
cancelled |
integer | no | Rules a $badfilter line in the same list took out. Absent where the list was refused before the sort. |
cancels_unmatched |
integer | no | Cancellations that matched no rule in this list. Absent where the list was refused before the sort. |
candidates |
integer | yes | Lines the reader was meant to make a rule of. |
duplicates |
integer | no | Lines whose rule was already there. Absent where the list was refused before the sort. |
ignored |
integer | yes | Comments, blank lines and real hosts mappings. |
invalid |
integer | yes | Lines that look like a rule and hold no usable name. |
lines |
integer | yes | Lines in the list, which is what wc -l says. |
unread |
UnreadCounts |
yes | Which shapes the unsupported lines were. |
unsupported |
integer | yes | Lines in a syntax this build does not read. |
ListImported
Section titled “ListImported”The answer of an import.
Three forms. A revision that this request made gives revision, command, added, already,
and address where an added ;reply=IP rule answers with the address of blocking.toml. A
keyed repeat gives revision and command of the first try, with repeat: true, and no counts,
because the ledger keeps the revision and the command alone. A file that adds nothing, sent with
no key, gives the revision that runs, added: 0, already and unchanged: true, and no
command.
| Field | Type | Required | Description |
|---|---|---|---|
added |
integer | no | How many names or rules of the file this added. Absent on a repeat. |
address |
string | no | With into=regex, the address that the added ;reply=IP rules answer with, as blocking.toml names it. Absent otherwise, and on a repeat. |
already |
integer | no | How many names or rules of the file were there already, or twice in the file. Absent on a repeat. |
command |
string | no | The command of the change, or of the first try on a repeat. A keyed file that adds nothing has one too, because it makes a revision of its own. Absent only where the request had no key and the file added nothing. |
repeat |
boolean | no | True for the answer of a keyed repeat. Absent otherwise. |
revision |
integer | yes | The revision that the import made, or the one that runs where nothing changed. |
unchanged |
boolean | no | True where the request had no key and the revision that runs holds every name or rule of the file. Absent otherwise. |
ListShrinks
Section titled “ListShrinks”409 list-shrinks: the list keeps fewer of the rules that serve now than min_share_percent
asks. The same request with accept set to checksum takes it.
| Field | Type | Required | Description |
|---|---|---|---|
before |
integer | yes | The rules of the set that serves now. |
checksum |
string | yes | The blake3 checksum of the list, 64 hexadecimal digits, the form of last_attempt.refused. |
counts |
ListCounts |
yes | What the reader made of the list, with the numbers of the sort. |
detail |
string | yes | The numbers of the gate, in the words of last_attempt.problem for the same refusal. |
kept |
integer | yes | retained as a percentage of before. |
retained |
integer | yes | How many of before the list still holds. |
rules |
integer | yes | The rules of the action of the source that the list holds. |
share |
integer | yes | The percentage that the source must keep. |
status |
integer | yes | 409. |
title |
string | yes | The same sentence for every list of this kind. |
type |
string | yes | /problems/list-shrinks. |
ListUnusable
Section titled “ListUnusable”422 list-unusable: a gate refuses the list as one this server cannot use.
| Field | Type | Required | Description |
|---|---|---|---|
bytes |
integer | no | too_large: the bytes of the list. too_big: the bytes of its compiled set. |
candidates |
integer | no | not_a_list: the lines that were meant to be rules. |
counts |
ListCounts |
no | What the reader made of the list. Absent for too_large, which refuses the list before it is read. A gate that refuses before the sort, not_a_list, leaves out the numbers of the sort. |
declared |
integer | no | drifted: the count of entries that the header of the list declares. |
detail |
string | yes | The gate and its numbers, in the words of last_attempt.problem for the same refusal. |
floor |
integer | no | too_few: the fewest rules the source is allowed. |
gate |
UnusableGate |
yes | The gate that refuses the list. The members below that the gate fills are present, and the others are absent. |
invalid |
integer | no | not_a_list: the lines that are not names. |
limit |
integer | no | The bound of the gate. Bytes for too_large and too_big, and a percentage for not_a_list and drifted. |
read |
integer | no | drifted: the lines that were meant to be rules, which the declared count is held to. |
rules |
integer | no | too_few: the rules of the action of the source that the list holds. |
short |
integer | no | drifted: how far read is below declared, as a percentage. |
status |
integer | yes | 422. |
title |
string | yes | The same sentence for every list of this kind. |
type |
string | yes | /problems/list-unusable. |
ListUploaded
Section titled “ListUploaded”The answer of an upload.
Three forms. A revision that this request made gives revision, command, source, created
and counts. A keyed repeat gives revision, command and source of the first try, with
repeat: true. The same text and the same source as they run, sent with no key, give the
revision that runs, source, counts and unchanged: true, and no command. The pass that
the revision wakes reads the list next, and GET /api/blocking/sources says what it did. With
accept, the applied and the unchanged forms also say accepted, whether the pass that takes
the list published it, or pass_running: true with the status 202, where it still runs: it
ends after the answer, and GET /api/blocking/sources says whether it published.
| Field | Type | Required | Description |
|---|---|---|---|
accepted |
boolean | no | With accept, whether the pass that takes the list published it within the request: false where the pass did not publish it, where it did not start because another pass held the lists, and where nothing keeps the lists current. Absent without accept, on a repeat, and while the pass still runs. |
command |
string | no | The command of the change. Absent where nothing changed. |
counts |
SourceCounts |
no | What the reader made of the list, as the check read it. Absent on a repeat, because the first answer is not kept. |
created |
boolean | no | Whether the upload added the [[source]]. Absent on a repeat and where nothing changed. |
pass_running |
boolean | no | True, with the status 202, where the pass that takes the list still runs at the answer. It ends after the answer, and GET /api/blocking/sources says whether it published. Absent otherwise. |
repeat |
boolean | no | True for the answer of a keyed repeat. Absent otherwise. |
revision |
integer | yes | The revision that the upload made, or the one that runs where nothing changed. |
source |
string | yes | The id of the source. |
unchanged |
boolean | no | True where the request had no key and the revision that runs holds this text for this source. Absent otherwise. |
ListenSetting
Section titled “ListenSetting”The six DNS listen lists of node.toml. The set is closed.
One of listen, tls_listen, https_listen, http_listen, quic_listen, http3_listen.
ListenerDeviceHealth
Section titled “ListenerDeviceHealth”A served listener with a device, where the last read saw at least one socket that does not hold the index of the device of the name of its entry.
| Field | Type | Required | Description |
|---|---|---|---|
listener |
string | yes | The entry of the bind, as node.toml writes it: the address with its port, and @ with the device that the sockets were bound to. |
restart |
string | no | The entry that a restart binds, where the revision in force names another device for the address. It comes with the next read after the revision. Absent where the revision names the device of the bind. |
setting |
ListenSetting |
yes | The list of the entry in node.toml. |
sockets |
SocketCountsHealth |
yes | The live sockets of the listener that the read saw. |
states |
array of ListenerDeviceStateHealth |
yes | Each state of the sockets that do not hold the device, with their count. Never empty. |
ListenerDeviceState
Section titled “ListenerDeviceState”What the kernel showed of a socket that does not hold the index of the device of the name of its entry. The set is closed. A client that meets a word that it does not know, from a later build, shows it as other.
One of gone, made_again, renamed.
ListenerDeviceStateHealth
Section titled “ListenerDeviceStateHealth”The sockets of a listener in one state.
| Field | Type | Required | Description |
|---|---|---|---|
index |
integer | yes | The index of the device that these sockets hold. |
name |
string | no | The name that the device of index has now. Present for renamed alone. |
named |
integer | no | The index of the device that has the name of the entry now. Present for made_again, and for renamed where a device has the name. Absent for gone. |
sockets |
SocketCountsHealth |
yes | The sockets in this state. |
state |
ListenerDeviceState |
yes | What the kernel showed of these sockets. |
Liveness
Section titled “Liveness”The open answer of /api/health on a TCP door, to a caller with no credential.
| Field | Type | Required | Description |
|---|---|---|---|
live |
boolean | yes | Always true: a server that cannot answer this does not answer at all. |
LogLevel
Section titled “LogLevel”The level of a line, as the JSON names it.
One of error, warn, info, debug, trace.
LogLine
Section titled “LogLine”One line of a page, as a view of a line of the ring.
| Field | Type | Required | Description |
|---|---|---|---|
at_ms |
integer | yes | The time of the event, in milliseconds since 1970. |
level |
LogLevel |
yes | |
line |
string | yes | The line as the log wrote it, in the form of log_format, with no line end. A line longer than 64 KiB is its first 64 KiB, with the mark [cut at 64 KiB] at its end. |
seq |
integer | yes | The place of the line in the order of the ring. |
target |
string | yes | The target of the event, such as tadoru::listeners. |
LogPage
Section titled “LogPage”The answer of GET /api/logs.
| Field | Type | Required | Description |
|---|---|---|---|
gap |
integer | yes | For after: the lines that left the ring between the cursor and its oldest line. |
lines |
array of LogLine |
yes | Newest first for no cursor and for before, oldest first for after. |
lost |
integer | yes | The lines that never reached the ring since the start of the server. |
more_newer |
boolean | yes | For after: more newer lines match than the page holds, so newer names its newest line. For before: the ring holds a line newer than the page. |
newer |
string | no | The cursor to send in after at the next poll. With no cursor: the newest line of the ring, absent where the ring is empty. After a cursor: the newest line of the page where more lines match, else the newest line of the ring, and never below the cursor, so it is the cursor itself where the ring holds nothing newer, an empty ring too. Before a cursor: the newest line of the page, absent where the page is empty, whatever the ring holds. A read with no cursor gives the newest page, so a console with no newer starts from it. |
older |
string | no | For no cursor and for before: the cursor of the oldest line of the page, where older lines match. Absent where none does, and for after. |
oldest_at_ms |
integer | no | The time of the oldest line that the ring holds, in milliseconds since 1970. Absent where the ring is empty. |
reset |
boolean | yes | The cursor was of another run of the server, so the page is the newest lines. Drop the loaded lines and start again from newer. |
stopped |
boolean | yes | The thread of the log ended in a panic, so no new line comes until a restart. |
What a login is asked for.
| Field | Type | Required | Description |
|---|---|---|---|
password |
string | yes | The password. A wrong one costs the same time as a name that does not exist. |
user |
string | yes | The name the account logs in with. |
NameDenied
Section titled “NameDenied”The denial of the whole name: it does not exist, for any type.
| Field | Type | Required | Description |
|---|---|---|---|
soa |
string | no | The SOA the denial came with, as one master file line. Absent for a denial that came with no SOA. |
stale |
boolean | yes | |
ttl |
integer | yes | |
validation |
ValidationState |
yes |
NegativeTrustAnchor
Section titled “NegativeTrustAnchor”One [[negative_trust_anchor]]: a suffix that is not validated until a time.
It changes whether an answer is validated, and not where a query goes. So a name under it goes to the upstream or the zone it went to before.
| Field | Type | Required | Description |
|---|---|---|---|
note |
string | no | Why, in your own words. It shows in the file, on the API and in the log. Every client that asks for a name under the suffix receives it too, in the text of Extended DNS Error 33, so write nothing private. 255 bytes at most, and no control characters. |
probe |
boolean | no | Whether a later release asks the suffix again from time to time, and ends the entry early once its answers validate. This release reads it and does nothing with it. On by default. |
suffix |
string | no | The name this entry is about, and every name under it, such as broken.example. The root is refused, and so is a name at or below a zone of your own, which answers before any validation. |
until |
string | no | When the entry ends: a TOML date and time with an offset, such as 2026-10-01T18:00:00Z. The file also takes the same text in quotes, and the API answers it in UTC. Required. An entry past it does nothing, and it stays in the file until you remove it. A change refuses a new or changed until that is not in the future, or that is more than 7 days after the change. |
NegativeTrustAnchorHealth
Section titled “NegativeTrustAnchorHealth”One negative trust anchor: a suffix taken out of DNSSEC validation until a time.
| Field | Type | Required | Description |
|---|---|---|---|
note |
string | no | The reason the file gives. Absent where it gives none. |
state |
NegativeTrustAnchorState |
yes | waiting, active, lifted or expired. active is an entry that takes its suffix out of validation now. waiting is an entry before its until that no probe lifted, while the clock is not trusted, so it does not act yet. lifted is an entry that a probe ended before its until, because its names validate again. A lift stays while the clock is not trusted. expired is an entry past its until, which does nothing. |
suffix |
string | yes | The suffix, as a name that ends in a dot. |
until |
integer | yes | When the entry ends, in seconds since the Unix epoch. |
NegativeTrustAnchorState
Section titled “NegativeTrustAnchorState”Where an entry of negative_trust_anchors.toml stands.
One of waiting, active, lifted, expired.
NewAccount
Section titled “NewAccount”An account to make.
| Field | Type | Required | Description |
|---|---|---|---|
display |
string | no | The name to show a person instead of the login name. At most 128 characters and no control characters. |
name |
string | yes | The name to log in with: lower case letters, digits, and - _ ., at most 64 characters. Refused otherwise, so that one person cannot become two accounts. |
role |
string | yes | admin, operator or viewer. Required: there is no safe one to assume. |
NewPassword
Section titled “NewPassword”What a password change is asked for.
| Field | Type | Required | Description |
|---|---|---|---|
current |
string | no | The password being replaced. Required for your own password, and ignored for an administrator setting somebody else’s. |
password |
string | yes | The new password, at least 12 characters. |
NewStubServer
Section titled “NewStubServer”One server of a new static stub.
| Field | Type | Required | Description |
|---|---|---|---|
addresses |
array of string | no | Its addresses, where it is inside the zone, and only then. Eight at most. |
name |
string | yes | The name of the server, as the NS set names it: an absolute name in ASCII, with an A-label for a label outside ASCII. It is never read under the apex, so dc1 is the name dc1. and not a server of the zone. |
NewToken
Section titled “NewToken”What a new token is asked for.
| Field | Type | Required | Description |
|---|---|---|---|
label |
string | no | What it is for, in your words, at most 200 characters. Shown in the list, so that revoking the right one does not need a guess. |
NewZone
Section titled “NewZone”A new zone: a primary, whose records.zone comes from [zones] of server.toml, or a stub
zone, whose servers the request names or whose primaries it learns them from.
| Field | Type | Required | Description |
|---|---|---|---|
addresses |
array of string | no | The addresses of the name server of a primary, where it is inside the zone, and only then. Sixteen at most. A stub takes no addresses, not even an empty list. |
id |
string | yes | The id of the zone, the name of its directory under zones/: lower-case letters, digits and hyphens, 40 at most. |
kind |
NewZoneKind |
no | primary, the default, or stub. |
name |
string | yes | The apex of the zone, an absolute name in ASCII. A label outside ASCII is written as its A-label, which starts with xn--. |
name_server |
string | no | The name server of the NS set of a primary, an absolute name in ASCII. Left out, zones.name_server of server.toml. |
primaries |
array of string | no | The primaries of a stub that learns its servers from them, as primaries of zone.toml takes them: an address, with a port after it or without one for 53. One to eight. A stub takes primaries or servers, not both, and a primary takes neither, not even an empty list. |
serial |
SerialScheme |
no | How the server moves the serial of a primary, as serial of its zone.toml. The first serial is the step of this scheme from 0. Left out, zones.serial of server.toml, and zone.toml names none. A stub moves no serial, so it takes no serial. |
servers |
array of NewStubServer |
no | The servers of a static stub, which its records.zone keeps: the NS set of its apex, and the addresses of each server inside the zone. One to eight. |
NewZoneKind
Section titled “NewZoneKind”What kind of zone POST /api/zones makes, or a convert of a zone turns it into.
One of primary, stub.
node.toml: what this machine does.
| Field | Type | Required | Description |
|---|---|---|---|
acme_challenge |
string | no | How the authority checks that the names are yours. "http-01" asks on port 80 of acme_http_listen, and "tls-alpn-01" asks on the TLS listeners. "dns-01" asks for a TXT record in a zone of this server, which the server writes and removes. The default is "http-01". |
acme_contact |
array of string | no | The mailto: addresses of the account at the authority. Empty by default. |
acme_directory |
string | no | The ACME authority: "letsencrypt", "letsencrypt-staging", or the https:// URL of a directory. The default is "letsencrypt". |
acme_dns01_skip |
array of string | no | The addresses that the wait of dns-01 does not ask, such as the public address of a router with no NAT loopback, which drops a query from inside to its own public address. IP addresses with no port, up to 16. Empty by default, and a non-empty list needs acme_challenge to be "dns-01". |
acme_http_listen |
array of string | no | Where to answer the HTTP-01 challenge, on TCP for every entry. An address with a port after it, or without one to default to 80. The rules of tls_listen apply, but an entry takes no device, and an address and port of another TCP listener cannot also be here. One of http_listen can, and then answers both. Empty by default, and "http-01" needs one. |
acme_names |
array of string | no | The names on the certificate that the server gets and renews from an ACME authority, such as Let’s Encrypt. A host name per entry, up to 100. An IP address and a name written twice are refused. A wildcard, one *. label before a host name, needs acme_challenge to be "dns-01". Empty by default, which turns ACME off. A non-empty list cannot go with tls_certificate_file or tls_pkcs12_file, and it needs acme_terms_agreed and a TLS listener. |
acme_terms_agreed |
boolean | no | Whether you read the terms of the authority and agree to them. false by default, and a non-empty acme_names needs true. |
advertise_encrypted |
boolean | no | Whether this node answers _dns.resolver.arpa with its encrypted endpoints, where tls_server_name names it. true by default. |
allow_recursion |
array of string | no | Which clients this server resolves for. An address or a subnet per entry, up to 64, and a query from anywhere else is answered REFUSED. An entry that starts with !, such as !10.1.0.0/16, denies its range inside a wider entry, and the entry with the longest prefix that holds a client decides. The default is loopback and the private ranges. An empty list resolves for nobody, which is a server that answers its own zones alone. |
api_client_header |
string | no | The header a proxy of api_trust names the client in. The default is "X-Forwarded-For". |
api_listen |
array of string | no | Where to serve the management API alone, over TLS, for a script on another host. An address with a port after it, or without one to default to 8453. The rules of console_listen apply: a non-empty list needs a certificate source, and a wildcard address is refused. Each address serves TLS 1.3 alone. A caller there gets none of the trust that the socket gives its owner. Empty by default. The file also takes one address as a string, and "" as an empty list. |
api_trust |
array of string | no | The reverse proxies whose client header console_listen and api_listen believe. An address or a subnet per entry, up to 16, and empty by default. An entry that starts with !, such as !192.168.1.66, denies its range inside a wider entry, and the entry with the longest prefix that holds a peer decides. Allow entries that together hold every public IPv4 address or all of 2000::/4, such as 0.0.0.0/0 or 2000::/4, are refused, whatever the deny entries beside them. |
cache_snapshot_minutes |
integer | no | How often the answer cache is written to disk, in minutes, so a restart starts warm. 0 to 1440, and 15 by default. 0 turns the snapshot off and deletes the file. |
clock_grace_minutes |
integer | no | How long after a start the clock counts as unconfirmed where no time client has set it. 0 to 60 minutes, and 10 by default. 0 trusts a clock past the build floor from the start. A shorter window applies at once; a longer one waits for the next start. |
clock_grace_names |
array of string | no | The names a time client on this network asks for, each with every name below it. They answer without DNSSEC validation while the clock is not trusted. Up to 64 entries, and the default covers the pools of the common Linux distributions and the public time servers. |
clock_synchronized_file |
string | no | The file whose presence says a time client set the clock since this machine booted. An absolute path, or an empty string where there is none. The default is /run/systemd/timesync/synchronized, the file systemd-timesyncd writes, on every platform. |
console_http3 |
boolean | no | Whether each address of console_listen also answers HTTP/3 on its UDP port, the same address and port. false by default. No 0-RTT, and the same rules as over TCP. The UDP port of a door is its own whatever this says, so no DNS listener can take it. |
console_listen |
array of string | no | Where to serve the web console and the management API, over TLS, on one origin. An address with a port after it, or without one to default to 5343. The rules of listen apply, but an entry takes no device, and an address and port of another TCP listener cannot also be here. Empty by default. A non-empty list needs a certificate: tls_certificate_file and tls_private_key_file, tls_pkcs12_file, or acme_names. A binary built without the console refuses a non-empty list. |
ecs_trust |
array of string | no | Senders whose EDNS Client Subnet option this server honours, where ecs_accept is "trusted". A resolver in front of this one, whose own clients the option names. An address or a subnet per entry, up to 64, and empty by default. |
encrypted_allow_recursion |
array of string | no | Which clients this server resolves for when a query arrives encrypted, over TLS. It replaces allow_recursion for those queries alone. The same entries, deny entries too, and the same default: loopback and the private ranges. A phone outside the house needs ["0.0.0.0/0", "::/0"], which gives any stranger who connects the resolver, the blocking and the local zones. |
exclude_ports |
array of PortEntry |
no | Source ports this server never sends a query from, such as a port a VPN on this machine uses. A number for one port, or a string such as "8000-8100" for a range. Empty by default, and then the operating system picks each port. A list that leaves fewer than 4096 of the ports from 1024 up is refused, because a resolver with few source ports has given up the protection they give against a forged answer. |
http3_listen |
array of string | no | Where to answer DNS over HTTPS on HTTP/3, on UDP for every entry, with the certificate of DNS over TLS. An address with a port after it, or without one to default to 443. The rules of listen apply, the device included. An address and port in listen or quic_listen cannot also be here, and one in https_listen can, because that one is TCP. Empty by default. A non-empty list needs a certificate: tls_certificate_file and tls_private_key_file, or tls_pkcs12_file. |
http_client_header |
string | no | The header a trusted proxy names the client in. The server reads the last address of the last such header. The default is "X-Forwarded-For". |
http_help_page |
boolean | no | Whether a browser that opens the path of DNS over HTTPS gets a page that says how to use the address, rather than an error. A GET with no variable dns, whose Accept prefers text/html, gets it. true by default. |
http_listen |
array of string | no | Where to answer plain HTTP from a reverse proxy that holds the TLS session with the client. An address with a port after it, or without one to default to 8053. The rules of listen apply, the device included, and an address and port of another listener cannot also be here, except one of acme_http_listen. It answers only the proxies in http_trust, and 403 to anybody else. An address that acme_http_listen names too also answers the HTTP-01 challenge, to anybody. Empty by default. |
http_path |
string | no | The URL path of every HTTP listener. It starts with /, holds no ?, # or space, and is not under /.well-known/acme-challenge/, the path of the HTTP-01 challenge. The default is "/dns-query". |
http_socket |
boolean | no | Whether to answer plain HTTP from a reverse proxy on doh.sock, a Unix socket in the runtime directory. The file mode of the socket, 0660, decides who connects. false by default. |
http_trust |
array of string | no | The reverse proxies whose client header this server believes, on https_listen and http_listen. An address or a subnet per entry, up to 64, and empty by default. An entry that starts with !, such as !192.168.1.66, denies its range inside a wider entry, and the entry with the longest prefix that holds a sender decides. Allow entries that together hold every public IPv4 address or all of 2000::/4, such as 0.0.0.0/0 or 2000::/4, are refused, whatever the deny entries beside them. |
https_listen |
array of string | no | Where to answer DNS over HTTPS, on TCP for every entry, with the certificate of DNS over TLS. An address with a port after it, or without one to default to 443. The rules of listen apply, the device included. An address and port in listen, tls_listen or http_listen cannot also be here. Empty by default. A non-empty list needs a certificate: tls_certificate_file and tls_private_key_file, or tls_pkcs12_file. |
listen |
array of string | no | Where to answer DNS, on UDP and TCP for every entry. An address with a port after it, or without one to default to 5300. A name, a wildcard address and port zero are all refused. The default is ["127.0.0.1:5300"]. On Linux, an entry can end with @ and the name of a device or a VRF, such as "192.168.1.2:53@eth0": its sockets then take only the queries that arrive on that device, and answer by the routing table of its VRF. A change of the device of an address that is served, from none, to none or to another, waits for a restart. |
log_file_days |
integer | no | How many days of log files the server keeps in logs/ of the state root, one file for each day. The default is 0, which writes no file. A new value takes effect at once, and a lower one deletes the older files at once. |
log_file_mib |
integer | no | The most room that the log files take in all, in MiB. The default is 256. Past it, the server deletes the oldest file other than that of the day. A new value takes effect at once. |
log_format |
string | no | How the server writes a log line: "text" for a person, or "json" for one JSON object to a line, for a log collector. The default is "text". The environment variable TADORU_LOG_FORMAT wins where it is set. A new value takes effect at once. |
log_level |
string | no | How much the server logs: "error", "warn", "info", "debug" or "trace", for every part of the server. The default is "info". The environment variable TADORU_LOG wins where it is set, and it also takes a level for each part. A new value takes effect at once. |
log_local_time |
boolean | no | Whether a log line carries the time in the time zone of the machine, with its offset, such as 2026-11-06T17:02:03.123456+01:00. The default is false, which writes UTC with a Z. The day of a log file follows the same zone. A new value takes effect at once. A change of the zone of the machine shows after a restart. |
log_resolution_errors |
boolean | no | Whether the log keeps the four lines that report a fault of one resolution: three about an alias chain, and one about a reply that changed the case of the question. The default is true. With false they are dropped, and the lines about the server itself stay. The environment variable TADORU_LOG wins where it is set. A new value takes effect at once. |
metrics_listen |
string | no | Where Prometheus reads, as one address, or an empty string to turn it off. The default is 127.0.0.1:9153. Turning it on takes effect at once, and an address that cannot be bound is logged rather than refused: the revision still stands. Moving it and turning it off take effect at the next start, because the exporter installs a process-wide recorder that keeps one address for the life of the process. |
name |
string | no | The name of this node, as a person reads it, such as dns1: a label for the console and a list of nodes, and not an identity. 1 to 63 characters, of ASCII letters, digits, -, _ and .. None by default, and then GET /api/info names the host name of the machine. |
outbound_addresses |
array of string | no | The addresses of this machine that queries go out from, chosen at random for each query among those of the destination’s family. One address per entry, up to 64. Empty by default, and then the operating system picks. A family with no entry is left to the operating system. An address this machine does not hold is refused where the revision becomes active. |
outbound_proxy |
string | no | The proxy that the requests of the server for itself go through: http:// or socks5://, an IP address and a port, such as socks5://127.0.0.1:9050. An IPv6 address goes in brackets. No user part, path or name, and no default port. Empty by default, and then every request connects direct. A request through the proxy never falls back to a direct connection. |
outbound_proxy_bypass |
array of string | no | The hosts and networks that go direct, not through the proxy: a host suffix such as lan, which holds every name under it, an address, or a subnet. Up to 64 entries, each once after its normal form. Empty by default. A suffix with a leading dot or under onion is refused. |
outbound_proxy_for |
array of string | no | Which requests use the proxy: any of blocklists, acme, updates and forwarders, each once. ["blocklists", "acme", "updates"] by default. An empty list beside a proxy is refused. |
outbound_proxy_user |
string | no | The user of the proxy, where it asks for one. 1 to 255 bytes. Through an HTTP proxy it holds no colon and no control character. Not set by default. The node secret outbound_proxy_password holds its password. |
proxy_protocol_from |
array of string | no | Load balancers that put a PROXY protocol header in front of what they relay, to name the client behind them. A source in the list must send the header on every DNS listener, and a source outside it never has one read. An address or a subnet per entry, up to 64, and empty by default. Entries that together hold every public IPv4 address or all of 2000::/4, such as 0.0.0.0/0 or 2000::/4, are refused. |
quic_backlog |
integer | no | How many connection attempts wait for a QUIC listener to take them. Past it, a new attempt is dropped with no answer, and the client sends it again. 16 to 4096, and 256 by default. |
quic_idle_timeout_seconds |
integer | no | The idle timeout every QUIC listener announces, in seconds. A connection with no traffic for this long closes, or sooner where the client announces less. 5 to 300, and 30 by default. |
quic_listen |
array of string | no | Where to answer DNS over QUIC, on UDP for every entry, with the certificate of DNS over TLS. An address with a port after it, or without one to default to 853. The rules of listen apply, the device included, and port 53 is refused as well. An address and port in listen cannot also be here, and one in tls_listen can, because that one is TCP. Empty by default. A non-empty list needs a certificate: tls_certificate_file and tls_private_key_file, or tls_pkcs12_file. |
quic_max_streams |
integer | no | How many queries or requests one QUIC connection can have open at once. A client that wants more waits for one to finish. 1 to 1000, and 100 by default. |
rate_bypass |
array of string | no | Clients no rate limit applies to, such as a monitoring box that asks every name every minute. An address or a subnet per entry, up to 64, and empty by default. |
tcp_backlog |
integer | no | How many connections wait for the accept of each TCP listener of DNS: plain TCP, DNS over TLS, DNS over HTTPS and http_listen. Past it the kernel drops a new handshake, and the client tries again. The kernel cuts it at net.core.somaxconn with no word. 16 to 4096, and 128 by default. A revision applies it to the listeners that run. |
tcp_idle_timeout_seconds |
integer | no | How long a plain TCP connection can wait for a query, in seconds, before its first one too. A connection that sends nothing for this long closes. 1 to 300, and 10 by default. DNS over TLS keeps its own idle wait of 30 seconds. |
tcp_read_timeout_seconds |
integer | no | How long the rest of a message over TCP or TLS can take once its length arrived, in seconds. It closes a client that sends one octet a second to hold a place. 1 to 60, and 10 by default. A long value lets one client hold a place for longer. |
tcp_write_timeout_seconds |
integer | no | How long one answer over TCP or TLS can take to reach the client, in seconds. A client that stops reading is closed after it. 1 to 60, and 10 by default. |
telemetry_memory_mib |
integer | no | The room that a query log in memory may take on its tmpfs, in MiB, from 16 to 4096, and 64 by default. Its data takes three quarters of it, and the hourly counts of stats_retention_days must fit a quarter of that. A change waits for a restart. With telemetry_storage = "disk" it does nothing. |
telemetry_storage |
string | no | Where the query log and the statistics live: "disk", in the state root, or "memory", in the runtime root on a tmpfs with a size, which a reboot empties. The default is "disk". Where memory is asked for and the runtime root is not such a tmpfs, or has too little room, DNS answers and the query log is off, with the reason in the health. A change waits for a restart, and the copy at the old place stays until a person deletes it. |
tls_certificate_file |
string | no | The certificate that DNS over TLS presents: a PEM file with the chain, the leaf first. An absolute path. None by default. It goes with tls_private_key_file, and one without the other is refused. |
tls_listen |
array of string | no | Where to answer DNS over TLS, on TCP for every entry. An address with a port after it, or without one to default to 853. The rules of listen apply, the device included, and port 53 is refused as well. An address and port in listen cannot also be here. Empty by default. A non-empty list needs a certificate: tls_certificate_file and tls_private_key_file, or tls_pkcs12_file. |
tls_pkcs12_file |
string | no | A PKCS #12 file that holds the certificate chain and its key, in place of the two PEM files: an absolute path. None by default. It cannot go with tls_certificate_file, tls_private_key_file or acme_names. The server reads it in place, as it reads a key file: owned by root or the user that runs the server, with no bit for other users and no group write, and at most 64 KiB. Its password is the secret tls_pkcs12_password of the node, which PUT /api/node/secrets/tls_pkcs12_password sets, never this file. Where no password is set, the server tries the empty one. |
tls_private_key_file |
string | no | The private key of the leaf in tls_certificate_file, as a PEM file. An absolute path. None by default. The server reads the key in place and never copies it, so a backup of the server does not carry it. |
tls_self_signed |
boolean | no | Whether the server makes a certificate of its own and keeps it in pki/self-signed/ of the state root, for a node with no other source, such as one on a private network with no name in public DNS. false by default. It cannot go with tls_certificate_file, tls_private_key_file, tls_pkcs12_file or acme_names. The certificate names tls_server_name, localhost and each address of the encrypted listeners and of the doors, lasts 397 days, and is made again with the same key 30 days before its end, at a change of those names, and once the clock is trusted. A browser warns at the first visit, and the health gives its fingerprints to compare. |
tls_server_name |
string | no | The host name that this node names when a client asks for its encrypted endpoints, at _dns.resolver.arpa. A host name of two labels or more, in any case and with no final dot. An IP address, a wildcard, and resolver.arpa or a name under it are refused. None by default, which answers that question with no endpoint. A name here needs an address in tls_listen, https_listen, quic_listen, http3_listen, console_listen or api_listen. A node with none in the first four answers with no endpoint, whatever the name. |
udp_receive_buffer_kib |
integer | no | The receive buffer of each UDP socket of a DNS listener, in KiB: each worker of listen, and the sockets of quic_listen and http3_listen. A burst larger than it is dropped by the kernel. The kernel caps it at net.core.rmem_max. 64 to 65536. None by default, which keeps the default of the kernel. A revision applies it to the sockets that run. |
udp_send_buffer_kib |
integer | no | The send buffer of each UDP socket of a DNS listener, in KiB, as udp_receive_buffer_kib. The kernel caps it at net.core.wmem_max. 64 to 65536. None by default, which keeps the default of the kernel. A revision applies it to the sockets that run. |
udp_workers |
integer | no | How many UDP workers to run, each with its own socket. 0 to 256, and zero means one per core, which is the default. An address that starts serving with this revision gets this count; an address already served keeps its count until a restart. |
update_check |
boolean | no | Whether the server asks the list of releases of the project on GitHub, about once a day, for a newer release than the one that runs. false by default, and then it asks nothing. The request takes the route of updates. The server names a release in GET /api/info, and never downloads or installs one. A new value takes effect at once. |
update_prereleases |
boolean | no | Whether a pre-release counts as a newer release for the update check. false by default. A server that runs a pre-release counts pre-releases whatever this says. A new value takes effect at once, with no new request. |
NodePatch
Section titled “NodePatch”The body of PATCH /api/node: the settings of node.toml to change. A key that the body leaves out stays as it is, and a key sent as null goes back to its default.
| Field | Type | Required | Description |
|---|---|---|---|
acme_challenge |
string | no | How the authority checks that the names are yours. "http-01" asks on port 80 of acme_http_listen, and "tls-alpn-01" asks on the TLS listeners. "dns-01" asks for a TXT record in a zone of this server, which the server writes and removes. The default is "http-01". |
acme_contact |
array of string | no | The mailto: addresses of the account at the authority. Empty by default. |
acme_directory |
string | no | The ACME authority: "letsencrypt", "letsencrypt-staging", or the https:// URL of a directory. The default is "letsencrypt". |
acme_dns01_skip |
array of string | no | The addresses that the wait of dns-01 does not ask, such as the public address of a router with no NAT loopback, which drops a query from inside to its own public address. IP addresses with no port, up to 16. Empty by default, and a non-empty list needs acme_challenge to be "dns-01". |
acme_http_listen |
array of string | no | Where to answer the HTTP-01 challenge, on TCP for every entry. An address with a port after it, or without one to default to 80. The rules of tls_listen apply, but an entry takes no device, and an address and port of another TCP listener cannot also be here. One of http_listen can, and then answers both. Empty by default, and "http-01" needs one. |
acme_names |
array of string | no | The names on the certificate that the server gets and renews from an ACME authority, such as Let’s Encrypt. A host name per entry, up to 100. An IP address and a name written twice are refused. A wildcard, one *. label before a host name, needs acme_challenge to be "dns-01". Empty by default, which turns ACME off. A non-empty list cannot go with tls_certificate_file or tls_pkcs12_file, and it needs acme_terms_agreed and a TLS listener. |
acme_terms_agreed |
boolean | no | Whether you read the terms of the authority and agree to them. false by default, and a non-empty acme_names needs true. |
advertise_encrypted |
boolean | no | Whether this node answers _dns.resolver.arpa with its encrypted endpoints, where tls_server_name names it. true by default. |
allow_recursion |
array of string | no | Which clients this server resolves for. An address or a subnet per entry, up to 64, and a query from anywhere else is answered REFUSED. An entry that starts with !, such as !10.1.0.0/16, denies its range inside a wider entry, and the entry with the longest prefix that holds a client decides. The default is loopback and the private ranges. An empty list resolves for nobody, which is a server that answers its own zones alone. |
api_client_header |
string | no | The header a proxy of api_trust names the client in. The default is "X-Forwarded-For". |
api_listen |
array of string | no | Where to serve the management API alone, over TLS, for a script on another host. An address with a port after it, or without one to default to 8453. The rules of console_listen apply: a non-empty list needs a certificate source, and a wildcard address is refused. Each address serves TLS 1.3 alone. A caller there gets none of the trust that the socket gives its owner. Empty by default. The file also takes one address as a string, and "" as an empty list. |
api_trust |
array of string | no | The reverse proxies whose client header console_listen and api_listen believe. An address or a subnet per entry, up to 16, and empty by default. An entry that starts with !, such as !192.168.1.66, denies its range inside a wider entry, and the entry with the longest prefix that holds a peer decides. Allow entries that together hold every public IPv4 address or all of 2000::/4, such as 0.0.0.0/0 or 2000::/4, are refused, whatever the deny entries beside them. |
cache_snapshot_minutes |
integer | no | How often the answer cache is written to disk, in minutes, so a restart starts warm. 0 to 1440, and 15 by default. 0 turns the snapshot off and deletes the file. |
clock_grace_minutes |
integer | no | How long after a start the clock counts as unconfirmed where no time client has set it. 0 to 60 minutes, and 10 by default. 0 trusts a clock past the build floor from the start. A shorter window applies at once; a longer one waits for the next start. |
clock_grace_names |
array of string | no | The names a time client on this network asks for, each with every name below it. They answer without DNSSEC validation while the clock is not trusted. Up to 64 entries, and the default covers the pools of the common Linux distributions and the public time servers. |
clock_synchronized_file |
string | no | The file whose presence says a time client set the clock since this machine booted. An absolute path, or an empty string where there is none. The default is /run/systemd/timesync/synchronized, the file systemd-timesyncd writes, on every platform. |
console_http3 |
boolean | no | Whether each address of console_listen also answers HTTP/3 on its UDP port, the same address and port. false by default. No 0-RTT, and the same rules as over TCP. The UDP port of a door is its own whatever this says, so no DNS listener can take it. |
console_listen |
array of string | no | Where to serve the web console and the management API, over TLS, on one origin. An address with a port after it, or without one to default to 5343. The rules of listen apply, but an entry takes no device, and an address and port of another TCP listener cannot also be here. Empty by default. A non-empty list needs a certificate: tls_certificate_file and tls_private_key_file, tls_pkcs12_file, or acme_names. A binary built without the console refuses a non-empty list. |
ecs_trust |
array of string | no | Senders whose EDNS Client Subnet option this server honours, where ecs_accept is "trusted". A resolver in front of this one, whose own clients the option names. An address or a subnet per entry, up to 64, and empty by default. |
encrypted_allow_recursion |
array of string | no | Which clients this server resolves for when a query arrives encrypted, over TLS. It replaces allow_recursion for those queries alone. The same entries, deny entries too, and the same default: loopback and the private ranges. A phone outside the house needs ["0.0.0.0/0", "::/0"], which gives any stranger who connects the resolver, the blocking and the local zones. |
exclude_ports |
array of PortEntry |
no | Source ports this server never sends a query from, such as a port a VPN on this machine uses. A number for one port, or a string such as "8000-8100" for a range. Empty by default, and then the operating system picks each port. A list that leaves fewer than 4096 of the ports from 1024 up is refused, because a resolver with few source ports has given up the protection they give against a forged answer. |
http3_listen |
array of string | no | Where to answer DNS over HTTPS on HTTP/3, on UDP for every entry, with the certificate of DNS over TLS. An address with a port after it, or without one to default to 443. The rules of listen apply, the device included. An address and port in listen or quic_listen cannot also be here, and one in https_listen can, because that one is TCP. Empty by default. A non-empty list needs a certificate: tls_certificate_file and tls_private_key_file, or tls_pkcs12_file. |
http_client_header |
string | no | The header a trusted proxy names the client in. The server reads the last address of the last such header. The default is "X-Forwarded-For". |
http_help_page |
boolean | no | Whether a browser that opens the path of DNS over HTTPS gets a page that says how to use the address, rather than an error. A GET with no variable dns, whose Accept prefers text/html, gets it. true by default. |
http_listen |
array of string | no | Where to answer plain HTTP from a reverse proxy that holds the TLS session with the client. An address with a port after it, or without one to default to 8053. The rules of listen apply, the device included, and an address and port of another listener cannot also be here, except one of acme_http_listen. It answers only the proxies in http_trust, and 403 to anybody else. An address that acme_http_listen names too also answers the HTTP-01 challenge, to anybody. Empty by default. |
http_path |
string | no | The URL path of every HTTP listener. It starts with /, holds no ?, # or space, and is not under /.well-known/acme-challenge/, the path of the HTTP-01 challenge. The default is "/dns-query". |
http_socket |
boolean | no | Whether to answer plain HTTP from a reverse proxy on doh.sock, a Unix socket in the runtime directory. The file mode of the socket, 0660, decides who connects. false by default. |
http_trust |
array of string | no | The reverse proxies whose client header this server believes, on https_listen and http_listen. An address or a subnet per entry, up to 64, and empty by default. An entry that starts with !, such as !192.168.1.66, denies its range inside a wider entry, and the entry with the longest prefix that holds a sender decides. Allow entries that together hold every public IPv4 address or all of 2000::/4, such as 0.0.0.0/0 or 2000::/4, are refused, whatever the deny entries beside them. |
https_listen |
array of string | no | Where to answer DNS over HTTPS, on TCP for every entry, with the certificate of DNS over TLS. An address with a port after it, or without one to default to 443. The rules of listen apply, the device included. An address and port in listen, tls_listen or http_listen cannot also be here. Empty by default. A non-empty list needs a certificate: tls_certificate_file and tls_private_key_file, or tls_pkcs12_file. |
listen |
array of string | no | Where to answer DNS, on UDP and TCP for every entry. An address with a port after it, or without one to default to 5300. A name, a wildcard address and port zero are all refused. The default is ["127.0.0.1:5300"]. On Linux, an entry can end with @ and the name of a device or a VRF, such as "192.168.1.2:53@eth0": its sockets then take only the queries that arrive on that device, and answer by the routing table of its VRF. A change of the device of an address that is served, from none, to none or to another, waits for a restart. |
log_file_days |
integer | no | How many days of log files the server keeps in logs/ of the state root, one file for each day. The default is 0, which writes no file. A new value takes effect at once, and a lower one deletes the older files at once. |
log_file_mib |
integer | no | The most room that the log files take in all, in MiB. The default is 256. Past it, the server deletes the oldest file other than that of the day. A new value takes effect at once. |
log_format |
string | no | How the server writes a log line: "text" for a person, or "json" for one JSON object to a line, for a log collector. The default is "text". The environment variable TADORU_LOG_FORMAT wins where it is set. A new value takes effect at once. |
log_level |
string | no | How much the server logs: "error", "warn", "info", "debug" or "trace", for every part of the server. The default is "info". The environment variable TADORU_LOG wins where it is set, and it also takes a level for each part. A new value takes effect at once. |
log_local_time |
boolean | no | Whether a log line carries the time in the time zone of the machine, with its offset, such as 2026-11-06T17:02:03.123456+01:00. The default is false, which writes UTC with a Z. The day of a log file follows the same zone. A new value takes effect at once. A change of the zone of the machine shows after a restart. |
log_resolution_errors |
boolean | no | Whether the log keeps the four lines that report a fault of one resolution: three about an alias chain, and one about a reply that changed the case of the question. The default is true. With false they are dropped, and the lines about the server itself stay. The environment variable TADORU_LOG wins where it is set. A new value takes effect at once. |
metrics_listen |
string | no | Where Prometheus reads, as one address, or an empty string to turn it off. The default is 127.0.0.1:9153. Turning it on takes effect at once, and an address that cannot be bound is logged rather than refused: the revision still stands. Moving it and turning it off take effect at the next start, because the exporter installs a process-wide recorder that keeps one address for the life of the process. |
name |
string | no | The name of this node, as a person reads it, such as dns1: a label for the console and a list of nodes, and not an identity. 1 to 63 characters, of ASCII letters, digits, -, _ and .. None by default, and then GET /api/info names the host name of the machine. |
outbound_addresses |
array of string | no | The addresses of this machine that queries go out from, chosen at random for each query among those of the destination’s family. One address per entry, up to 64. Empty by default, and then the operating system picks. A family with no entry is left to the operating system. An address this machine does not hold is refused where the revision becomes active. |
outbound_proxy |
string | no | The proxy that the requests of the server for itself go through: http:// or socks5://, an IP address and a port, such as socks5://127.0.0.1:9050. An IPv6 address goes in brackets. No user part, path or name, and no default port. Empty by default, and then every request connects direct. A request through the proxy never falls back to a direct connection. |
outbound_proxy_bypass |
array of string | no | The hosts and networks that go direct, not through the proxy: a host suffix such as lan, which holds every name under it, an address, or a subnet. Up to 64 entries, each once after its normal form. Empty by default. A suffix with a leading dot or under onion is refused. |
outbound_proxy_for |
array of string | no | Which requests use the proxy: any of blocklists, acme, updates and forwarders, each once. ["blocklists", "acme", "updates"] by default. An empty list beside a proxy is refused. |
outbound_proxy_user |
string | no | The user of the proxy, where it asks for one. 1 to 255 bytes. Through an HTTP proxy it holds no colon and no control character. Not set by default. The node secret outbound_proxy_password holds its password. |
proxy_protocol_from |
array of string | no | Load balancers that put a PROXY protocol header in front of what they relay, to name the client behind them. A source in the list must send the header on every DNS listener, and a source outside it never has one read. An address or a subnet per entry, up to 64, and empty by default. Entries that together hold every public IPv4 address or all of 2000::/4, such as 0.0.0.0/0 or 2000::/4, are refused. |
quic_backlog |
integer | no | How many connection attempts wait for a QUIC listener to take them. Past it, a new attempt is dropped with no answer, and the client sends it again. 16 to 4096, and 256 by default. |
quic_idle_timeout_seconds |
integer | no | The idle timeout every QUIC listener announces, in seconds. A connection with no traffic for this long closes, or sooner where the client announces less. 5 to 300, and 30 by default. |
quic_listen |
array of string | no | Where to answer DNS over QUIC, on UDP for every entry, with the certificate of DNS over TLS. An address with a port after it, or without one to default to 853. The rules of listen apply, the device included, and port 53 is refused as well. An address and port in listen cannot also be here, and one in tls_listen can, because that one is TCP. Empty by default. A non-empty list needs a certificate: tls_certificate_file and tls_private_key_file, or tls_pkcs12_file. |
quic_max_streams |
integer | no | How many queries or requests one QUIC connection can have open at once. A client that wants more waits for one to finish. 1 to 1000, and 100 by default. |
rate_bypass |
array of string | no | Clients no rate limit applies to, such as a monitoring box that asks every name every minute. An address or a subnet per entry, up to 64, and empty by default. |
tcp_backlog |
integer | no | How many connections wait for the accept of each TCP listener of DNS: plain TCP, DNS over TLS, DNS over HTTPS and http_listen. Past it the kernel drops a new handshake, and the client tries again. The kernel cuts it at net.core.somaxconn with no word. 16 to 4096, and 128 by default. A revision applies it to the listeners that run. |
tcp_idle_timeout_seconds |
integer | no | How long a plain TCP connection can wait for a query, in seconds, before its first one too. A connection that sends nothing for this long closes. 1 to 300, and 10 by default. DNS over TLS keeps its own idle wait of 30 seconds. |
tcp_read_timeout_seconds |
integer | no | How long the rest of a message over TCP or TLS can take once its length arrived, in seconds. It closes a client that sends one octet a second to hold a place. 1 to 60, and 10 by default. A long value lets one client hold a place for longer. |
tcp_write_timeout_seconds |
integer | no | How long one answer over TCP or TLS can take to reach the client, in seconds. A client that stops reading is closed after it. 1 to 60, and 10 by default. |
telemetry_memory_mib |
integer | no | The room that a query log in memory may take on its tmpfs, in MiB, from 16 to 4096, and 64 by default. Its data takes three quarters of it, and the hourly counts of stats_retention_days must fit a quarter of that. A change waits for a restart. With telemetry_storage = "disk" it does nothing. |
telemetry_storage |
string | no | Where the query log and the statistics live: "disk", in the state root, or "memory", in the runtime root on a tmpfs with a size, which a reboot empties. The default is "disk". Where memory is asked for and the runtime root is not such a tmpfs, or has too little room, DNS answers and the query log is off, with the reason in the health. A change waits for a restart, and the copy at the old place stays until a person deletes it. |
tls_certificate_file |
string | no | The certificate that DNS over TLS presents: a PEM file with the chain, the leaf first. An absolute path. None by default. It goes with tls_private_key_file, and one without the other is refused. |
tls_listen |
array of string | no | Where to answer DNS over TLS, on TCP for every entry. An address with a port after it, or without one to default to 853. The rules of listen apply, the device included, and port 53 is refused as well. An address and port in listen cannot also be here. Empty by default. A non-empty list needs a certificate: tls_certificate_file and tls_private_key_file, or tls_pkcs12_file. |
tls_pkcs12_file |
string | no | A PKCS #12 file that holds the certificate chain and its key, in place of the two PEM files: an absolute path. None by default. It cannot go with tls_certificate_file, tls_private_key_file or acme_names. The server reads it in place, as it reads a key file: owned by root or the user that runs the server, with no bit for other users and no group write, and at most 64 KiB. Its password is the secret tls_pkcs12_password of the node, which PUT /api/node/secrets/tls_pkcs12_password sets, never this file. Where no password is set, the server tries the empty one. |
tls_private_key_file |
string | no | The private key of the leaf in tls_certificate_file, as a PEM file. An absolute path. None by default. The server reads the key in place and never copies it, so a backup of the server does not carry it. |
tls_self_signed |
boolean | no | Whether the server makes a certificate of its own and keeps it in pki/self-signed/ of the state root, for a node with no other source, such as one on a private network with no name in public DNS. false by default. It cannot go with tls_certificate_file, tls_private_key_file, tls_pkcs12_file or acme_names. The certificate names tls_server_name, localhost and each address of the encrypted listeners and of the doors, lasts 397 days, and is made again with the same key 30 days before its end, at a change of those names, and once the clock is trusted. A browser warns at the first visit, and the health gives its fingerprints to compare. |
tls_server_name |
string | no | The host name that this node names when a client asks for its encrypted endpoints, at _dns.resolver.arpa. A host name of two labels or more, in any case and with no final dot. An IP address, a wildcard, and resolver.arpa or a name under it are refused. None by default, which answers that question with no endpoint. A name here needs an address in tls_listen, https_listen, quic_listen, http3_listen, console_listen or api_listen. A node with none in the first four answers with no endpoint, whatever the name. |
udp_receive_buffer_kib |
integer | no | The receive buffer of each UDP socket of a DNS listener, in KiB: each worker of listen, and the sockets of quic_listen and http3_listen. A burst larger than it is dropped by the kernel. The kernel caps it at net.core.rmem_max. 64 to 65536. None by default, which keeps the default of the kernel. A revision applies it to the sockets that run. |
udp_send_buffer_kib |
integer | no | The send buffer of each UDP socket of a DNS listener, in KiB, as udp_receive_buffer_kib. The kernel caps it at net.core.wmem_max. 64 to 65536. None by default, which keeps the default of the kernel. A revision applies it to the sockets that run. |
udp_workers |
integer | no | How many UDP workers to run, each with its own socket. 0 to 256, and zero means one per core, which is the default. An address that starts serving with this revision gets this count; an address already served keeps its count until a restart. |
update_check |
boolean | no | Whether the server asks the list of releases of the project on GitHub, about once a day, for a newer release than the one that runs. false by default, and then it asks nothing. The request takes the route of updates. The server names a release in GET /api/info, and never downloads or installs one. A new value takes effect at once. |
update_prereleases |
boolean | no | Whether a pre-release counts as a newer release for the update check. false by default. A server that runs a pre-release counts pre-releases whatever this says. A new value takes effect at once, with no new request. |
NodeSecretEntry
Section titled “NodeSecretEntry”One secret of the node. It holds no value, and no route returns one.
| Field | Type | Required | Description |
|---|---|---|---|
changed_at |
integer | no | The time of the last change of the file, in Unix seconds. Absent where no value is set, or where the time does not read. |
name |
SecretName |
yes | |
readable |
boolean | yes | Whether the server read the value. false comes with reason. |
reason |
SecretHealthReason |
no | Why the secret is unreadable, the word of the health. Absent where it reads. |
set |
boolean | yes | Whether a value is set. true with readable: false means that a file is there or may be there: unsettled does not prove that a file exists. |
NodeSecrets
Section titled “NodeSecrets”What GET /api/node/secrets answers: every name of the closed set, in its order.
| Field | Type | Required | Description |
|---|---|---|---|
secrets |
array of NodeSecretEntry |
yes |
NotAddableReason
Section titled “NotAddableReason”Why a record of a reply does not go into a zone (zone::NotAddable).
One of class, soa, signer-type, opt, not-data, data.
NoteItem
Section titled “NoteItem”The notes of one record: its comment and its expiry time.
| Field | Type | Required | Description |
|---|---|---|---|
comment |
string | no | The comment: absent keeps it, null clears it, and a string of 1 to 1,024 octets sets it. |
expires_at |
integer | no | The expiry time, in seconds since 1970: absent keeps it, null clears it, and a time sets it, in a zone with record_expiry. |
record |
string | yes | The record, in the form of a line, with or without its lifetime, as a removal names it. A lifetime is read and dropped, because a note names a record by its identity. |
NsTtlRow
Section titled “NsTtlRow”The lifetime of an NS set of a primary zone: the key of zone.toml, and the value that applies.
| Field | Type | Required | Description |
|---|---|---|---|
in_force |
integer | yes | The lifetime of a new NS set, one that the zone does not serve, where an add names none, in seconds: set, else ns_ttl of [zones], else the default_ttl of the zone, else default_ttl of [zones]. An add to a served NS set, the apex included, keeps the lifetime of that set. |
set |
integer or null |
yes | The ns_ttl of zone.toml, in seconds. null where the file names none, so the zone inherits. Sent back as ns_ttl of PATCH /api/zones/{id}, it changes nothing, and null clears it. |
OffReason
Section titled “OffReason”Why telemetry is off. The set is closed.
A client that meets a word that it does not know, from a later build, shows it as other.
store_file also names a store in memory whose writer could not put the guard of its
memory back after the measure of a redaction.
One of not_linux, no_store_id, place_unread, place_unwritten, place_unrecorded, unfit, unreachable, not_memory, ramfs, unbounded, one_directory, open_path, directory, store_file, no_room, moved, unopenable, unmeasured, no_thread, panicked.
OldCopyHealth
Section titled “OldCopyHealth”A copy of the store at another place.
| Field | Type | Required | Description |
|---|---|---|---|
boot_unknown |
boolean | no | Where the state is left: a boot is not known, so the server cannot show that this is the copy that it left. Check the directory before you delete it. |
bytes |
integer | no | Where the state is left: the octets that its regular files take. |
directory |
string | no | The absolute directory of the old place: a path of this server for a person to read, not for a program to parse. Absent where it is not known. |
files |
integer | no | Where the state is left: how many names are there. The log names each file. |
problem |
string | no | Where the state is unknown or unread: what went wrong, for a person. |
state |
OldCopyState |
yes | |
storage |
TelemetryStorage |
no | Where the old place is: the disk or memory. Absent where it is not known. |
OldCopyState
Section titled “OldCopyState”What is known of an old copy. The set is closed. A client that meets a word that it does not know, from a later build, shows it as other.
One of unknown, left, unread.
PassedState
Section titled “PassedState”A state of a zone that the expiry sweep passes over.
One of frozen, off, stopped, at-files, unsettled, listed, received.
PendingKeyHealth
Section titled “PendingKeyHealth”One new root key that waits out its 30 days.
| Field | Type | Required | Description |
|---|---|---|---|
tag |
integer | yes | The key tag. |
trusted_from |
integer | yes | The earliest time the key becomes trusted, in seconds since the Unix epoch. The first refresh that works after it makes the key trusted. A stop of the server longer than one refresh interval moves it later, because the server counts one interval of a stop at the most. |
PortEntry
Section titled “PortEntry”One entry of exclude_ports: a port, or a range written as "low-high".
No fields.
PrivateRelay
Section titled “PrivateRelay”What a client group does about the start-up names of Apple Private Relay.
One of allow, block.
Problem
Section titled “Problem”One failure, as RFC 9457 describes it.
title is the same for every failure of a kind, and detail is about this one. A
client matches on the first and shows the second.
| Field | Type | Required | Description |
|---|---|---|---|
current_revision |
integer | no | What is running now. Present on a conflict, and absent otherwise. |
detail |
string | yes | What went wrong with this request, in the words a person needs. |
file |
string | no | The file the failure is about. Absent for a failure about no file. |
line |
integer | no | The line. Present for a failure that came from parsing a file. |
setting |
string | no | The setting, as it is spelled in the file. This is the field a web interface puts the message next to. |
sources |
array of GrantedSource |
no | Each source of a 403 needs-admin, with what its change gives that an admin alone gives. Absent on every other answer. |
status |
integer | yes | The HTTP status, repeated here so a stored problem document still says what it was answered with. |
title |
string | yes | The same sentence for every failure of this kind, for a client to match on. |
type |
string | yes | A stable identifier for the kind of failure, as a relative reference. |
Queries
Section titled “Queries”What a range query answered, and whether it is the whole answer.
| Field | Type | Required | Description |
|---|---|---|---|
after |
string | yes | Send this as after to read the rows written since this answer. On a before read, it is the after of the first page of the walk, so a client that polls keeps the after of its own last poll rather than take this one. |
before |
string | no | Send this as before, with the same sort and order, for the next page: the next older one newest first. Absent where the walk reached its end, and in the answer of an after read, which keeps the before it had. Present where the walk stopped at the rows that one answer reads, with no row or a few. |
caught_up |
boolean | yes | Whether the log held no row past after at this read, so a poll with after has nothing more to read yet. false means more rows wait: ask again with after at once. An after read that stopped at the rows that one answer reads answers false, though it can hold no row. On a before read, it says so of the after of the first page of the walk. |
dropped_in_range |
integer | yes | How many rows were dropped inside the interval asked for. Not zero means the answer is incomplete, and by how much. A log with gaps and no way to know is worse than one that says how many rows it lost. |
limit |
integer | yes | The most rows that this answer holds, from 1 to 1000: the limit asked for, as the server read it. |
order |
QueryOrder |
yes | Which way the rows run, as the server read order. |
rows |
array of Query |
yes | The rows, in the order of sort and order. One answer reads 65 536 rows of the log at most, so it can hold fewer rows than limit, or none, and still carry before. |
sort |
QuerySort |
yes | What the rows are sorted by, as the server read sort. |
unreadable |
integer | yes | How many rows this answer passed over because this build cannot read them, such as a row that a newer build wrote. The cursors still move past them. Not zero means the rows are incomplete, and by how much. |
One row of the query log, as the API answers it.
| Field | Type | Required | Description |
|---|---|---|---|
answers |
integer | yes | How many records the answer carried. |
at |
integer | yes | When the query arrived, in milliseconds since the Unix epoch. |
authoritative |
boolean | no | Whether the response that the client got has the AA bit. A zone of this server sets it, also where an alias in the zone leads to a name outside it that an upstream answered: such a row is forwarded or recursed and still has the bit. false for an answer from the cache or from upstream alone, for a failure or a refusal that this server wrote, and for an update. Absent for a row an older build wrote. Neither privacy setting clears it. |
block_group |
string | no | Which group’s policy applied to a blocked query, and default where no group claims the client. On a row that migration 11 or later wrote, it repeats client_group. An older blocked row has this and no client_group. Absent where the operator asked not to store which machine asked, because a group of one machine is that machine’s name. |
block_list |
string | no | The source that holds the rule that blocked it. Absent for an operator’s own entry and for a pattern rule, because neither belongs to a list. |
block_name |
string | no | Which name matched, where that is not the name in the question. A query for one name can come back as an alias chain that ends at a blocked name, and this says which name that was. Absent for a query the question’s own name blocked, and for a row written with store_names off. |
block_origin |
QueryBlockOrigin |
no | Which kind of rule blocked it: source for a list, baseline for a top-level entry of blocking.toml, group for an entry of the client’s own group, regex for a pattern rule. Two more name no rule at all: canary for the Firefox canary domain and private-relay for a Private Relay start-up name. Both carry no list and no rule, because this server answers those names itself. Absent for a query nothing blocked, and for a row a build before this column wrote. Neither privacy setting clears it. The four rule words name a kind of rule rather than a machine or a name. canary and private-relay do name their names, because each built-in rule has one. They stay anyway, because every Firefox and every Apple device asks those names on every network it joins. A source id can be any name, so the word is its own column rather than a value in block_list. |
block_rule |
string | no | The rule as this server compiled it, which is name or *.name, or the pattern where a pattern rule blocked it. A rule is a name, so it is absent for a row written with store_names off. |
chain |
array of string | no | The alias chain the block sits in: the names of it, the question’s name first. It is a list here, because the column holds a list. A block that a name of a chain caused carries this beside block_name. Absent where the question’s own name blocked the query, absent for a row written with store_names off, and absent for a chain too long for the column. |
client |
string | no | Absent for a row written with store_clients off. |
client_group |
string | no | The group whose policy the client ran under, and default where no group claims the client. Present on every query and update, blocked or not. Absent for a row written with store_clients off, and for a row an older build wrote. A group of one machine is that machine’s name, so redact of client clears it too. |
client_name |
string | no | What clients.toml calls the client that asked, or default when it names none. Absent for a row written with store_clients off, and for a row an older build wrote. |
elapsed_us |
integer | yes | How long this server took, in microseconds, from arrival to answer. |
extended_errors |
array of integer | no | The Extended DNS Error codes the client received, as numbers in the order they went out: 6 is DNSSEC Bogus, 15 is Blocked, 20 is Not Authoritative. Empty for an answer that carried none, and for a query with no OPT record. Absent for a row a build before this field wrote, because that build did not record the codes it sent. The text of each code is not kept. Neither privacy setting clears the numbers. |
id |
integer | yes | The identifier of the row. The server gives a larger one to each row it writes, and never gives one twice. |
kind |
QueryKind |
yes | What kind of request the row records: query for a question, update for a dynamic update. An update names the zone it changes in name, with qtype 6, and the code of its answer. source is local for it, and policy means nothing for it. Every row a build before this field wrote is a query. Neither privacy setting clears it. |
name |
string | no | The name asked for, or for an update the zone, in lower case: the letters A to Z are folded, and a byte outside ASCII stays as its escape, such as \195. A row of this build or of an earlier release holds it so. Absent for a row written with store_names off. |
path |
QueryPath |
no | The path of the answer: each exchange that forwarding or recursion had with a server for this query, in the order they started, and how many steps were left out. A query that coalesced with another holds the path of the one resolution that answered both. A stale answer that went out because its refresh failed holds the path of that refresh. A stale answer that went out while its refresh still ran, one whose refresh did not start, and one held after a failure have none. Absent where no resolution sent anything, such as an answer from the cache or from a zone of this server, for a row written with store_names off, and for a row an older build wrote. It follows store_names, because its steps name the zones that a walk crossed and the servers of a [[forward]], and the redaction of name clears it. |
policy |
QueryPolicy |
yes | Whether the blocking policy ran for this query. applied covers a query it ran for, whether or not a rule matched. bypassed is a client in bypass, which the policy skipped entirely. disabled is the switch that turns blocking off for a while. group-off is a group that tests nothing. block_group, block_list and block_rule can be absent under applied too, from a query no rule matched, from an operator’s own entry, or from a privacy setting. block_origin is absent only for a query no rule matched, and for a row a build before this column wrote. |
qtype |
integer | yes | The record type asked for, as its number: 1 is A, 28 is AAAA, 15 is MX. |
rcode |
integer | yes | The response code answered: 0 is NOERROR, 2 is SERVFAIL, 3 is NXDOMAIN. |
source |
QuerySource |
yes | cache, stale, synthesized, forwarded, recursed, local or blocked. |
transport |
QueryTransport |
no | The transport that the query or the update came over: udp, tcp, tls (DNS over TLS), https (DNS over HTTPS on HTTP/2 or HTTP/1.1, doh.sock included), quic (DNS over QUIC) or h3 (DNS over HTTPS on HTTP/3). A row over HTTP/3 that a build that counted HTTP/3 as https wrote says https. Absent for a row written with store_clients off, and for a row that a build that wrote no transport wrote. It follows store_clients, because on a network with one client of DNS over HTTPS it names that machine, and the redaction of client clears it. |
upstream |
string | no | Which upstream answered a forwarded or a recursed query: the address and port of the server whose reply the client got, such as 9.9.9.9:853, a failure code included, or its name and port, such as dns.example:853, for a forwarder with no addresses that a SOCKS5 proxy reaches by its name. For a recursed query it is the server whose reply ended the walk, not one that referred the walk on. Absent where no upstream replied, for an answer this server gave from its cache or its zones, for a failure that this server wrote, for a walk with more steps than its path keeps, for a row written with store_names off, and for a row an older build wrote. It follows store_names, because the servers of a [[forward]] name the suffix that the name is under, and the redaction of name clears it. |
via |
string | no | The machine that relayed the query, where a load balancer or a proxy named the client in client. Absent for a query that came from its client, for a row written with store_clients off, and for a row an older build wrote. |
QueryBlockOrigin
Section titled “QueryBlockOrigin”Which kind of rule blocked a query.
One of source, baseline, group, regex, canary, private-relay.
QueryColumn
Section titled “QueryColumn”A column of the query log that a privacy setting covers.
One of name, client.
QueryKind
Section titled “QueryKind”What kind of request a row of the query log records.
One of query, update.
QueryLogHealth
Section titled “QueryLogHealth”Where the query log is, as the health report says it.
One of opening, ready, off.
QueryOrder
Section titled “QueryOrder”A word of order: which way the rows run.
One of desc, asc.
QueryPath
Section titled “QueryPath”The exchanges that forwarding or recursion had with a server for one query, in the order they started.
| Field | Type | Required | Description |
|---|---|---|---|
left_out |
integer | yes | How many steps the server counted and did not keep: past 64 steps for one query, or past the 8192 bytes that the column holds. The steps kept are the first ones. |
steps |
array of QueryStep |
yes | One exchange with one server each. A second query inside one exchange, such as a datagram asked again over TCP because it was cut short, shows as queries 2 and not as a second step. |
QueryPolicy
Section titled “QueryPolicy”A word of policy: whether the blocking policy ran for a query.
One of applied, bypassed, disabled, group-off.
QuerySort
Section titled “QuerySort”A word of sort: the column that the rows are sorted by.
One of time, duration.
QuerySource
Section titled “QuerySource”A word of source: where an answer came from.
One of cache, stale, synthesized, forwarded, recursed, local, blocked.
QueryStep
Section titled “QueryStep”One exchange with one server.
| Field | Type | Required | Description |
|---|---|---|---|
answer |
string | yes | What the reply was: answer, referral, nodata, nxdomain, unusable for a reply the server refused to use, timeout, failed for a connection that failed, lost for the half of a hedge that the walk did not read, or the name of another response code, such as SERVFAIL. |
elapsed_us |
integer | yes | How long the exchange took, in microseconds. |
for |
QueryStepPurpose |
yes | Why the server asked. |
name |
string | yes | The name that went out. Where the walk shortens names to hide the rest (QNAME minimisation), it is the shorter name. |
protocol |
QueryStepProtocol |
yes | The transport of the last query of the exchange. |
qtype |
integer | yes | The record type asked, as its number. |
queries |
integer | yes | The queries that this exchange sent. |
server |
string | yes | The address and port of the server, such as 192.0.2.1:53 or [2001:db8::1]:853, or its name and port, such as dns.example:853, for a forwarder with no addresses that a SOCKS5 proxy reaches by its name. |
zone |
string | no | The zone that the walk asked, such as com.. Absent in the forwarding mode. |
QueryStepProtocol
Section titled “QueryStepProtocol”The transport of a step.
One of udp, tcp, tls, https, quic, h3.
QueryStepPurpose
Section titled “QueryStepPurpose”Why the server asked: answer for the question of the query, lookup for the address of a
name server, chain for a question of the chain of trust, probe for the server’s own check
of an upstream at rest.
One of answer, lookup, chain, probe.
QueryTransport
Section titled “QueryTransport”The transport that a query came over, as the transport of a row of the query log holds it.
One of udp, tcp, tls, https, quic, h3.
One name or client in a top list.
| Field | Type | Required | Description |
|---|---|---|---|
blocked |
integer | yes | How many of those a blocklist answered. |
key |
string | yes | The name or the address, or other for everything the list left out. That row is what makes the totals add up. |
queries |
integer | yes | How many queries that name or client accounted for in the range. |
RecordChange
Section titled “RecordChange”The body of a change of records: the records that the operator wants, in seven lists. Each line
is one record in the form that GET /api/zones/{id}/records gives in record, every name
absolute. An absent list is empty, and any other field is a 400.
| Field | Type | Required | Description |
|---|---|---|---|
add |
array of string | no | Records to add. A line with no lifetime takes the lifetime of its set. A line with one must have the lifetime of its set, unless replace names the set, which then takes it. |
notes |
array of NoteItem |
no | The notes of records that the change leaves in the zone, served or off: a comment and an expiry time each. |
remove |
array of string | no | Records to remove, with or without their lifetime. |
replace |
array of ReplaceItem |
no | The sets to replace, each by its owner and its type: a record that the zone serves in the set leaves it where no line of add, remove, turn_off or turn_on names it. So add and replace of one set replace its records. The records of the set turned off stay off. |
set_ttl |
array of SetTtl |
no | The lifetime of a whole set. For a set that the zone serves and replace does not name, it is the one way to change its lifetime. |
turn_off |
array of string | no | Records to turn off: the zone keeps each as an ;off line and serves nothing of it. |
turn_on |
array of string | no | Records turned off to serve again, at the lifetime of their set. |
RecordLine
Section titled “RecordLine”One record of a zone, as a line of the master file.
| Field | Type | Required | Description |
|---|---|---|---|
comment |
string | no | The comment of the record, served or turned off, as the zone keeps it. Absent where it has none. It comes from the files and the journal of the zone, so it is inside the version and the entity tag, unlike modified_at. |
expires_at |
integer | no | The expiry time of the record, in seconds since 1970, after which the server removes it. Absent where it has none, and in a zone without record_expiry. Inside the version and the entity tag, as comment is. |
modified_at |
integer | no | When the record last changed on this server, in seconds since 1970: added, given another lifetime, turned off or turned on. A note for a person, outside the version and the entity tag. Absent where the time is not known, such as for a record from before this build, after a restore, or where the server could not keep the time exact. Each machine keeps its own. |
off |
boolean | yes | Whether an ;off line turns the record off, so the zone keeps it and serves nothing of it. |
record |
string | yes | The record: owner, lifetime, class, type and data, with every name absolute. The data is in the text form where the reader of a zone file takes it, and in the generic form of RFC 3597 otherwise, so the line reads back into the same record. |
refreshed_at |
integer | no | The time of the ;refreshed= mark of a record that ages, in seconds since 1970. Absent on a record that does not age, and on a record that is turned off. A refresh moves it and leaves modified_at. The mark is part of the files of the zone, so a refresh moves the version and the entity tag, and one version gives one refreshed_at. |
RecordList
Section titled “RecordList”The list of a change of records that holds a line, by the name of its member in the body, or
file for a line of the zone file of a merge, which line names.
One of add, remove, turn_off, turn_on, set_ttl, replace, notes, file.
RecordOutcomes
Section titled “RecordOutcomes”The outcome of each line of each list, in the order sent.
| Field | Type | Required | Description |
|---|---|---|---|
add |
array of LineOutcome |
yes | |
notes |
array of LineOutcome |
no | One outcome for each note, absent where the request holds none. |
remove |
array of LineOutcome |
yes | |
replace |
array of LineOutcome |
no | One outcome for each replace item, absent where the request holds none. |
set_ttl |
array of LineOutcome |
yes | |
turn_off |
array of LineOutcome |
yes | |
turn_on |
array of LineOutcome |
yes |
RecordProblem
Section titled “RecordProblem”A problem of the record route that no row keeps (RFC 9457): a refusal of the request alone, and an answer that says “send it again”. It has the members of a problem that a row keeps, so a client reads one shape for every refusal of the route: the rule where the problem is a rule of the route, the command where the answer names one, and the line where one line caused it.
| Field | Type | Required | Description |
|---|---|---|---|
command |
string | no | The command that the answer names, such as the change that a zone owes. |
detail |
string | yes | What went wrong with this request, cut at the last character boundary at or before octet 1,024. |
excerpt |
string | no | The line, cut at the last character boundary at or before octet 200. |
index |
integer | no | The index of that line in its list, in the order sent. Absent for file. |
line |
integer | no | For file: the line of the file, from 1, where the record that caused the problem starts. |
list |
RecordList |
no | The list of the line that caused the problem: add, remove, turn_off, turn_on, set_ttl, replace or notes, or file for a line of the zone file of a merge. |
rule |
string | no | The rule that the request breaks, where the problem is a rule of the route. |
status |
integer | yes | The HTTP status. |
title |
string | yes | The same sentence for every failure of this kind. |
type |
string | yes | A stable identifier for the kind of failure, as a relative reference. |
RecordRefusal
Section titled “RecordRefusal”The 422 of this route. A rule refuses the change, and rule names it. Or the key names a
request with other lines (key-reused), and first holds the first answer of the key.
| Field | Type | Required | Description |
|---|---|---|---|
command |
string | no | The command of a refusal that the key keeps, and of the first request under the key for key-reused. |
detail |
string | yes | What went wrong with this request. |
excerpt |
string | no | The line, cut at the last character boundary at or before octet 200. |
first |
object or string | no | For key-reused: the first answer of the key, as {"status": <status>, "body": <its body>}, or the string pending where it has not settled. |
index |
integer | no | The index of that line in its list, in the order sent. Absent for file. |
line |
integer | no | For file: the line of the file, from 1, where the record that caused the refusal starts. |
list |
RecordList |
no | The list of the line that caused the refusal, or file for a line of the zone file of a merge. |
rule |
string | no | The rule that refuses the change. Absent for key-reused, where the key, and not the request, is at fault. |
status |
integer | yes | The HTTP status, 422. |
title |
string | yes | The same sentence for every failure of this kind. |
type |
string | yes | A stable identifier for the kind of failure, as a relative reference. |
RecordsChanged
Section titled “RecordsChanged”What a change of records answers where it lands, or where every line is in effect already: the octets that the row of its key keeps, which a repeat of the key gets again.
| Field | Type | Required | Description |
|---|---|---|---|
command |
string | yes | The command of the change: records:, the hex of the key and the hex of a draw. |
outcomes |
RecordOutcomes |
yes | One outcome for each line, in the order sent, list by list. |
result |
ChangeResult |
yes | applied where at least one line acted, and unchanged where every line was in effect. |
serial |
integer | yes | The serial of the SOA of the zone after the change. |
version |
string | no | The version of the records after the change, which the ETag carries. Absent only where the server settled the change at a start and could not read the configuration it ran. |
RecordsImported
Section titled “RecordsImported”What a merge answers where it lands, or where every record of the file was in effect already: the octets that the row of its key keeps, which a repeat of the key gets again.
| Field | Type | Required | Description |
|---|---|---|---|
added |
integer | yes | The records of the file that the zone did not serve, which the merge added. |
command |
string | yes | The command of the merge: records:, the hex of the key and the hex of a draw. |
in_effect |
integer | yes | The records of the file that the zone served already. |
removed |
integer | yes | The records that the zone served in a set that replace names, and that the file does not hold, which the merge took away. |
result |
ChangeResult |
yes | applied where the merge changed the zone, and unchanged where it was in effect. |
serial |
integer | yes | The serial of the SOA of the zone after the merge. |
skipped |
integer | yes | The records of the file that the merge skips: each SOA, because the zone keeps its own, and each record turned off. |
version |
string | no | The version of the records after the merge, which the ETag carries. Absent only where the server settled the merge at a start and could not read the configuration it ran. |
RecordsPage
Section titled “RecordsPage”One page of the records of a zone at its head, with the version they belong to.
| Field | Type | Required | Description |
|---|---|---|---|
next |
integer | no | Where the next page starts, as from. Absent on the last page. |
records |
array of RecordLine |
yes | The records of the page, in the order of the zone: owner, type, then the text. |
version |
string | yes | The version of the inputs of the zone, opaque to a client: the files of its directory and the head of its journal. A page after the first names it, so the page comes from the same records. Two equal versions of one zone name the same records. A change of that zone moves it, and so does an edit of its directory that changes no record. A change of another zone does not. The entity tag carries the same value, and a change of the records through the API will take it as If-Match. |
zone |
string | yes | The id of the zone. |
Redact
Section titled “Redact”What a redaction asks for.
| Field | Type | Required | Description |
|---|---|---|---|
column |
string | yes | Which column to clear: name or client. |
purge |
boolean | no | Also drop the aggregates built from that column. Off by default. A cleared row and a kept top list leave the value readable in the list. Somebody asking for a value to be gone means the list too. A redaction of client, with or without purge, keeps the devices and transports counts of GET /api/stats/hourly. A count names no address, so the counts of an hour stay right. But on a network with one client of DNS over HTTPS, the https count of an hour still says when that machine asked, and how much. |
Redacted
Section titled “Redacted”What a redaction did.
| Field | Type | Required | Description |
|---|---|---|---|
column |
QueryColumn |
yes | Which column was cleared: name or client. |
rows |
integer | yes | How many rows changed. |
still_carried |
integer | yes | What is left that carries the value, which is zero unless something was written while this ran. |
RefreshAll
Section titled “RefreshAll”What a refresh of every source did, source by source, in the order of blocking.toml.
| Field | Type | Required | Description |
|---|---|---|---|
sources |
array of SourceRun |
yes | One entry for each source that the running configuration named when the run started. A source that the configuration gained during the run is not here: the pass on the timer reads it after the run. |
RefreshAsked
Section titled “RefreshAsked”What an ask to refresh a stub zone did.
| Field | Type | Required | Description |
|---|---|---|---|
next_refresh_at |
integer | no | The first time, in seconds since 1970, from which an ask can start a refresh: a minute after the start of the last try, whatever started it. Inside that minute it is ahead of now. A refresh that runs past the minute gives now, and so does a refresh that started before a revision changed the stub, whose new start has not come yet. Absent where queued is true, because the try has not started. |
queued |
boolean | yes | Whether the ask waits for a free place, because all four refreshes that run at once run. The refresh starts at the next free place. |
running |
boolean | yes | Whether a refresh of the zone runs as the task answers. |
started |
boolean | yes | Whether this ask started a refresh. |
zone |
string | yes | The id of the zone. |
RefreshBody
Section titled “RefreshBody”The body of an ask: empty, or the JSON object {}. It takes no key yet. The route reads a JSON
object, so another JSON value, such as [], is refused as a key is.
No fields.
ReplaceItem
Section titled “ReplaceItem”The set of owner and type, whose served records the change replaces.
| Field | Type | Required | Description |
|---|---|---|---|
owner |
string | yes | The owner of the set, an absolute name. |
type |
string | yes | The type of the set, such as A, or TYPE65280. |
ReplicationRow
Section titled “ReplicationRow”What zone.toml of a primary zone names for zone transfers and NOTIFY. Each field replaces the
same key of [zones] of server.toml whole. A field is null where zone.toml names nothing
for it, so the zone takes what [zones] names, which GET /api/server answers. null is not
an empty value: a table with no rule, or an empty list, names nobody, whatever [zones] names.
| Field | Type | Required | Description |
|---|---|---|---|
notify |
array of string or null |
yes | The secondaries that the zone notifies when its serial changes: the notify list of zone.toml, in the order of the file, each an address with its port, such as 192.0.2.53:53 or [2001:db8::53]:5300. null where the file names no notify, so the zone notifies the list of [zones]. An empty list where the file names notify = [], so the zone notifies nobody. Sent back as notify of PATCH /api/zones/{id}, the list changes nothing. |
transfer |
TransferRow or null |
yes | Who can transfer the zone: the [transfer] table of zone.toml. null where the file holds no [transfer] table, so the zone takes zones.transfer of server.toml. |
RequestedPlace
Section titled “RequestedPlace”What node.toml asks for.
| Field | Type | Required | Description |
|---|---|---|---|
memory_mib |
integer | yes | telemetry_memory_mib. |
storage |
TelemetryStorage |
yes | telemetry_storage. |
Revision
Section titled “Revision”One revision, as the history shows it.
| Field | Type | Required | Description |
|---|---|---|---|
actor |
string | no | Who or what inside that origin. Absent for an origin with nobody behind it. |
at |
integer | yes | When it was recorded, in seconds since the Unix epoch. |
changed |
Changes |
no | The files that the revision changed, and the settings of each, by name and with no value. A refused change has it too: what it tried to change. Absent for a row recorded before the ledger recorded what a revision changed, for a change refused before it built a set of files (such as a stale If-Match), and where the server could not record it, which it logs as a warning. |
command |
string | yes | The command that asked for it. A client whose change timed out with no key to retry with looks for this. |
origin |
RevisionOrigin |
yes | Where it came from: api, filesystem, cluster, dynamic-update, acme, witness or expiry. An expiry sweep makes no revision, so no row of the history has expiry. |
problem |
string | no | Why it was refused. Absent for a change that was applied. |
restorable |
boolean | yes | true where a rollback to this revision can find its content now: the row holds a record that names the revision, generations/<revision>/ is on disk, the revision does not run, and the row does not say failed. A fact of the moment of the read, not a promise: a prune can delete the directory before the rollback, which then answers 422. |
revision |
integer | yes | The number this change became. Numbers only ever go up, including for a rollback and for a change that was refused. |
running |
boolean | yes | true on the row of the revision that runs, and false on every other row. A rollback sends the tag of this row in If-Match. Where the running row is not on the page, no row of the page says true. |
state |
RevisionState |
yes | Where it got to: activated for a change that is running, failed for one that was refused, and staged or received for one a crash interrupted. |
summary |
string | yes | What the change was, in words. |
tag |
string | no | The entity tag of this revision, as a read of it carries in ETag, quotes and all: the value that If-Match takes. Absent for a change that made no generation, such as a refused one, and where the record does not read. |
RevisionOrigin
Section titled “RevisionOrigin”Where a change of the configuration came from.
One of api, filesystem, cluster, dynamic-update, acme, witness, expiry.
RevisionState
Section titled “RevisionState”Where a change of the configuration got to.
One of received, staged, activated, failed.
Search
Section titled “Search”What the blocking test does with the name for this client.
The search tests the rules alone. It does not resolve the name, so a block that a CNAME target
causes is not here: the query log row of such a query holds block_name and chain. It does
not apply the recursion access list, the decision of a zone transfer (AXFR and IXFR), or the
answers the server gives of its own before the rules, such as under resolver.arpa. An address does not
read an arrived_on selector, which needs the listener that a query came to.
| Field | Type | Required | Description |
|---|---|---|---|
by |
SearchRule |
no | The rule that decided. Absent for unlisted. |
bypass |
SearchBypass |
yes | Whether the address is in bypass: listed, not-listed, or not-tested for a search by client_name. |
client |
string | yes | The client, and default where no selector picks one. |
decision |
SearchDecision |
yes | What the rules answer, even where policy says that they did not run. |
group |
string | yes | The group of that client. |
matches |
array of SearchMatch |
yes | The rules that cover the name, in the order of the test: for each tier and each source of the group, the allow rule and the block rule that the set finds, then the first pattern rule of each action. Exactly one decides where decision is not unlisted. |
name |
string | yes | The name, as the server read it. |
policy |
string | yes | What a query gets now, in the words of the query log: applied, bypassed, disabled or group-off. |
qtype |
integer | yes | The type, as its number. |
SearchBypass
Section titled “SearchBypass”Whether the address of the search is in bypass. not-tested for a search by client_name,
which has no address.
One of listed, not-listed, not-tested.
SearchDecision
Section titled “SearchDecision”What the rules answer, even where policy says that they did not run.
One of blocked, allowed, unlisted.
SearchMatch
Section titled “SearchMatch”One rule that covers the name, and what it did in the test.
| Field | Type | Required | Description |
|---|---|---|---|
action |
string | yes | allow or block. |
effect |
string | yes | decides: this rule is by. cancelled: a block that an allow of its own source cancels. cancels: an allow that cancels the block of its own source. unused: it changes nothing. |
list |
string | no | The source that holds the rule. Absent for an entry of your own, a pattern and a built-in. |
origin |
string | yes | The words of block_origin, as in SearchRule. |
rule |
string | no | The rule, as in SearchRule. Absent for canary and private-relay. |
SearchRule
Section titled “SearchRule”One rule.
rule is never the line a list publisher wrote. For a list or an entry it is name or
*.name as this server compiled it, for a pattern it is the pattern as written, and a built-in
answer has none.
| Field | Type | Required | Description |
|---|---|---|---|
action |
string | yes | allow or block. |
list |
string | no | The source that holds the rule. Absent for an entry of your own, a pattern and a built-in. |
origin |
string | yes | The words of block_origin: source, baseline, group, regex, canary or private-relay. |
rule |
string | no | The rule. Absent for canary and private-relay. |
SecretChanged
Section titled “SecretChanged”What a change that is in place and durable answers.
| Field | Type | Required | Description |
|---|---|---|---|
reason |
SecretReloadReason |
no | Why the reload failed. Present with reload: failed alone. |
reload |
SecretReload |
yes |
SecretHealth
Section titled “SecretHealth”A secret of the node that is unreadable. It holds a name and a word of closed sets, and nothing of the file: no value, path, mode or user.
| Field | Type | Required | Description |
|---|---|---|---|
name |
SecretName |
yes | The name of the secret. |
reason |
SecretHealthReason |
yes | Why it is unreadable. |
SecretHealthReason
Section titled “SecretHealthReason”Why a secret of the node is unreadable. The words that start with directory_ are about
secrets/ or secrets/node/ under the state root, and then every secret has the same word.
One of link, not_a_file, wrong_owner, wrong_mode, empty, too_large, not_utf8, bad_character, unread, directory_link, directory_not_a_directory, directory_wrong_owner, directory_wrong_mode, directory_unread, unsettled.
SecretName
Section titled “SecretName”A secret of the node, by its name. The set is closed.
One of tls_pkcs12_password, outbound_proxy_password.
SecretReload
Section titled “SecretReload”What the reload after a change did.
One of served, failed, next_request, none.
SecretReloadReason
Section titled “SecretReloadReason”Why the reload after a change failed.
One of does_not_open, refused, moved.
SecretValue
Section titled “SecretValue”The body of a write: one JSON object with the one member value, and no other member.
| Field | Type | Required | Description |
|---|---|---|---|
value |
string | yes | The secret, as a string: 1 to 1024 bytes of UTF-8, with no NUL and no line break. |
SerialScheme
Section titled “SerialScheme”How the server moves the serial of a zone.
One of increment, unixtime, date.
Server
Section titled “Server”server.toml: how this server resolves.
| Field | Type | Required | Description |
|---|---|---|---|
aggressive_nsec |
boolean | no | Whether a cached, validated NSEC or NSEC3 record answers the other names it proves absent, with no question upstream, as RFC 8198 says. On by default. It does nothing while dnssec_validation is off. A name that a zone just added can stay absent here while the proof lives. That is three hours at most, and less where the zone’s SOA says so. Turn it off to stop a checked denial answering the names it was not stored under. In the recursive mode, a name below a cached NXDOMAIN with an SOA gets that NXDOMAIN with the setting on or off. A change keeps the answer cache. Turning it off drops the ranges that the server holds. |
cache_bytes |
integer | no | How much memory the cache accounts for, in bytes. At least 32768, and 67108864 by default. The cache divides it between shards, so a budget near the floor leaves each shard very little. |
case_randomization |
boolean | no | Whether each outgoing query writes its name in a random mixture of upper and lower case, and refuses a reply whose question comes back in another one. Every server treats the two as one name, so this costs nothing, and each letter is a bit a forged answer has to guess. On by default. A server that rewrites the case is found and asked in plain case for an hour. Turn it off to rule it out while debugging a middlebox. |
delegation_bytes |
integer | no | How much memory the recursive mode’s store of zone cuts accounts for, in bytes. At least 524288, and 8388608 by default. Nothing in it is served to a client: it is what the walk learned about which servers hold which zone. |
denial_without_soa_ttl |
integer | no | How long a denial with no SOA record is kept, in seconds: an NXDOMAIN, or an answer with no record of the type asked, whose answer section is empty and whose authority section contains no SOA. An answer with no record and an NS set is a referral and is not kept, but an NXDOMAIN with the NS set of the zone above the name is. 0 to 300, and 0 by default, which keeps none, as RFC 2308 section 5 advises. The smaller of this and maximum_ttl applies, and a DNSSEC proof that expires sooner ends it sooner. Such a denial is never served stale, and the cache does not use it for the names below it. Two resolvers that keep these denials and forward to each other can pass one back and forth with no end, so keep 0 where this server forwards to a resolver that can forward back. |
dnssec_sha1 |
string | no | What a zone signed with SHA-1, DNSSEC algorithms 5 and 7, proves. insecure, the default, treats the two as unsupported, as RFC 9905 says. Such a zone then answers without the AD bit, as an unsigned zone does, where no other algorithm signs it. validate checks them the way the other algorithms are checked, for a zone that has not moved to a stronger algorithm yet. A change empties the cache, because an answer stored under one of the two is not an answer under the other. |
dnssec_validation |
boolean | no | Whether an answer is checked against the DNSSEC signatures of its zone, from the root’s keys down. On by default. A name whose chain is broken then answers SERVFAIL rather than with data an attacker can write. Turn it off to rule validation out while debugging, and to get the behavior of a server without it. |
ecs_accept |
string | no | Whether an EDNS Client Subnet option from a sender in ecs_trust is honoured, as "off" or "trusted". Off by default. An option from anybody else is read and not used. |
ecs_exclude |
array of string | no | Zones whose servers never hear part of a client’s address, beside the root, every top-level domain and the common public suffixes such as co.uk, which this server already leaves out. A name per entry, up to 64, and empty by default. |
ecs_network |
array of string | no | The networks that queries of the recursive mode carry in place of the address of a client that sent no option, at most one of each family, such as ["93.184.216.0/24"]. Empty by default. For a server whose walk leaves through a network that is not its clients’, such as a tunnel, or a house whose clients are on private addresses. Every client of the family with no option then sends this network, and shares one cached answer. A client whose option is ignored, or that sends a SOURCE of 0, still sends nothing. Each network routes on the internet, and is no longer than the bits of ecs_send for its family. It needs ecs_send: turning ecs_send off needs ecs_network empty, or an empty ecs_network in the same body. Each refusal names ecs_network. Each authoritative server that the walk asks, outside the root, the top-level domains, the public suffixes and ecs_exclude, learns the network. |
ecs_send |
string | no | Whether queries this server sends carry part of the client’s address (RFC 7871), as "off" or a pair of prefix lengths such as "24/56": the bits of an IPv4 client and of an IPv6 one. Off by default. It gives a server behind one public address nothing, because its clients are on private addresses, which no option carries, unless ecs_network names its public network. Turning it off needs ecs_network empty, or an empty ecs_network in the same body. |
edns_answer_payload |
integer | no | The largest answer over UDP that this server sends to a client, in bytes, and the size that its answers offer in their OPT record. 512 to 4096, and 1232 by default. A client that offers less gets that much, and never less than 512, and a client with no OPT record gets 512 (RFC 1035 section 4.2.1). An answer that does not fit is cut, and the client asks again over TCP. A value above 1232 can be fragmented on the way, and a fragment can be lost or forged. A larger value also lets a forged query bring back a larger answer to its victim, so raise it only where the clients are known. |
edns_upstream_payload |
integer | no | The size that this server offers in the OPT record of each query that it sends, to a forwarder and to each server of the walk, in bytes. 512 to 4096, and 1232 by default. A server that answers more than fits gets the answer cut, and this server asks again over TCP. A value above 1232 invites answers that are fragmented on the way, and a fragment can be lost or forged. |
failure_ttl |
integer | no | How long a resolution failure is remembered, in seconds (RFC 9520). 1 to 300, and 60 by default. |
forward |
array of Forward |
no | The suffixes that go to a resolver of your choosing rather than to forwarders. 32 at most, and none by default. Each is a [[forward]] table. |
forwarder_concurrency |
integer | no | How many forwarders one question that a client waits for asks at once, and the first answer that passes the checks wins. 1 or 2, and 1 by default. With 2, the upstreams get about twice the queries. Background work, such as a prefetch, asks one at a time. |
forwarder_retries |
integer | no | How many attempts after the first failure, for a forwarder. 0 to 10. Without it, a forwarder takes max_retries, so the value of max_retries is its default. Every upstream is tried at least once whatever this says. |
forwarder_timeout_ms |
integer | no | How long to wait for one forwarder before trying the next, in milliseconds: an entry of forwarders or of the to of a [[forward]]. 100 to 10000. Without it, a forwarder waits upstream_timeout_ms, so the value of upstream_timeout_ms is its default. It must not outlive resolution_deadline_ms. The walk of the recursive mode keeps upstream_timeout_ms. |
forwarders |
array of string | no | Where to send a question this server cannot answer, in the forward mode. An address with a port after it, or without one to default to 53. A name is refused, because resolving one needs the resolver this list configures. A wildcard address and a port of zero are refused as well: neither is somewhere to send a query, and a wildcard means this machine. An entry that is one of this machine’s own listening addresses is refused as the change is applied. 8 addresses at most, counting each address in the parentheses of an encrypted entry. tcp:// and an address, such as tcp://192.0.2.1, asks over TCP alone on one kept connection, and comes back as tcp://192.0.2.1:53. It is not encrypted. Empty by default, which answers NXDOMAIN for every name this server does not hold. |
hedge |
boolean | no | Whether the recursive mode asks a second name server where the first takes three times its own average to reply. On by default. The first reply that is of use wins. Off, a walk that asks one server sends no second query. It acts on a walk that recursion_parallel leaves at 1: where that setting is 1, and for background work, such as a prefetch. Off leaves the groups of recursion_parallel on. |
ipv6 |
string | no | Whether the recursive mode reaches a name server over IPv6: "enabled", the default, uses whichever family answers and races the two for a server it has not measured. "disabled" never uses an IPv6 address, for a network with an IPv6 route and no IPv6 connectivity. "preferred" tries IPv6 first for a server it has not measured. |
keep_one_row_in |
integer | no | Keep one question in this many as a row of the query log. A question that is not kept as a row still counts in the hourly counts, which stay exact; the busiest lists, the devices and the percentiles come from the kept rows. 1 to 1000, and 1 by default, which keeps every question. Updates and zone transfers are always kept. A change applies to the next question, with no restart. |
lame_interval_minutes |
integer | no | How long the recursive mode leaves a name server alone after it answered for a zone as though it did not hold it, in minutes. 30 to 1440, and 30 by default, which is the least RFC 4697 section 2.2.1 recommends. The server is left alone for that zone only. Where every server of a zone is marked, the zone is asked anyway. |
latency_alpha |
integer | no | How far one measurement moves an upstream’s average round-trip time, in hundredths. 1 to 100, and 20 by default. |
local_zones |
boolean | no | Whether this server answers the 97 reverse zones of RFC 6303 and RFC 7793 itself. They are the reverse names of the addresses that no name on the public internet answers for: the private ranges, the shared address space a carrier hands out, loopback, link-local, the documentation ranges and the broadcast address. On by default, and turning it off sends those queries to the forwarders, which is what a router that knows the names of the addresses it handed out needs. localhost, test, invalid, home.arpa, local and onion are answered here whatever this is set to. |
max_concurrent_resolutions |
integer | no | How many resolutions this server runs at once, across every client. A query past it is answered SERVFAIL. 1 to 1024, and 256 by default: this server holds 1024 query sockets, and a resolution holds two at its worst, so 256 leave half of them for everything else. |
max_retries |
integer | no | How many attempts after the first failure, for a forwarder where forwarder_retries is absent. 0 to 10, and 2 by default. Every upstream is tried at least once whatever this says. |
maximum_ttl |
integer | no | The longest, in seconds, so a week-long answer cannot pin a name that changed. 60 to 604800, and 86400 by default. |
minimum_ttl |
integer | no | The shortest time to live an answer is stored with, in seconds. 0 to 86400, and 0 by default. It must not exceed maximum_ttl. |
negative_trust_anchor |
array of NegativeTrustAnchor |
no | The suffixes this server does not validate for a while, because their signatures are broken and their names still have to answer (RFC 7646). 32 at most, and none by default. Each is a [[negative_trust_anchor]] table. An entry acts until its until, and the cached answers under its suffix go when it starts and when it ends. No entry acts while the server does not trust its clock. |
prefetch_minimum_ttl |
integer | no | The shortest time to live an answer needs, in seconds, to be refreshed before it expires. 1 to 86400, and 10 by default. It must not exceed maximum_ttl. |
prefetch_trigger_percent |
integer | no | The share of an answer’s time to live left, in percent, where a hit refreshes it before it expires. 0 to 50, and 10 by default. 0 turns prefetch off. |
qname_minimization |
string | no | How much of a name the recursive mode tells each server on the way down (RFC 9156). relaxed tells each one only the next label, and where a server denies a name in the middle of a chain, asks the whole name once at that zone. strict never sends the whole name to a server that has not earned it, so a zone whose servers answer such a name wrongly stops resolving here while other resolvers still reach it. off sends the whole name to every server. relaxed by default. The forwarding mode sends whole names whatever this says, because the resolver it forwards to sees the whole name anyway. |
rate_connections |
integer | no | How many TCP connections one client address can hold open at once. Five times as many can be opened in a minute, which is five times this times rate_window_minutes in a window. A connection past either is closed before it is read. 0 to 1000, and 20 by default. Zero turns both limits off. |
rate_prefix |
string | no | The two prefix lengths that group the clients of the limits, as "V4/V6", such as "24/56", which is the default. The subnet of those lengths around each client address is allowed eight times the limits of one address. IPv4 takes 8 to 32, and IPv6 takes 32 to 128. "32/128" makes the subnet the address, so two addresses are never counted together. A change applies at once: each subnet starts its window again from the counts of its addresses, and the failures held off for a second are let go. The limits of a zone transfer keep a /24 and a /56. |
rate_queries_per_minute |
integer | no | How many queries one client address can send in a minute over TCP, DoT, DoH, DoQ and DoH over HTTP/3, times rate_window_minutes in its window, before this server drops the rest until the window ends. A query over plain UDP spends the same count, and is held to this bar only where rate_udp_queries_per_minute is absent. 0 to 1000000, and 1000 by default. Zero turns this bar off: a query over those transports is never refused, and it is still counted where the bar of UDP is on. Where rate_udp_queries_per_minute is absent, zero turns the bar of UDP off too, and nothing is counted. The subnet of rate_prefix around the address, a /24 or a /56 by default, is allowed eight times as many. |
rate_resolutions_in_flight |
integer | no | How many resolutions one client address can have running at once. 0 to 1000, and 100 by default. Zero turns the limit off. |
rate_resolutions_per_minute |
integer | no | How many resolutions one client address can start in a minute, times rate_window_minutes in its window. A resolution is a question the cache could not answer, which costs this server a forward or a walk. 0 to 100000, and 100 by default. Zero turns the limit off. A client past it still gets cached answers. |
rate_udp_queries_per_minute |
integer | no | How many queries over plain UDP one client address can send in a minute, times rate_window_minutes in its window. It is a second bar on the same count: a query over plain UDP passes under this bar, and a query over TCP, DoT, DoH, DoQ or DoH over HTTP/3 passes under rate_queries_per_minute, so a query over TCP spends what UDP can send too. 0 to 1000000. Without it, UDP takes rate_queries_per_minute, so the value of rate_queries_per_minute is its default. Zero turns this bar off, and queries over UDP are still counted where the other bar is on. The subnet of rate_prefix is allowed eight times as many. |
rate_window_minutes |
integer | no | How many minutes one count of a client runs over. Each limit of a minute holds that many times as much over the window, and a client can spend the whole of it at once: with 5, a client can send 5000 queries in its five minutes at the default. Resolutions waiting and connections open are counts of now, so the window does not change them. Where the table of counts is full, the entry of a client at or over half of a limit is not dropped to make room before its window ends. 1 to 60, and 1 by default. A change applies to every client at once. |
rebind_allow |
array of string | no | Names whose private answers are expected, so the check lets them through. At most 64, and empty by default. One name per entry, and a name under an entry is not covered by it. |
rebind_inside |
array of string | no | Addresses and prefixes this network calls its own, added to the ranges the check already holds. At most 16, and empty by default. Write the global IPv6 prefix your provider delegates to you here, such as 2001:db8:1234::/56. It reaches the inside of one network only, so no default can name it. An entry can be one address instead of a prefix. Three entries are refused: a prefix of length zero, which holds every address of its family, a range inside the part of IPv6 that holds an IPv4 address, which you write in its IPv4 form instead, and the same entry twice. 0.0.0.0 and :: stay served whatever you write here. |
rebind_nat64 |
array of string | no | The NAT64 prefixes this network reaches IPv4 through, such as 64:ff9b::/96. At most 4, and empty by default. An address inside one of these carries an IPv4 address (RFC 6052), and that address is what the check reads: a public one is served, and a private one is refused. This is a separate setting from rebind_inside because it is a separate rule. An entry has to be an IPv6 prefix of length 32, 40, 48, 56, 64 or 96, which is where RFC 6052 puts the address. |
rebind_protection |
boolean | no | Whether an answer from outside that points at a private address is refused. On by default. It is what stops a name on the internet becoming a way to reach the router. |
recursion_parallel |
integer | no | How many addresses of the name servers of a zone the walk asks at once at its first exchange with the zone, for a question that a client waits for. The first reply of use wins. 1 to 3, and 1 by default, the walk of before with its hedge. With 2 or 3 the walk asks up to that many: fewer where fewer addresses are known or the budget of the walk is short, and one alone on a turn of exploration or where the query carries part of a client’s address. The name servers get up to that many times the queries of a first exchange. Background work, such as a prefetch, walks as with 1: no group, and its hedge where hedge is on. |
resolution |
string | no | How a question no zone and no [[forward]] covers is answered. forward hands it to forwarders, and recurse walks from the root down to the servers that hold the name. forward by default, because nobody compared the checks of a walk with those of another validator yet. recurse beside a non-empty forwarders is refused, because the file then says two things. |
resolution_deadline_ms |
integer | no | How long one resolution takes at most, across every attempt, in milliseconds. 100 to 10000, and 3000 by default. |
retention_days |
integer | no | How long a query log row is kept, in days. 1 to 3650, and 30 by default. |
retention_mib |
integer | no | The most room that the query log and its statistics take, in MiB: the data and the write-ahead log, not the free pages that SQLite reuses. 64 to 65536, and 512 by default. The rows give way to it oldest first, after the lists of the hours are held to a quarter of it. |
root_hints |
array of string | no | The addresses the recursive mode asks for the root’s servers when it has none, one IP address per entry and no port. At most 64. Left out, the server uses the list built into it, which is the one the root’s operator publishes. An empty list is refused, because a recursive server with no way to a root answers nothing. So is an address that is not a host on a network, such as loopback, and an address named twice. |
stale_answer_ttl |
integer | no | The time to live a stale answer goes out with, in seconds. 1 to 300, and 30 by default. |
stale_max_wait_ms |
integer | no | How long a query waits for a refresh before it gets the stale answer, in milliseconds. 0 to 1800, and 1800 by default. 0 sends the stale answer at once and refreshes behind it. |
stale_reset_ttl |
integer | no | After a failed refresh, how long stale data answers at once with no new attempt, in seconds. 1 to 300, and 30 by default. |
stale_ttl |
integer | no | How long past its time to live an answer is kept for serve-stale, in seconds (RFC 8767). 0 to 604800, and 259200, three days, by default. 0 turns serve-stale off. |
stats_retention_days |
integer | no | How long the hourly counts are kept, in days. 30 to 3650, and 1826 (five years) by default. At about 60 KiB a day, they must fit a quarter of retention_mib, or the file is refused. |
store_clients |
boolean | no | Whether the query log stores who asked: the address, and the client that clients.toml names for it. On by default. |
store_names |
boolean | no | Whether the query log stores the name that was asked for, the upstream that answered, and the path of the answer. On by default, and turning it off stops new rows carrying them. |
upstream_timeout_ms |
integer | no | How long to wait for one upstream before trying elsewhere, in milliseconds. 100 to 10000, and 2000 by default. It must not outlive resolution_deadline_ms. The walk of the recursive mode waits this long for each name server, and a forwarder waits this long where forwarder_timeout_ms is absent. |
zones |
ZoneDefaults |
no | The values a zone gets where nobody wrote one: the lifetime of a record that the API adds, the SOA of a zone that the API creates, the scheme of the serial, and who may ask a zone. A [zones] table, after every setting above it. In a PATCH, one key at a time by its dotted name, such as zones.default_ttl. Every key acts with no restart. serial acts on each change that the server makes to a zone, query_from on each query, transfer on each zone transfer and notify on each change of a serial. default_ttl and ns_ttl act on each record change and on POST /api/zones. min_refresh, max_refresh, min_retry and max_retry bound the timers of a secondary zone, which this build reads and does not serve yet. The rest act on POST /api/zones. |
ServerPatch
Section titled “ServerPatch”The body of PATCH /api/server: the settings of server.toml to change, with each key of [zones] by its dotted name. A key that the body leaves out stays as it is, and a key sent as null goes back to its default. forward and negative_trust_anchor take the whole list and replace every block of it: the comment lines above each block stay by place, and those inside a block are lost. A list equal to the one that runs changes nothing, and an empty list or null takes every block out. zones.transfer.allow takes the rules of zone transfers the same way, as [[zones.transfer.allow]] blocks after every other key of [zones]. The table zones.transfer is not sent by its own name.
| Field | Type | Required | Description |
|---|---|---|---|
aggressive_nsec |
boolean | no | Whether a cached, validated NSEC or NSEC3 record answers the other names it proves absent, with no question upstream, as RFC 8198 says. On by default. It does nothing while dnssec_validation is off. A name that a zone just added can stay absent here while the proof lives. That is three hours at most, and less where the zone’s SOA says so. Turn it off to stop a checked denial answering the names it was not stored under. In the recursive mode, a name below a cached NXDOMAIN with an SOA gets that NXDOMAIN with the setting on or off. A change keeps the answer cache. Turning it off drops the ranges that the server holds. |
cache_bytes |
integer | no | How much memory the cache accounts for, in bytes. At least 32768, and 67108864 by default. The cache divides it between shards, so a budget near the floor leaves each shard very little. |
case_randomization |
boolean | no | Whether each outgoing query writes its name in a random mixture of upper and lower case, and refuses a reply whose question comes back in another one. Every server treats the two as one name, so this costs nothing, and each letter is a bit a forged answer has to guess. On by default. A server that rewrites the case is found and asked in plain case for an hour. Turn it off to rule it out while debugging a middlebox. |
delegation_bytes |
integer | no | How much memory the recursive mode’s store of zone cuts accounts for, in bytes. At least 524288, and 8388608 by default. Nothing in it is served to a client: it is what the walk learned about which servers hold which zone. |
denial_without_soa_ttl |
integer | no | How long a denial with no SOA record is kept, in seconds: an NXDOMAIN, or an answer with no record of the type asked, whose answer section is empty and whose authority section contains no SOA. An answer with no record and an NS set is a referral and is not kept, but an NXDOMAIN with the NS set of the zone above the name is. 0 to 300, and 0 by default, which keeps none, as RFC 2308 section 5 advises. The smaller of this and maximum_ttl applies, and a DNSSEC proof that expires sooner ends it sooner. Such a denial is never served stale, and the cache does not use it for the names below it. Two resolvers that keep these denials and forward to each other can pass one back and forth with no end, so keep 0 where this server forwards to a resolver that can forward back. |
dnssec_sha1 |
string | no | What a zone signed with SHA-1, DNSSEC algorithms 5 and 7, proves. insecure, the default, treats the two as unsupported, as RFC 9905 says. Such a zone then answers without the AD bit, as an unsigned zone does, where no other algorithm signs it. validate checks them the way the other algorithms are checked, for a zone that has not moved to a stronger algorithm yet. A change empties the cache, because an answer stored under one of the two is not an answer under the other. |
dnssec_validation |
boolean | no | Whether an answer is checked against the DNSSEC signatures of its zone, from the root’s keys down. On by default. A name whose chain is broken then answers SERVFAIL rather than with data an attacker can write. Turn it off to rule validation out while debugging, and to get the behavior of a server without it. |
ecs_accept |
string | no | Whether an EDNS Client Subnet option from a sender in ecs_trust is honoured, as "off" or "trusted". Off by default. An option from anybody else is read and not used. |
ecs_exclude |
array of string | no | Zones whose servers never hear part of a client’s address, beside the root, every top-level domain and the common public suffixes such as co.uk, which this server already leaves out. A name per entry, up to 64, and empty by default. |
ecs_network |
array of string | no | The networks that queries of the recursive mode carry in place of the address of a client that sent no option, at most one of each family, such as ["93.184.216.0/24"]. Empty by default. For a server whose walk leaves through a network that is not its clients’, such as a tunnel, or a house whose clients are on private addresses. Every client of the family with no option then sends this network, and shares one cached answer. A client whose option is ignored, or that sends a SOURCE of 0, still sends nothing. Each network routes on the internet, and is no longer than the bits of ecs_send for its family. It needs ecs_send: turning ecs_send off needs ecs_network empty, or an empty ecs_network in the same body. Each refusal names ecs_network. Each authoritative server that the walk asks, outside the root, the top-level domains, the public suffixes and ecs_exclude, learns the network. |
ecs_send |
string | no | Whether queries this server sends carry part of the client’s address (RFC 7871), as "off" or a pair of prefix lengths such as "24/56": the bits of an IPv4 client and of an IPv6 one. Off by default. It gives a server behind one public address nothing, because its clients are on private addresses, which no option carries, unless ecs_network names its public network. Turning it off needs ecs_network empty, or an empty ecs_network in the same body. |
edns_answer_payload |
integer | no | The largest answer over UDP that this server sends to a client, in bytes, and the size that its answers offer in their OPT record. 512 to 4096, and 1232 by default. A client that offers less gets that much, and never less than 512, and a client with no OPT record gets 512 (RFC 1035 section 4.2.1). An answer that does not fit is cut, and the client asks again over TCP. A value above 1232 can be fragmented on the way, and a fragment can be lost or forged. A larger value also lets a forged query bring back a larger answer to its victim, so raise it only where the clients are known. |
edns_upstream_payload |
integer | no | The size that this server offers in the OPT record of each query that it sends, to a forwarder and to each server of the walk, in bytes. 512 to 4096, and 1232 by default. A server that answers more than fits gets the answer cut, and this server asks again over TCP. A value above 1232 invites answers that are fragmented on the way, and a fragment can be lost or forged. |
failure_ttl |
integer | no | How long a resolution failure is remembered, in seconds (RFC 9520). 1 to 300, and 60 by default. |
forward |
array of Forward |
no | The suffixes that go to a resolver of your choosing rather than to forwarders. 32 at most, and none by default. Each is a [[forward]] table. |
forwarder_concurrency |
integer | no | How many forwarders one question that a client waits for asks at once, and the first answer that passes the checks wins. 1 or 2, and 1 by default. With 2, the upstreams get about twice the queries. Background work, such as a prefetch, asks one at a time. |
forwarder_retries |
integer | no | How many attempts after the first failure, for a forwarder. 0 to 10. Without it, a forwarder takes max_retries, so the value of max_retries is its default. Every upstream is tried at least once whatever this says. |
forwarder_timeout_ms |
integer | no | How long to wait for one forwarder before trying the next, in milliseconds: an entry of forwarders or of the to of a [[forward]]. 100 to 10000. Without it, a forwarder waits upstream_timeout_ms, so the value of upstream_timeout_ms is its default. It must not outlive resolution_deadline_ms. The walk of the recursive mode keeps upstream_timeout_ms. |
forwarders |
array of string | no | Where to send a question this server cannot answer, in the forward mode. An address with a port after it, or without one to default to 53. A name is refused, because resolving one needs the resolver this list configures. A wildcard address and a port of zero are refused as well: neither is somewhere to send a query, and a wildcard means this machine. An entry that is one of this machine’s own listening addresses is refused as the change is applied. 8 addresses at most, counting each address in the parentheses of an encrypted entry. tcp:// and an address, such as tcp://192.0.2.1, asks over TCP alone on one kept connection, and comes back as tcp://192.0.2.1:53. It is not encrypted. Empty by default, which answers NXDOMAIN for every name this server does not hold. |
hedge |
boolean | no | Whether the recursive mode asks a second name server where the first takes three times its own average to reply. On by default. The first reply that is of use wins. Off, a walk that asks one server sends no second query. It acts on a walk that recursion_parallel leaves at 1: where that setting is 1, and for background work, such as a prefetch. Off leaves the groups of recursion_parallel on. |
ipv6 |
string | no | Whether the recursive mode reaches a name server over IPv6: "enabled", the default, uses whichever family answers and races the two for a server it has not measured. "disabled" never uses an IPv6 address, for a network with an IPv6 route and no IPv6 connectivity. "preferred" tries IPv6 first for a server it has not measured. |
keep_one_row_in |
integer | no | Keep one question in this many as a row of the query log. A question that is not kept as a row still counts in the hourly counts, which stay exact; the busiest lists, the devices and the percentiles come from the kept rows. 1 to 1000, and 1 by default, which keeps every question. Updates and zone transfers are always kept. A change applies to the next question, with no restart. |
lame_interval_minutes |
integer | no | How long the recursive mode leaves a name server alone after it answered for a zone as though it did not hold it, in minutes. 30 to 1440, and 30 by default, which is the least RFC 4697 section 2.2.1 recommends. The server is left alone for that zone only. Where every server of a zone is marked, the zone is asked anyway. |
latency_alpha |
integer | no | How far one measurement moves an upstream’s average round-trip time, in hundredths. 1 to 100, and 20 by default. |
local_zones |
boolean | no | Whether this server answers the 97 reverse zones of RFC 6303 and RFC 7793 itself. They are the reverse names of the addresses that no name on the public internet answers for: the private ranges, the shared address space a carrier hands out, loopback, link-local, the documentation ranges and the broadcast address. On by default, and turning it off sends those queries to the forwarders, which is what a router that knows the names of the addresses it handed out needs. localhost, test, invalid, home.arpa, local and onion are answered here whatever this is set to. |
max_concurrent_resolutions |
integer | no | How many resolutions this server runs at once, across every client. A query past it is answered SERVFAIL. 1 to 1024, and 256 by default: this server holds 1024 query sockets, and a resolution holds two at its worst, so 256 leave half of them for everything else. |
max_retries |
integer | no | How many attempts after the first failure, for a forwarder where forwarder_retries is absent. 0 to 10, and 2 by default. Every upstream is tried at least once whatever this says. |
maximum_ttl |
integer | no | The longest, in seconds, so a week-long answer cannot pin a name that changed. 60 to 604800, and 86400 by default. |
minimum_ttl |
integer | no | The shortest time to live an answer is stored with, in seconds. 0 to 86400, and 0 by default. It must not exceed maximum_ttl. |
negative_trust_anchor |
array of NegativeTrustAnchor |
no | The suffixes this server does not validate for a while, because their signatures are broken and their names still have to answer (RFC 7646). 32 at most, and none by default. Each is a [[negative_trust_anchor]] table. An entry acts until its until, and the cached answers under its suffix go when it starts and when it ends. No entry acts while the server does not trust its clock. |
prefetch_minimum_ttl |
integer | no | The shortest time to live an answer needs, in seconds, to be refreshed before it expires. 1 to 86400, and 10 by default. It must not exceed maximum_ttl. |
prefetch_trigger_percent |
integer | no | The share of an answer’s time to live left, in percent, where a hit refreshes it before it expires. 0 to 50, and 10 by default. 0 turns prefetch off. |
qname_minimization |
string | no | How much of a name the recursive mode tells each server on the way down (RFC 9156). relaxed tells each one only the next label, and where a server denies a name in the middle of a chain, asks the whole name once at that zone. strict never sends the whole name to a server that has not earned it, so a zone whose servers answer such a name wrongly stops resolving here while other resolvers still reach it. off sends the whole name to every server. relaxed by default. The forwarding mode sends whole names whatever this says, because the resolver it forwards to sees the whole name anyway. |
rate_connections |
integer | no | How many TCP connections one client address can hold open at once. Five times as many can be opened in a minute, which is five times this times rate_window_minutes in a window. A connection past either is closed before it is read. 0 to 1000, and 20 by default. Zero turns both limits off. |
rate_prefix |
string | no | The two prefix lengths that group the clients of the limits, as "V4/V6", such as "24/56", which is the default. The subnet of those lengths around each client address is allowed eight times the limits of one address. IPv4 takes 8 to 32, and IPv6 takes 32 to 128. "32/128" makes the subnet the address, so two addresses are never counted together. A change applies at once: each subnet starts its window again from the counts of its addresses, and the failures held off for a second are let go. The limits of a zone transfer keep a /24 and a /56. |
rate_queries_per_minute |
integer | no | How many queries one client address can send in a minute over TCP, DoT, DoH, DoQ and DoH over HTTP/3, times rate_window_minutes in its window, before this server drops the rest until the window ends. A query over plain UDP spends the same count, and is held to this bar only where rate_udp_queries_per_minute is absent. 0 to 1000000, and 1000 by default. Zero turns this bar off: a query over those transports is never refused, and it is still counted where the bar of UDP is on. Where rate_udp_queries_per_minute is absent, zero turns the bar of UDP off too, and nothing is counted. The subnet of rate_prefix around the address, a /24 or a /56 by default, is allowed eight times as many. |
rate_resolutions_in_flight |
integer | no | How many resolutions one client address can have running at once. 0 to 1000, and 100 by default. Zero turns the limit off. |
rate_resolutions_per_minute |
integer | no | How many resolutions one client address can start in a minute, times rate_window_minutes in its window. A resolution is a question the cache could not answer, which costs this server a forward or a walk. 0 to 100000, and 100 by default. Zero turns the limit off. A client past it still gets cached answers. |
rate_udp_queries_per_minute |
integer | no | How many queries over plain UDP one client address can send in a minute, times rate_window_minutes in its window. It is a second bar on the same count: a query over plain UDP passes under this bar, and a query over TCP, DoT, DoH, DoQ or DoH over HTTP/3 passes under rate_queries_per_minute, so a query over TCP spends what UDP can send too. 0 to 1000000. Without it, UDP takes rate_queries_per_minute, so the value of rate_queries_per_minute is its default. Zero turns this bar off, and queries over UDP are still counted where the other bar is on. The subnet of rate_prefix is allowed eight times as many. |
rate_window_minutes |
integer | no | How many minutes one count of a client runs over. Each limit of a minute holds that many times as much over the window, and a client can spend the whole of it at once: with 5, a client can send 5000 queries in its five minutes at the default. Resolutions waiting and connections open are counts of now, so the window does not change them. Where the table of counts is full, the entry of a client at or over half of a limit is not dropped to make room before its window ends. 1 to 60, and 1 by default. A change applies to every client at once. |
rebind_allow |
array of string | no | Names whose private answers are expected, so the check lets them through. At most 64, and empty by default. One name per entry, and a name under an entry is not covered by it. |
rebind_inside |
array of string | no | Addresses and prefixes this network calls its own, added to the ranges the check already holds. At most 16, and empty by default. Write the global IPv6 prefix your provider delegates to you here, such as 2001:db8:1234::/56. It reaches the inside of one network only, so no default can name it. An entry can be one address instead of a prefix. Three entries are refused: a prefix of length zero, which holds every address of its family, a range inside the part of IPv6 that holds an IPv4 address, which you write in its IPv4 form instead, and the same entry twice. 0.0.0.0 and :: stay served whatever you write here. |
rebind_nat64 |
array of string | no | The NAT64 prefixes this network reaches IPv4 through, such as 64:ff9b::/96. At most 4, and empty by default. An address inside one of these carries an IPv4 address (RFC 6052), and that address is what the check reads: a public one is served, and a private one is refused. This is a separate setting from rebind_inside because it is a separate rule. An entry has to be an IPv6 prefix of length 32, 40, 48, 56, 64 or 96, which is where RFC 6052 puts the address. |
rebind_protection |
boolean | no | Whether an answer from outside that points at a private address is refused. On by default. It is what stops a name on the internet becoming a way to reach the router. |
recursion_parallel |
integer | no | How many addresses of the name servers of a zone the walk asks at once at its first exchange with the zone, for a question that a client waits for. The first reply of use wins. 1 to 3, and 1 by default, the walk of before with its hedge. With 2 or 3 the walk asks up to that many: fewer where fewer addresses are known or the budget of the walk is short, and one alone on a turn of exploration or where the query carries part of a client’s address. The name servers get up to that many times the queries of a first exchange. Background work, such as a prefetch, walks as with 1: no group, and its hedge where hedge is on. |
resolution |
string | no | How a question no zone and no [[forward]] covers is answered. forward hands it to forwarders, and recurse walks from the root down to the servers that hold the name. forward by default, because nobody compared the checks of a walk with those of another validator yet. recurse beside a non-empty forwarders is refused, because the file then says two things. |
resolution_deadline_ms |
integer | no | How long one resolution takes at most, across every attempt, in milliseconds. 100 to 10000, and 3000 by default. |
retention_days |
integer | no | How long a query log row is kept, in days. 1 to 3650, and 30 by default. |
retention_mib |
integer | no | The most room that the query log and its statistics take, in MiB: the data and the write-ahead log, not the free pages that SQLite reuses. 64 to 65536, and 512 by default. The rows give way to it oldest first, after the lists of the hours are held to a quarter of it. |
root_hints |
array of string | no | The addresses the recursive mode asks for the root’s servers when it has none, one IP address per entry and no port. At most 64. Left out, the server uses the list built into it, which is the one the root’s operator publishes. An empty list is refused, because a recursive server with no way to a root answers nothing. So is an address that is not a host on a network, such as loopback, and an address named twice. |
stale_answer_ttl |
integer | no | The time to live a stale answer goes out with, in seconds. 1 to 300, and 30 by default. |
stale_max_wait_ms |
integer | no | How long a query waits for a refresh before it gets the stale answer, in milliseconds. 0 to 1800, and 1800 by default. 0 sends the stale answer at once and refreshes behind it. |
stale_reset_ttl |
integer | no | After a failed refresh, how long stale data answers at once with no new attempt, in seconds. 1 to 300, and 30 by default. |
stale_ttl |
integer | no | How long past its time to live an answer is kept for serve-stale, in seconds (RFC 8767). 0 to 604800, and 259200, three days, by default. 0 turns serve-stale off. |
stats_retention_days |
integer | no | How long the hourly counts are kept, in days. 30 to 3650, and 1826 (five years) by default. At about 60 KiB a day, they must fit a quarter of retention_mib, or the file is refused. |
store_clients |
boolean | no | Whether the query log stores who asked: the address, and the client that clients.toml names for it. On by default. |
store_names |
boolean | no | Whether the query log stores the name that was asked for, the upstream that answered, and the path of the answer. On by default, and turning it off stops new rows carrying them. |
upstream_timeout_ms |
integer | no | How long to wait for one upstream before trying elsewhere, in milliseconds. 100 to 10000, and 2000 by default. It must not outlive resolution_deadline_ms. The walk of the recursive mode waits this long for each name server, and a forwarder waits this long where forwarder_timeout_ms is absent. |
zones.default_ttl |
integer | no | The lifetime of a record that the API adds without one, in seconds. 0 to 2147483647, and 3600 by default. |
zones.expire |
integer | no | How long a secondary serves the zone without a check, in seconds. At least refresh plus retry, at most 2147483647, and 1209600 (two weeks) by default. |
zones.max_refresh |
integer | no | The most time between two checks of the serial of a secondary zone, in seconds, for each secondary whose zone.toml names none. At least min_refresh, at most 2147483647, and 86400 (one day) by default. |
zones.max_retry |
integer | no | The most time before a secondary zone tries again after a failed check, in seconds, for each secondary whose zone.toml names none. At least min_retry, at most 2147483647, and 3600 by default. |
zones.min_refresh |
integer | no | The least time between two checks of the serial of a secondary zone, in seconds, for each secondary whose zone.toml names none. The refresh of the SOA of its copy is held to it. Between 60 and 2147483647, and 300 by default. |
zones.min_retry |
integer | no | The least time before a secondary zone tries again after a failed check, in seconds, for each secondary whose zone.toml names none. The retry of the SOA of its copy is held to it. Between 10 and 2147483647, and 60 by default. |
zones.minimum |
integer | no | The lifetime of a negative answer from a created zone, in seconds (RFC 2308 section 4). 0 to 2147483647, and 300 by default. |
zones.name_server |
string | no | The primary name server of a zone that the API creates, which its SOA and its NS set name. A host name: labels of letters, digits and hyphens, with no hyphen at either end. An address, a wildcard and the root are refused. No default, because no name is right for every network. |
zones.notify |
array of string | no | The secondaries that a zone notifies when its serial changes, for every zone that names no list of its own. Up to 16 entries, each an address with a port after it or left out for 53, such as 192.0.2.53 or [2001:db8::53]:5300. Nobody by default. A NOTIFY goes to each entry at a change of the serial and at each start, over UDP. |
zones.ns_ttl |
integer | no | The lifetime of the NS set of a primary or a stub that the API creates, and of an NS set that the API adds without a lifetime, in seconds. 0 to 2147483647. Without it, an NS set takes default_ttl, so the value of default_ttl is its default. A stub serves no lifetime of its own, so for a stub ns_ttl sets only the text of its records.zone. |
zones.query_from |
array of string | no | The networks whose clients get answers from a zone. The private and local ranges of allow_recursion by default: 127.0.0.0/8, ::1, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16, fe80::/10 and fc00::/7. A zone that the internet asks needs ["0.0.0.0/0", "::/0"]. 64 entries at most. |
zones.refresh |
integer | no | How often a secondary checks the serial of a created zone, in seconds. 60 to 2147483647, and 3600 by default. |
zones.responsible |
string | no | The mailbox of the person responsible for a created zone: a local part, which the apex of the zone completes, or a whole address. hostmaster by default (RFC 2142 section 7). A local part is letters, digits, dots and the signs of a plain mailbox, 63 bytes at most, and its dots become \. in the RNAME: [email protected] is first\.last.example.com.. A quoted local part, a space and a mailbox outside ASCII are refused. |
zones.retry |
integer | no | How long a secondary waits after a failed check, in seconds. 0 to 2147483647, and 900 by default. |
zones.serial |
string | no | How the server moves the serial of a zone on each change it makes: increment, unixtime or date. increment by default, which never runs ahead of a date however many changes a day brings. |
zones.soa_ttl |
integer | no | The lifetime of the SOA record of a created zone, in seconds. 0 to 2147483647, and 3600 by default. |
zones.transfer.allow |
array of TransferAllow |
no | The rules, 16 at most: one [[zones.transfer.allow]] block each in server.toml, and one [[transfer.allow]] block each in zone.toml. A client that one rule allows can transfer the zone, where the query_from of the zone, and that of each zone of this server below it, hold the client too. No rule allows nobody. |
Serving
Section titled “Serving”The set of one source that is answering queries.
| Field | Type | Required | Description |
|---|---|---|---|
bytes |
integer | yes | What it costs to hold, in bytes. The sum over the sources is what an operator on a small machine reads before adding another list. |
counts |
SourceCounts |
yes | What the reader made of that body. |
fetched_at |
integer | no | When the body it was compiled from arrived, in seconds since the epoch. The body’s own age. An origin that answers “your copy is current” for a year is checked every hour and its body is a year old, so this and last_attempt.succeeded_at are two numbers. Absent where this server cannot say which body is serving, which is a restart after a pass whose write to disk failed. |
rules |
integer | yes | Rules of the action of the source in it: block rules for a block source, and allow rules for an allow source. |
SetBlockingState
Section titled “SetBlockingState”What PUT /api/blocking/state asks for.
Unknown fields are refused, which no other body on this API does. The reason is what a
typo costs here: {"disabled": true, "seonds": 600} read leniently leaves seconds unset,
and unset means off until an enable. A misspelling that turns a ten-minute disable into an
unbounded one is worse than a refusal naming the field.
| Field | Type | Required | Description |
|---|---|---|---|
disabled |
boolean | yes | true to turn blocking off, false to turn it back on. |
seconds |
integer | no | How long to stay off, from 1 to 86400 seconds. Absent means until an enable. Refused together with disabled: false, because there is no length to turn blocking on for. |
SetTtl
Section titled “SetTtl”The lifetime of the set of owner and type.
| Field | Type | Required | Description |
|---|---|---|---|
owner |
string | yes | The owner of the set, an absolute name. |
ttl |
integer | yes | The lifetime in seconds, at most 2,147,483,647 (RFC 2181 section 8). |
type |
string | yes | The type of the set, such as A, or TYPE65280. |
SettingDifference
Section titled “SettingDifference”One setting that a rollback changes, with the value that runs and the value that comes back.
| Field | Type | Required | Description |
|---|---|---|---|
restored |
object | no | The value that the rollback brings back, as JSON as running is. Absent where that file does not hold it: the default applies after the rollback. |
running |
object | no | The value that runs, as JSON of the type of the setting: a number, a string, a list, a table as an object. Absent where the running file does not hold it: the default applies. |
setting |
string | yes | The dotted name, as changed of a revision gives it. |
What a first boot is asked for: the token, and who the first administrator is.
| Field | Type | Required | Description |
|---|---|---|---|
password |
string | yes | Their password, at least 12 characters. There are no rules about which characters: length is what makes a password hard to guess. |
token |
string | yes | The token from the file in the state root. |
user |
string | yes | The name the first administrator will have: lower case letters, digits, and - _ ., at most 64 characters. |
SetupState
Section titled “SetupState”Whether this server still needs its first administrator, and whether its setup token works.
The answer of GET /api/setup. Only setup::status builds one, so token_usable is there
exactly while needed is true. It names no token and no path, because a stranger calls this
route.
| Field | Type | Required | Description |
|---|---|---|---|
needed |
boolean | yes | True while no account with the role admin can log in. That is when a start writes a setup token. |
token_usable |
boolean | no | Whether a start would keep the setup token in the state root. There while needed is true. False means that the next start writes a new token: the file is missing, does not read, or no longer matches its row, its row expired, or, on Unix, its mode is wider than 0600. Until that start, a token copied before can still redeem. |
SocketCountsHealth
Section titled “SocketCountsHealth”A count of sockets by protocol, 0 where the listener has none of it. The list of the listener
names the transport on top: the UDP socket of quic_listen carries DNS over QUIC.
| Field | Type | Required | Description |
|---|---|---|---|
tcp |
integer | yes | The TCP socket of listen, or the socket of a listener of TLS, HTTPS or HTTP. |
udp |
integer | yes | The UDP sockets: one for each UDP worker of listen, or the socket of a listener of QUIC or HTTP/3. |
SourceAction
Section titled “SourceAction”What the rules of one blocklist source do: block or allow, the words of action on a
pattern rule.
One of block, allow.
SourceCounts
Section titled “SourceCounts”What the reader made of one body.
The same six numbers the log line for that source carries, so a report and a log line say the
same thing. rules is beside them in serving, because it is the count after the repeats are
dropped rather than something the reader counted.
| Field | Type | Required | Description |
|---|---|---|---|
cancelled |
integer | yes | Rules a $badfilter line in the same list took out. |
cancels_unmatched |
integer | yes | Cancellations that matched no rule in this list. |
candidates |
integer | yes | Lines the reader was meant to make a rule of. |
duplicates |
integer | yes | Lines whose name was already there. |
ignored |
integer | yes | Comments, blank lines and real hosts mappings. |
invalid |
integer | yes | Lines that look like a rule and hold no usable name. |
lines |
integer | yes | Lines in the body, which is what wc -l says. |
unread |
UnreadCounts |
yes | Which shapes the unsupported lines were. |
unsupported |
integer | yes | Lines in a syntax this build does not read. |
SourceReport
Section titled “SourceReport”One blocklist source, as an operator reads it.
Three groups, because the fields answer three different questions and a flat row made them look like one. What is serving, what the last pass did, and when the next one is. A row that mixed them said “224,572 rules” beside “the publisher declares 480 minutes” for two different bodies.
| Field | Type | Required | Description |
|---|---|---|---|
action |
SourceAction |
yes | What its rules do: block blocks their names, and allow answers them normally whatever a block rule says. serving.rules counts the rules of this action. |
id |
string | yes | The id the configuration gave it, which is the block_list column of a blocked query’s row. |
interval_minutes |
integer | no | How often this source is read, in minutes. The interval the last pass decided on, which is the source’s own number, or the file’s shortened by what the publisher declares. Not the time left before the next read, which next_at gives, and not the half minute a source that did not answer is tried again on. |
last_attempt |
LastAttempt |
no | What the last pass over it did, where one has run under the settings it names now. Absent for a source somebody just added and for one whose settings just changed: the pass this server remembers was about the list as it used to be read. |
next_at |
integer | no | When the timer reads this source next, in seconds since the epoch. An estimate. The interval, a tenth longer at most by the jitter, or the half minute after a host that did not answer. Absent until the timer first reads the source after a start, while the source is due now, and at once after a change of its address, its list file, its compile settings or the limits of its gate. A change of refresh_hours or min_refresh_minutes leaves it, and the new interval counts from the read after it. A refresh that somebody asks for does not move it. It is the clock of this server when the answer is made, plus the time left before the read, so it follows a step of the clock and is never in the past while the read is ahead. |
origin |
string | yes | Where it reads from now: the URL, or the path inside the config root. |
serving |
Serving |
no | What is answering queries for this source, where anything is. |
state |
SourceReportState |
yes | What this source is serving: ok, refused or empty. ok means a set of its rules is answering queries. refused means it is serving nothing and a gate refused the body it read, which is the case an operator can decide about. empty is every other way of serving nothing: a source nothing has read yet, one whose host did not answer, and one whose body this build could not read. last_attempt says which. |
uploaded |
boolean | yes | Whether it reads blocklists/<id>.txt, the place where an upload writes the list of the source <id>. So it is true for a source written by hand at that place too, and the upload of a new version and the delete of the list are for such a source alone. |
SourceReportState
Section titled “SourceReportState”What one blocklist source is serving.
One of ok, refused, empty.
SourceRun
Section titled “SourceRun”What the run did with one source.
| Field | Type | Required | Description |
|---|---|---|---|
attempt |
LastAttempt |
no | The record that this run’s pass over the source wrote, for ran alone. A source that could not be read is ran too, and this says why. |
id |
string | yes | The id, as the configuration named it when the run started. |
outcome |
SourceRunOutcome |
yes | What its pass did. |
report |
SourceReport |
no | The row of GET /api/blocking/sources when the answer was built, where the running configuration still names the source. A pass on the timer that ran after the run can already show in it. Absent for removed. |
SourceRunOutcome
Section titled “SourceRunOutcome”What the pass of one source did, inside a refresh of every source.
One of ran, superseded, removed.
SpanTotals
Section titled “SpanTotals”How much the store of checked denials holds: the ranges of names that a signed NSEC or NSEC3 record proves absent.
| Field | Type | Required | Description |
|---|---|---|---|
bytes |
integer | yes | |
older |
integer | yes | Zones of an older configuration, or of an older trust epoch of a stub zone, which no lookup reaches. They stay until the bound of the store removes them. |
zones |
integer | yes | Zones of the configuration running now that hold ranges. A zone counts once for each route that proved its ranges: the ordinary upstreams or the walk, and each [[forward]] entry. With aggressive_nsec off, a lookup that was in flight at the change can still leave one zone here. No answer reads it. |
StillStored
Section titled “StillStored”A value the log still holds after the setting that writes it was turned off.
| Field | Type | Required | Description |
|---|---|---|---|
clear_with |
string | yes | What to call to clear them. Keeping them is the default, and this is the other choice. |
column |
QueryColumn |
yes | name or client. name covers the name asked for, the rule and the name that matched, the alias chain, the upstream that answered, and the path of the answer. client covers the address, the client’s name, the relay and the group. |
rows |
integer | no | How many rows still carry it. Absent where the count is not known: the query log is still opening, it is off, or the count failed. Absent is not zero. A column nobody can count is still a column with something in it. |
StubDnssec
Section titled “StubDnssec”The dnssec setting of a stub zone.
One of validate, insecure.
StubKind
Section titled “StubKind”Where the servers of a stub zone come from.
One of static, learned.
StubRow
Section titled “StubRow”The servers of a stub zone, and where its last refresh stands.
| Field | Type | Required | Description |
|---|---|---|---|
dnssec |
StubDnssec |
yes | The dnssec setting of this stub in zone.toml: validate where the file has no such key. It is a setting, not the whole effect: an insecure [[forward]] or stub above this one turns validation off for the names below it, whatever this says. |
last_try |
LastTryRow |
no | The last try of a learned stub that is on and that the refresh task follows, from its report. Absent before the first try of this run of the server, and for a static stub. |
learned_from |
array of string | no | The primaries that the servers below were learned from. They differ from primaries for a moment after a revision changes them, until the refresh task forgets the old servers. Empty where refreshed is absent. |
next_refresh_at |
integer | no | The first time, in seconds since 1970, from which POST /api/zones/{id}/refresh can start a try: a minute after the start of the last try, whatever started it. After the wall clock moved back past that start, it reads the time of this read, while an ask can still meet the minute for up to a minute. Absent where last_try and running are, and before the first try starts. |
primaries |
array of string | no | The primaries that a learned stub asks, as zone.toml names them. Empty for a static stub. |
rebind_protection |
boolean | yes | The rebind_protection setting of this stub in zone.toml: true where the file has no such key. It has effect only while the rebinding check of server.toml is on. |
refreshed |
integer | no | When the last refresh that worked was, in seconds since 1970. Absent before the first, and for a static stub. |
running |
boolean | no | Whether a try of the stub runs. Absent where the refresh task does not follow the stub, and for a static stub. |
servers |
array of StubServerRow |
yes | The servers that the walk starts at: the NS set and the addresses. Empty for a learned stub before its first refresh, for a stub whose route is not in force, and for a stub that is off. |
source |
StubKind |
yes | Where the servers come from. |
state |
StubState |
no | Where the last refresh of the route in force stands now, read from the clock at each request, or pending for a stub whose route is not in force yet. Absent for a static stub whose route is in force, and for a stub that zone.toml turns off, which has no route and no refresh. |
timers |
StubTimersRow |
no | The timers of the last refresh, from the SOA of the primary, held to their bounds. Absent where refreshed is. |
StubServerRow
Section titled “StubServerRow”One server of a stub zone.
| Field | Type | Required | Description |
|---|---|---|---|
addresses |
array of string | yes | Its addresses where the stub holds them. Empty for a server outside the zone, whose addresses come from the ordinary path. |
name |
string | yes | The name of the server, with its final dot. |
StubState
Section titled “StubState”Where the last refresh of a learned stub stands at one time.
One of fresh, due, expired, unlearned, pending.
StubTimersRow
Section titled “StubTimersRow”The timers of the last refresh of a learned stub, in seconds.
| Field | Type | Required | Description |
|---|---|---|---|
expire |
integer | yes | How long the servers stay usable without a refresh that works. |
refresh |
integer | yes | How long the servers are good before the server asks a primary again. |
retry |
integer | yes | How long it waits after a refresh that failed. |
TailoredEntry
Section titled “TailoredEntry”One answer stored for one client network.
| Field | Type | Required | Description |
|---|---|---|---|
network |
string | no | The network the answer is for. Absent where store_clients is off, because it comes from a client’s address. |
records |
array of string | yes | |
ttl |
integer | yes | |
type |
string | yes |
TailoredTotals
Section titled “TailoredTotals”How much the store of tailored answers holds.
| Field | Type | Required | Description |
|---|---|---|---|
answers |
integer | yes | |
bytes |
integer | yes | The records and the names, not the tables that hold them. |
TelemetryEmptied
Section titled “TelemetryEmptied”Why a store in memory started empty.
| Field | Type | Required | Description |
|---|---|---|---|
problem |
string | yes | The figures of the upgrade that did not fit, for a person. |
reason |
EmptiedReason |
yes |
TelemetryFull
Section titled “TelemetryFull”Why a store in memory writes no row now.
| Field | Type | Required | Description |
|---|---|---|---|
problem |
string | yes | What the store measured, for a person. |
reason |
FullReason |
yes |
TelemetryHealth
Section titled “TelemetryHealth”The state of the telemetry store.
| Field | Type | Required | Description |
|---|---|---|---|
effective |
EffectivePlace |
no | Where the store runs, once it was ready at this start. It stays after the store turns off at a pass. Absent while it opens, and where it never got ready. |
emptied |
TelemetryEmptied |
no | Why a store in memory started empty at this start. |
full |
TelemetryFull |
no | Why a store in memory writes no row now, for want of room. It ends once a checkpoint gives the room back. |
off |
TelemetryOff |
no | Why no query and no statistic is recorded. Absent while the store runs or opens. |
old_copy |
OldCopyHealth |
no | A copy of the store at another place than the one that runs, which the server never deletes, or the reason why where one is cannot be known. |
requested |
RequestedPlace |
yes | What node.toml of the running revision asks for. A change waits for a restart, so it can differ from effective. |
unmeasured |
TelemetryUnmeasured |
no | Why a store in memory could not measure its room, and so writes no row now. |
TelemetryOff
Section titled “TelemetryOff”Why telemetry is off.
| Field | Type | Required | Description |
|---|---|---|---|
problem |
string | yes | What went wrong, for a person. |
reason |
OffReason |
yes | |
unfit |
UnfitHealth |
no | Where the reason is unfit: the days of counts that are asked for, the most that fit, and the room in MiB that the days need. |
TelemetryStorage
Section titled “TelemetryStorage”Where a store lives. The set is closed. A client that meets a word that it does not know, from a later build, shows it as other.
One of disk, memory.
TelemetryUnmeasured
Section titled “TelemetryUnmeasured”A measure of the room that failed.
| Field | Type | Required | Description |
|---|---|---|---|
call |
string | yes | The call that failed. |
problem |
string | yes | Its error, for a person. |
ThawAsked
Section titled “ThawAsked”What a thaw asks. The body is optional: no body is a thaw at the serial of the files.
| Field | Type | Required | Description |
|---|---|---|---|
serial_bump |
boolean | no | Move the serial of the edited file by the scheme of the zone first, where the records changed and the serial did not pass the serial of the freeze. |
Thawed
Section titled “Thawed”What a thaw answers.
| Field | Type | Required | Description |
|---|---|---|---|
command |
string | yes | The command of the thaw. |
revision |
integer | yes | The revision that the thaw made, with the files of the zone in it. |
zone |
string | yes | The id of the zone. |
TokenRow
Section titled “TokenRow”A token, as the list shows it. Never the token itself.
| Field | Type | Required | Description |
|---|---|---|---|
account |
string | yes | Which account it acts as, by identifier. |
created_at |
integer | yes | When it was made, in seconds since the Unix epoch. |
id |
string | yes | The public half of the token, which is what a log records and what revoking one names. Never the secret half. |
label |
string | no | What it is for, in the words whoever made it used. |
TopBlocked
Section titled “TopBlocked”The names with the most blocked questions across a range.
| Field | Type | Required | Description |
|---|---|---|---|
exact |
boolean | yes | Whether the list is the whole truth. Each hour keeps its 1000 most blocked names, so a name that was 1001st in each of many hours can have the most blocks in the range and still be missing. It is false where any hour of the range holds a partial list or none: more than 1000 blocked names in an hour, an hour that an older build counted, an hour counted with store_names off, or an hour whose names a purge of name dropped. It is false too for a current hour that the answer took from what was folded of it while rows of it wait: an hour of more than 30 000 rows, or a read that waited a second for another count. And it is false for an hour of a log that keeps one question in N (keep_one_row_in above 1): its list stands for questions that no row holds. |
kept |
Kept |
yes | What the rows that the list rests on were kept as, over the range: all where every question is a row, one_in where each row was kept as one question in one_in and weighs that many, so the list is an estimate, mixed where the rows of the range were kept under more than one N, and counts_alone where no row of the range holds an N, so its questions are in other alone. The totals of the list stay exact. A change between two N above 1 can leave a few questions counted in an hour whose rows show the other N, or in an hour of counts alone, so a range can read one_in with one N, as Kept says. |
names |
array of BlockedRank |
yes | The most blocked first, then one other row for what the answer left out. |
names_missing |
boolean | yes | Whether an hour of the range after names_since had blocked questions and its list names no blocked name: it holds no list, because store_names was off then, a purge cleared it or an older build counted it, or other alone, because its questions named nothing, or because the log keeps one question in N (keep_one_row_in above 1) and kept no blocked row of the hour. Its blocked questions are in other alone. The hour that holds now counts as for names_since. False where names_since is absent: then no hour names a blocked name. It is narrower than exact, which is also false for a list cut at 1000 names, an hour before names_since that had blocked questions, and a current hour that the answer did not count from the query log. |
names_since |
integer | no | The start of the oldest hour of the range whose list names a blocked name, in milliseconds since the Unix epoch, as on GET /api/stats/top. Absent where no hour of the range names one. |
one_in |
integer | no | The N of kept: one_in, from 2 to 1000. Absent for every other kept. |
TopKind
Section titled “TopKind”Which list GET /api/stats/top answers with.
The schema’s vocabulary for the kind parameter. The store has its own type for the
same choice, and this one is the wire’s: the API says what it accepts without the
store having to know about schema documents.
One of domains, clients.
TopList
Section titled “TopList”The busiest names or clients across a range, and how far back the list names them.
| Field | Type | Required | Description |
|---|---|---|---|
kept |
Kept |
yes | What the rows that the list rests on were kept as, over the range: all where every question is a row, one_in where each row was kept as one question in one_in and weighs that many, so the list is an estimate, mixed where the rows of the range were kept under more than one N, and counts_alone where no row of the range holds an N, so its questions are in other alone. The totals of the list stay exact. A change between two N above 1 can leave a few questions counted in an hour whose rows show the other N, or in an hour of counts alone, so a range can read one_in with one N, as Kept says. |
names_missing |
boolean | yes | Whether an hour of the range after names_since had questions and its list names no key: it holds no list, because store_names or store_clients was off then or a purge cleared it, or other alone, because its questions named nothing, or because the log keeps one question in N (keep_one_row_in above 1) and kept no row of the hour. Its questions are in other alone. The hour that holds now counts as for names_since. False where names_since is absent: then no hour names a key. |
names_since |
integer | no | The start of the oldest hour of the range whose list names a key, in milliseconds since the Unix epoch: a name, or an address for kind=clients. An hour before it holds no list, so its questions are in other alone. An hour after it can hold none either. A list goes for its share of retention_mib, oldest hour first, and an hour counted with store_names or store_clients off, or a purge, leaves one out. Absent where no hour of the range names a key. The hour that holds now counts where the answer counted it from the query log. A quiet hour has no list either, so names were lost only where GET /api/stats/hourly shows an hour with questions before it, or where names_missing is true. |
one_in |
integer | no | The N of kept: one_in, from 2 to 1000. Absent for every other kept. |
ranks |
array of Rank |
yes | The busiest first, then one other row for what the answer left out. |
TransferAllow
Section titled “TransferAllow”One rule of allow, a [[zones.transfer.allow]] block of server.toml or a
[[transfer.allow]] block of zone.toml: the conditions that a client must all match.
| Field | Type | Required | Description |
|---|---|---|---|
from |
array of string | yes | The networks a client comes from: 1 to 64 addresses or ranges, in the forms of query_from, such as 192.0.2.53 or 198.51.100.0/28. Required. |
TransferRow
Section titled “TransferRow”The [transfer] table of the zone.toml of a zone: who can transfer it, in place of the rules
of [zones] whole.
| Field | Type | Required | Description |
|---|---|---|---|
allow |
array of TransferRuleRow |
yes | The [[transfer.allow]] rules, in the order of the file. An empty list where the table holds no rule, which closes the zone to every client. One rule that allows a client is enough. The client also needs to be inside the query_from of the zone, and inside the query_from of each zone of this server below it. |
TransferRuleRow
Section titled “TransferRuleRow”One [[transfer.allow]] rule of a zone. A client that matches each condition of the rule can
transfer the zone.
| Field | Type | Required | Description |
|---|---|---|---|
from |
array of string | yes | The networks that a client comes from, in the order of the file: 1 to 64, each an address alone or an address with its prefix length, such as 192.0.2.53 or 198.51.100.0/28. |
TryOutcome
Section titled “TryOutcome”How a try of a learned stub ended.
One of succeeded, failed.
UnfitHealth
Section titled “UnfitHealth”The figures of counts that do not fit the room of a store in memory.
| Field | Type | Required | Description |
|---|---|---|---|
days |
integer | yes | The days of hourly counts that stats_retention_days asks for. |
days_that_fit |
integer | yes | The most whole days of counts that the room holds. |
room_needed_mib |
integer | yes | The room in MiB whose data holds the counts of days. It can pass 4096. |
UnreachedKind
Section titled “UnreachedKind”Why a pass reached no body, by kind, as LastAttempt.unreached gives it.
The set is closed: these 11 words and no other. A record of a build before the kinds gives no
unreached at all.
One of inside, redirected_inside, forbidden, unresolved, unconnected, proxy, status, redirects, answer, file, defect.
UnreadCounts
Section titled “UnreadCounts”How many lines of each shape a body held that this build does not read.
One number called unsupported cannot answer “nine modifier rules and 22 regular expressions”,
and those are two different lists: the first is a DNS list with a few rules this build skips, and
the second wants patterns.
| Field | Type | Required | Description |
|---|---|---|---|
cosmetic |
integer | yes | Rules about an element on a page, which a name lookup cannot honor. |
leading_dot |
integer | yes | Patterns that start with a dot, which mean the names under a name and not the name. |
modifier |
integer | yes | Rules carrying a modifier this build does not read, such as $important or $dnstype. |
other |
integer | yes | Shapes this build has no name for, which includes the dnsmasq form. |
regex |
integer | yes | Regular expressions. |
url |
integer | yes | Rules about a URL: a path, a scheme or a port. The same. |
wildcard |
integer | yes | Patterns with a wildcard in them. |
UnusableGate
Section titled “UnusableGate”The gate that refuses a list as unusable.
One of too_large, not_a_list, too_few, too_big, drifted.
UnwrittenStep
Section titled “UnwrittenStep”The step of a write of aging.clock that failed.
One of before-rename, directory-sync, aside-rename, aside-sync.
Update
Section titled “Update”The field update of GET /api/info: what the update check found. Each state has its own
fields, and the others are absent.
| Field | Type | Required | Description |
|---|---|---|---|
checked_at |
integer | no | The end of the last check, good or failed, in seconds since 1970. Absent while waiting. |
good_at |
integer | no | The end of the last good check, in seconds since 1970, after a failure. Absent otherwise. |
latest |
string | no | The newest counted release of the last good check, without its v, such as 1.3.0-rc.1. Absent where it found none, or where no check was good yet. |
newer |
boolean | no | Whether latest is newer than the running version. false where a good check found no release. Absent where no check was good yet. |
prerelease |
boolean | no | Whether latest is a pre-release, by its tag or by the pre-release flag of GitHub. Present with latest. |
reason |
UpdateReason |
no | Why the last check failed. Present while failed. |
state |
UpdateState |
yes | waiting before the first check, ok after a good check, failed after a failure. |
url |
string | no | The page of that release on GitHub, built from its tag. Present with latest. |
UpdateReason
Section titled “UpdateReason”Why the last check failed, as reason names it.
One of connect, proxy, tls, timeout, unavailable, limit, status, body, version.
UpdateState
Section titled “UpdateState”The state of the field update of GET /api/info.
One of waiting, ok, failed.
UploadAction
Section titled “UploadAction”What the rules of the list do, as the query names it.
One of block, allow.
ValidationState
Section titled “ValidationState”What DNSSEC says of a value. unchecked where validation is off, and the four states of RFC
4035 otherwise. secure: a chain of signed keys runs to the value. insecure: no chain can.
bogus: a chain has to, and it is broken. indeterminate: the server cannot decide now.
One of unchecked, secure, insecure, bogus, indeterminate.
ZoneClockHealth
Section titled “ZoneClockHealth”The zone clock, for the health report.
| Field | Type | Required | Description |
|---|---|---|---|
ends |
HoldEndWord |
no | How a hold ends: quiet, after one quiet hour with the gate Synchronized, or resume, with tadoru zone clock resume alone. |
state |
ZoneClockState |
yes | broken after a panic of the zone clock, ended where the task of the sweep ended, stopped once the server stops, held after a step or at a start, outage while a record whose time fell while the server was stopped waits, unsampled where the clocks of the host gave no coherent reading, and running where only a failed write is to say. The first that holds wins. |
unwritten |
UnwrittenStep |
no | The step of the last write of aging.clock that failed: before-rename, directory-sync, aside-rename or aside-sync. |
way_out |
string | yes | What to do, in the words of this server. |
ZoneClockResumed
Section titled “ZoneClockResumed”What a resume answers.
| Field | Type | Required | Description |
|---|---|---|---|
held_before |
boolean | yes | Whether a hold of the clock ended. False can still mean that the resume ended an open outage of a stopped server. |
resumed_at |
integer | yes | The wall time that the clock took, in seconds since 1970. |
ZoneClockState
Section titled “ZoneClockState”Where the zone clock is.
One of broken, ended, stopped, held, outage, unsampled, running.
ZoneDefaults
Section titled “ZoneDefaults”[zones] of server.toml: the defaults of a zone.
| Field | Type | Required | Description |
|---|---|---|---|
default_ttl |
integer | no | The lifetime of a record that the API adds without one, in seconds. 0 to 2147483647, and 3600 by default. |
expire |
integer | no | How long a secondary serves the zone without a check, in seconds. At least refresh plus retry, at most 2147483647, and 1209600 (two weeks) by default. |
max_refresh |
integer | no | The most time between two checks of the serial of a secondary zone, in seconds, for each secondary whose zone.toml names none. At least min_refresh, at most 2147483647, and 86400 (one day) by default. |
max_retry |
integer | no | The most time before a secondary zone tries again after a failed check, in seconds, for each secondary whose zone.toml names none. At least min_retry, at most 2147483647, and 3600 by default. |
min_refresh |
integer | no | The least time between two checks of the serial of a secondary zone, in seconds, for each secondary whose zone.toml names none. The refresh of the SOA of its copy is held to it. Between 60 and 2147483647, and 300 by default. |
min_retry |
integer | no | The least time before a secondary zone tries again after a failed check, in seconds, for each secondary whose zone.toml names none. The retry of the SOA of its copy is held to it. Between 10 and 2147483647, and 60 by default. |
minimum |
integer | no | The lifetime of a negative answer from a created zone, in seconds (RFC 2308 section 4). 0 to 2147483647, and 300 by default. |
name_server |
string | no | The primary name server of a zone that the API creates, which its SOA and its NS set name. A host name: labels of letters, digits and hyphens, with no hyphen at either end. An address, a wildcard and the root are refused. No default, because no name is right for every network. |
notify |
array of string | no | The secondaries that a zone notifies when its serial changes, for every zone that names no list of its own. Up to 16 entries, each an address with a port after it or left out for 53, such as 192.0.2.53 or [2001:db8::53]:5300. Nobody by default. A NOTIFY goes to each entry at a change of the serial and at each start, over UDP. |
ns_ttl |
integer | no | The lifetime of the NS set of a primary or a stub that the API creates, and of an NS set that the API adds without a lifetime, in seconds. 0 to 2147483647. Without it, an NS set takes default_ttl, so the value of default_ttl is its default. A stub serves no lifetime of its own, so for a stub ns_ttl sets only the text of its records.zone. |
query_from |
array of string | no | The networks whose clients get answers from a zone. The private and local ranges of allow_recursion by default: 127.0.0.0/8, ::1, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16, fe80::/10 and fc00::/7. A zone that the internet asks needs ["0.0.0.0/0", "::/0"]. 64 entries at most. |
refresh |
integer | no | How often a secondary checks the serial of a created zone, in seconds. 60 to 2147483647, and 3600 by default. |
responsible |
string | no | The mailbox of the person responsible for a created zone: a local part, which the apex of the zone completes, or a whole address. hostmaster by default (RFC 2142 section 7). A local part is letters, digits, dots and the signs of a plain mailbox, 63 bytes at most, and its dots become \. in the RNAME: [email protected] is first\.last.example.com.. A quoted local part, a space and a mailbox outside ASCII are refused. |
retry |
integer | no | How long a secondary waits after a failed check, in seconds. 0 to 2147483647, and 900 by default. |
serial |
string | no | How the server moves the serial of a zone on each change it makes: increment, unixtime or date. increment by default, which never runs ahead of a date however many changes a day brings. |
soa_ttl |
integer | no | The lifetime of the SOA record of a created zone, in seconds. 0 to 2147483647, and 3600 by default. |
transfer |
ZoneTransfer |
no | Who can transfer a zone that names no rules of its own, as [[zones.transfer.allow]] rules, written after every other key of [zones]. No rule by default, so no address can transfer a zone, loopback included. A client also needs to be inside query_from. A transfer goes over plain TCP alone. |
ZoneEdits
Section titled “ZoneEdits”How the records of a zone change.
One of dynamic, frozen, static.
ZoneExpiryRow
Section titled “ZoneExpiryRow”What blocks the expiry sweep of one zone. Present for a primary zone with record_expiry on
GET /api/zones/{id} alone.
| Field | Type | Required | Description |
|---|---|---|---|
blocked |
BlockedReason |
no | Why a group that is past its time is still in the zone, the first reason that holds: gate, clock, outage, state, rule, cross-file or failed. Absent where no group is past its time, where the zone is due and its sweep is still to come, and where the server has not yet looked at the zone as it is now, which it does after each change and at least once a minute. |
next_at |
integer or null |
yes | The earliest due time of a group of the zone, in seconds since 1970: a record alone at its expiry time, and the timed records of a delegation together at the latest of their times. null where no record of the zone has an expiry time. |
retry_at |
integer | no | When the server tries the zone again, with blocked rule, cross-file or failed alone, in seconds since 1970: an estimate, from the wall clock of the last look and the time that the wait had left. |
state |
PassedState |
no | The state of the zone that the sweep passes over, with blocked state alone. |
ZoneHealth
Section titled “ZoneHealth”A zone that takes no dynamic update as its journal says, or a zone that zone.toml turns off.
| Field | Type | Required | Description |
|---|---|---|---|
note |
string | no | What to look at, for a zone frozen for more than a day: a freeze that was forgotten refuses every dynamic update of the zone, such as those of a DHCP server, with no other sign. A zone in another state that is frozen too carries it in that entry. The time of the freeze is on GET /api/zones, which needs a credential, as frozen_since. |
reason |
string | yes | Why, in plain words. |
state |
ZoneHealthState |
yes | What the zone answers, and why it takes no update: its journal, zone.toml that turns it off, or a freeze. |
zone |
string | yes | The id of the zone, the name of its directory under zones/. |
ZoneHealthState
Section titled “ZoneHealthState”What a zone of the health report answers, and why it takes no update: the states that
serving of a zone row gives, and a freeze. It is a type of its own, because serving never
says frozen: a zone row says that in its state.
One of off, stopped, at_files, unsettled, frozen.
ZoneKind
Section titled “ZoneKind”What kind of zone it is.
One of primary, stub.
ZoneRow
Section titled “ZoneRow”One zone of an operator, as the server runs it.
| Field | Type | Required | Description |
|---|---|---|---|
anames |
array of AnameRow |
no | Each ANAME owner of the zone, in the canonical order of its names, with where its set stands. Present for a zone with ANAME records on GET /api/zones/{id} alone. |
enabled |
boolean | yes | Whether zone.toml turns the zone on. A zone turned off answers no name. |
expiry |
ZoneExpiryRow |
no | What blocks the removal of the records of the zone at their expiry times: the next due time, and why a group past its time is still there. Present for a primary zone with record_expiry on GET /api/zones/{id} alone. |
first_serial |
integer | no | The first serial of the history of the apex in the serial witness: every serial that the apex serves lies less than 2^31 past it. From the same copy as served_serial, and present with it alone, so absent for a secondary zone that holds no copy yet. |
frozen_since |
integer | no | When the freeze was made, in seconds since 1970. Present for a frozen zone alone. |
id |
string | yes | The id of the zone, the name of its directory under zones/. |
journal |
boolean | no | Whether the id of the zone holds a trace of a journal: a journal file, a row of the ledger, a statement of a freeze state, or history of a journal tied to it. A convert that keeps the id, or that moves another zone to it, is refused while it holds one, so a client asks for a new id first. true also where the look failed, did not end within 2 seconds, or found no free place, so it errs on the side of a new id. A change can land after the read, and the convert decides again. A primary that is frozen, or whose freeze state is in doubt or not read yet, takes no convert at any id, whatever this says. History of a journal that no zone is tied to counts under every id, so then every id reads true. Present on GET /api/zones/{id} alone, for a primary zone and a stub zone: the list leaves it out, because each look reads the ledger and the state root. |
kind |
ZoneKind |
yes | What kind of zone it is. |
name |
string | yes | The apex of the zone, with its final dot. |
ns_ttl |
NsTtlRow |
no | The lifetime of a new NS set, one that the zone does not serve, where an add names none, with the key of zone.toml that sets it. Present for a primary zone on GET /api/zones/{id} alone: the list leaves it out to stay small, and a stub zone takes no such key. |
reason |
string | no | Why the zone is not served as usual, in plain words. Present with serving alone. |
record_expiry |
boolean | no | Whether the records of the zone take an expiry time: record_expiry of its zone.toml, false where the file names none. Only such a zone reads the mark ;expires= of its files, and in any other zone that text is a comment. Present for a primary zone on GET /api/zones/{id} alone: the list leaves it out to stay small, and a stub zone takes no such key. |
records |
integer | no | How many records the zone holds: the records that it serves, or for a zone turned off the records that it serves once it is turned on. Absent for a zone stopped for its journal, because the server keeps the name of such a zone alone until a start replays it. |
records_off |
integer | no | How many records ;off lines turn off, counted as records is, and absent where it is. |
replication |
ReplicationRow |
no | What zone.toml of the zone names for zone transfers and NOTIFY, in place of [zones] of server.toml. Present for a primary zone on GET /api/zones/{id} alone, so the list stays small. A stub zone takes none of these keys, so it has none. Where it is absent, it says nothing of the rules of the zone: it does not mean that the zone takes those of [zones]. |
serial |
integer | no | The serial of the SOA record of the zone. Absent for a stub zone, which serves no SOA of its own, and for a secondary zone that holds no copy yet. |
served_serial |
integer | no | The last serial that the apex of the zone served, from its row in the serial witness. A zone of the apex never serves a serial behind it. The value is the last copy of the rows that the witness published, so a write in flight can leave it behind the row on the disk for a moment. It can be ahead of serial: the row is written before the zone serves its new serial, and a zone that the witness stops can hold a serial behind its row until its serial moves. Present on GET /api/zones/{id} alone, for a zone whose apex has a row, fenced or past the bound too, and absent for a secondary zone that holds no copy yet, whatever row stands at its apex. A row stays after its zone goes, so a zone made again at the apex, under any id, counts from it. |
serving |
ZoneState |
no | What the zone answers where it is not served as usual: turned off, stopped for its journal, at its files, or unsettled. Absent where the zone answers from its records and takes the changes that its state says. |
state |
ZoneEdits |
yes | How the records of the zone change. |
stub |
StubRow |
no | Where the servers of a stub zone come from, and where its last refresh stands. Present for a stub zone on GET /api/zones/{id} alone, so the list stays small. |
ZoneState
Section titled “ZoneState”What a zone that takes no dynamic update as its journal says answers, and why, or a zone that
zone.toml turns off.
One of off, stopped, at_files, unsettled.
ZoneTransfer
Section titled “ZoneTransfer”[transfer] of zone.toml, and [zones.transfer] of server.toml: who can transfer a zone.
| Field | Type | Required | Description |
|---|---|---|---|
allow |
array of TransferAllow |
no | The rules, 16 at most: one [[zones.transfer.allow]] block each in server.toml, and one [[transfer.allow]] block each in zone.toml. A client that one rule allows can transfer the zone, where the query_from of the zone, and that of each zone of this server below it, hold the client too. No rule allows nobody. |