/dns/distribution/zones/{name}
0.2.28Unchanged since publicationDelete a distributed zone and its records
noneAuthenticate with the DNS distribution client key in the Authorization: Bearer KEY header. Send the client's registered IPv4 address in X-Urbestack-Address. The request must originate from that IPv4 address. On success, the response includes zone, deleted set to true, and dns.
A missing or invalid IPv4 address in X-Urbestack-Address returns 400. A mismatch between the request's source IP address and either the header or the client's registered IPv4 address returns 403. A node whose license prevents changes returns 402.
A missing, malformed, or unrecognized key returns 401. For seven days after a client is removed, its key returns 403 with removal details in removed. For seven days after the receiving server leaves or is removed from the network, it returns 410 to clients with recognized keys. The left field in that response includes departure details and the remaining nodes.
Only the client that supplied the zone can delete it. Returns 404 if the zone is absent, held for another client, or owned by the server. UrbeStack attempts to record license, IP address, and deletion refusals in the Clients tab, retaining up to 300 characters of the reason.
As a command
Run as root on the serverExample
See the API overview for how to set $API and $TOKEN.curl -sS -X DELETE "$API/dns/distribution/zones/{name}"200 OK{
"deleted": true,
"dns": {},
"zone": "text"
}Errors
12 errors, each a status and a sentence400--address is required400Domain name required400Domain name too long400Invalid IPv4 address400Invalid domain name400X-Urbestack-Address must carry the client's own IPv4 address401Unknown key402This node refuses changes: <why>403The call came from <remote> but the server says its address is <said>. A server behind NAT cannot be a client403This key belongs to the client at <c.address>, and the call came from <remote>403This server was removed from the distribution network on 410This server is no longer a node of the distribution network: it urbestack.com/docs/api/delete-dns-distribution-zones-name/