Retrieving one or all existing TXT Records using the API requires specific syntax depending on whether you are using REST or SOAP. Use this table to find the syntax for your command.
See RFC 1035 for more information about TXT Records.
Understanding How The API Works »
REST Syntax
Click to view all REST Resources |
/REST/TXTRecord/ GET — Retrieve one or all existing TXT Records on the zone/node indicated.
HTTP Action — GET
URIs:
Get one TXT record — https://api.dynect.net/REST/TXTRecord/<zone>/<fqdn>/<record_id>/
Get all TXT records — https://api.dynect.net/REST/TXTRecord/<zone>/<fqdn>/ |
Arguments:
No Arguments. |
Response:
Get one TXT record — Click for More Info
- string
fqdn — Fully qualified domain name of a node in the zone.
- hash
rdata — RData defining the record(s) to replace.
- string
txtdata — Free form text.
- string
record_type — The RR Type of the record.
- string
ttl — TTL for the record.
- string
zone — Name of the zone.
Get all TXT records: array — Individual TXT Record resources. |
SOAP Syntax
Click to view all SOAP Commands |
GETOneTXTRecord — Retrieve one existing TXT Record on the zone/node indicated.
GETTXTRecords — Retrieve all existing TXT Records on the zone/node indicated. |
Arguments:
GetOneTXTRecord — Click for More Info
fqdn — Required. Fully qualified domain name of a node in the zone.
- string
record_id — A numeric identifier for the record.
- hash
rdata — RData defining the record.
- string
txtdata — Required. Free form text.
- string
token — Required. The session identifier.
- string
zone — Required. Name of the zone.
GetTXTRecords — Click for More Info
- string
fqdn — Required. Name of node where the record exists.
- string
token — Required. The session identifier.
- string
zone — Required. Name of zone where the record exists.
|
Response:
GetOneTXTRecord — Click for More Info
- hash
data
- string
fqdn — Fully qualified domain name of a node in the zone.
- hash
rdata — RData defining the record.
- string
txtdata — Free form text.
- string
record_id — A numeric identifier for the record.
- string
record_type — The RRType of the record.
- string
ttl — TTL for the record.
- string
zone — Name of the zone.
GetTXTRecords — Click for More Info
- array
data
- string
fqdn — Fully qualified domain name of a node in the zone.
- hash
rdata — RData defining the record.
- string
txtdata — Free form text.
- string
record_id — A numeric identifier for the record.
- string
record_type — The RRType of the record.
- string
ttl — TTL for the record.
- string
zone — Name of the zone.
|
Example Request — Click for More Info
{
'fqdn' => 'www.example.com',
'rdata' => {
'txtdata' => 'spf',
},
'token' => 'asdlkfjasl23j4879afa',
'zone' => 'example.com',
}
or
{
'fqdn' => 'www.example.com',
'record_id' => '32',
'token' => 'asdlkfjasl23j4879afa',
'zone' => 'example.com',
}
|
Example Request — Click for More Info
{
'fqdn' => 'www.example.com',
'token' => 'asdlkfjasl23j4879afa',
'zone' => 'example.com',
}
|
DNS API Knowledge Base