RecordResource
final class RecordResource (View source)
The JSON shape of a record on /api/v2. The list endpoints report the fully qualified name, the single-record endpoints the name relative to the zone; both are contract and neither may drift without the other being reviewed.
Methods
A single record as GET, POST and PUT /zones/{id}/records emit it: the name relative to the zone, the zone id second. A row without an id (the readback after a write failed) reports null.
A record as the listing emits it: fully qualified name, no zone id.
A member of an RRSet: the per-record values without name, type or ttl.
V2 quotes single-string TXT content on the way in and unquotes it on the way out; a multi-string value keeps its quoting so the parts stay distinct.
Details
static array
item(array $row, int $zoneId, string $zoneName, callable $formatId)
A single record as GET, POST and PUT /zones/{id}/records emit it: the name relative to the zone, the zone id second. A row without an id (the readback after a write failed) reports null.
static array
listItem(array $row, callable $formatId)
A record as the listing emits it: fully qualified name, no zone id.
static array
rrsetMember(array $row)
A member of an RRSet: the per-record values without name, type or ttl.
static string
stripTxtQuotes(string $content, string $type)
V2 quotes single-string TXT content on the way in and unquotes it on the way out; a multi-string value keeps its quoting so the parts stay distinct.