Get your free beta license ↗
API operation · dns group
GET

/dns/replace

First published 14 Oct 20260.2.0Last changed 26 Nov 20260.2.352 changes to view
Latest change (release 0.2.35): Matches now include the server's own records, marked taken.

Find DNS records or preview a replacement

Who may call it
AdministratorResellerCustomer
Token scope, any of
dnsreadall
Answers200 OK

Search every zone, or supply zone to search one. UrbeStack matches whole IPv4 addresses in A records and SPF ip4: terms, whole IPv6 addresses in AAAA records and SPF ip6: terms, and whole hostnames in CNAME, MX, and SRV targets. The search includes records regardless of who added them.

Omit to to list matches by zone and record ID. Supply to to preview a replacement. Both modes are read-only. taken marks records UrbeStack maintains for the server, including the nameservers' glue records drawn from the server's identity. These glue records have id null. Replacing a record marked taken makes its record set manually maintained in that zone, as in the zone editor. The kept list shows matching delegations.

After trimming surrounding whitespace, from and any nonempty to must contain 1 to 255 characters, excluding internal whitespace and U+0000 through U+001F. A missing from or a value that fails these checks returns 400.

As a command

Run as root on the server

Parameters

fromquery ·string, up to 255 charactersRequired
IPv4 address, IPv6 address, or hostname to find.
toquery ·string, up to 255 characters
Replacement value of the same kind as from, with a different value. If omitted or empty, the response lists matching records only.
zonequery ·DomainName
DNS zone to search. Omit this parameter to search every zone.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X GET "$API/dns/replace?from=text&to=text&zone=example.com" \
  -H "Authorization: Bearer $TOKEN"
Response · 200 OK
{
  "changes": [
    {
      "detached": true,
      "from": "text",
      "id": 1,
      "name": "alice",
      "removed": true,
      "taken": true,
      "to": "text",
      "type": "rebuild",
      "why": "text",
      "zone": "text"
    }
  ],
  "from": "text",
  "kept": [
    {
      "from": "text",
      "id": 1,
      "name": "alice",
      "type": "rebuild",
      "why": "text",
      "zone": "text"
    }
  ],
  "kind": "ipv4",
  "records": 1,
  "skipped": 1,
  "to": "text",
  "zone": "text",
  "zones": 1
}

Errors

13 errors, each a status and a sentence
400--from is required
400--to is required, or --find to look only
400A record to leave alone is named by its id, or by ZONE:NAME:TYPE for one the panel writes from the identity, not '<s>'
400Domain name required
400Domain name too long
400Invalid domain name
400Invalid id
400The new value must be
400The old and the new value are the same
400from is the value to look for: an IPv4 address, an IPv6 address or a host name
400to is the new value: an IPv4 address, an IPv6 address or a host name
401Authentication required
404Zone '<name>' not found

Change log

2 changes since publication, newest first
0.2.3526 Nov 2026
Matches now include the server's own records, marked taken.The preview lists the panel hostname's IP address and mail records and the nameservers' glue records alongside other matches. A glue record appears with id null until it is changed.
0.2.3526 Nov 2026
Added taken and made id nullable.taken marks a record UrbeStack maintains for the server, whose record set becomes manually maintained on replacement. A glue record drawn from the server's identity has id null.From the named type DnsReplaceChange→
0.2.014 Oct 2026
First published.
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry last changed in release 0.2.35 on 26 Nov 2026.
urbestack.com/docs/api/get-dns-replace/