/dns/distribution/leave
0.2.28Unchanged since publicationLeave a DNS distribution network as a node
dnsallCall as an administrator with a token that has the dns scope, on a node in a network of two or three nodes. The only node in a network receives 409 and must stop the network with urbestack-dns-node-stop.
Use as=client to keep sending this server's zones to the network under its existing key. The network continues to serve its customers' zones. Use as=standalone to serve this server's own zones with the nameservers it used before joining. With as=standalone, zones=keep is the default and retains the last published copies on the network. Use zones=delete to remove those copies. The operation returns 400 if as is missing or invalid, or if zones is supplied with an invalid value. UrbeStack applies zones only in standalone mode.
UrbeStack notifies the other nodes. The first remaining node takes over this server's nameserver name, and UrbeStack updates the corresponding DNS records to the new node's IPv4 address and, if available, its IPv6 address. Update the corresponding host record at the registrar. Resolvers can still query this server until the change takes effect. UrbeStack preserves all local zones and continues to serve frozen copies of zones from other nodes and clients with updates disabled. For seven days, it reports the departure and the remaining nodes to servers that contact it. Unreachable nodes learn of the departure the next time they contact this server, and clients switch to the remaining nodes automatically.
The departure has a 240-second time limit. A 200 response includes left set to true, role, as, zones, at, nameservers, the number of frozen zones in frozen_zones, and the notification results in told.
As a command
Run as root on the serverRequest body
JSON· 2 fieldsasstring, one of client, standaloneRequiredzonesstring, one of keep, deleteExample
See the API overview for how to set $API and $TOKEN.curl -sS -X POST "$API/dns/distribution/leave" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"as": "client",
"zones": "keep"
}'200 OK{
"as": "text",
"at": "text",
"frozen_zones": 1,
"left": true,
"nameservers": [
"text"
],
"role": "user",
"told": [
{
"address": "info@example.com",
"done": true,
"error": "Domain 'example.com' already exists",
"host": "text"
}
],
"zones": "text"
}Errors
18 errors, each a status and a sentence400--as client or --as standalone is required400--delete-frozen stands alone400Domain name required400Domain name too long400Invalid IPv4 address400Invalid IPv6 address400Invalid domain name400Invalid port400Invalid setting key400Leaving says what this server becomes: a client of the network, or standalone400as is client or standalone400zones is keep or delete401Authentication required402This server has no licensed address on record yet: run urbestack-license-check first404Setting '<key>' not found409This server holds no frozen zones409This server is not a node of a distribution network409This server is the only node of its network, so there is no network to leave. To go back to standalone, stop the network once it has no clientsurbestack.com/docs/api/post-dns-distribution-leave/