Retrieving one or more existing CNAME 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.
Understanding How The API Works »
REST Syntax
Click to view all REST Resources |
/REST/CNAMERecord/ GET — Retrieve one or more existing CNAME Record on the zone/node indicated.
HTTP Action — GET
URIs:
Retrieve One Record — https://api.dynect.net/REST/CNAMERecord/<zone>/<fqdn>/<record_id>/
Retrieve All Records — https://api.dynect.net/REST/CNAMERecord/<zone>/<fqdn>/
|
Arguments:
No Arguments.
|
Response:
Retrieve One CNAME Record — Click for More Info
- string
fqdn — Fully qualified domain name of a node in the zone.
- hash
rdata — RData defining the record.
- string
record_type — The RRType of the record.
- string
ttl — TTL for the record.
- string
zone — Name of the zone.
Retrieve All CNAME Records: array — Individual CNAME record resources.
|
SOAP Syntax
Click to view all SOAP Commands |
GetOneCNAMERecord — Retrieve an existing CNAME Record on the zone/node indicated.
GetCNAMERecords — Retrieve all existing CNAME Records on the zone/node indicated.
|
Arguments:
GetOneCNAMERecord — Click for More Info
- string
fqdn — Required. Name of node where the record exists.
- string
record_id — The ID of the specific record to retrieve, use if there is more than one possible record.
- hash
rdata — RData defining the record to retrieve.
- string
cname — Required. Hostname.
- string
token — Required. The session identifier.
- string
zone — Required. Name of zone where the record exists.
GetCNAMERecords — 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:
GetOneCNAMERecord — 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
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.
GetCNAMERecords — 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
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(GetOneCNAMERecord) — Click for More Info
{
'fqdn' => 'www.example.com',
'rdata' => {
'cname' => 'example.net',
},
'token' => 'asdlkfjasl23j4879afa',
'zone' => 'example.com',
}
or
{
'fqdn' => 'www.example.com',
'record_id' => '32',
'token' => 'asdlkfjasl23j4879afa',
'zone' => 'example.com',
}
|
Example Request(GetCNAMERecords) — Click for More Info
{
'fqdn' => 'www.example.com',
'token' => 'asdlkfjasl23j4879afa',
'zone' => 'example.com',
}
|
DNS API Knowledge Base