get_dns_zone
View the DNS records for a specified domain.
Request parameters for get_dns_zone
Standard parameters
- action = get_dns_zone
- object = domain
Attributes
Parameters within the attributes associative array are described below.
Parameter name | Obligation | Definition/Value |
|---|---|---|
domain | Required | The domain whose DNS you want to view. |
Response parameters for get_dns_zone
Standard parameters
- action = reply
- object = domain
- is_success = a Boolean is returned, indicating success or failure of the
request - response_code = response code indicating outcome of the request
- response_text = message describing the outcome of the request
Attributes
If the request is successful, the attributes associative array may include the
following:
Parameter name | Obligation | Definition/Value |
|---|---|---|
nameservers_ok | Returned if is_success = true | Indicates whether the domain is set up to use the OpenSRS nameservers.
|
records | Returned if is_success = true | A list of the record types defined for the domain; each record includes the settings for that record. Record types may be:
For more information, see the Records table below. |
Records
Parameters within the records associative array are described below.
Parameter name | Obligation | Definition/Value |
|---|---|---|
A | Optional | Maps the domain name to the IP address. The A record consists of the following:
|
AAAA | Optional | Maps the domain name to the IPv6 address. The AAAA record consists of the following:
|
CNAME | Optional | Canonical Name. CNAME records can be used when you want a subdomain to point to another hostname. Allows you to create an alias for your domain. The CNAME record consists of the following:
|
MX | Optional | Mail Exchange. MX records determine how mail is delivered to your domain. Ensures that email that is sent to you is routed to the correct destination. The MX record consists of the following:
|
SRV | Optional | Service Record.
|
TXT | Optional | Text Record. Allows you to attach comments to a hostname, for example, SPF data to validate that email is being sent from the IP address of the domain's mail server. The TXT record consists of the following:
|
Examples for get_dns_zone
Request
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<!DOCTYPE OPS_envelope SYSTEM 'ops.dtd'>
<OPS_envelope>
<header>
<version>0.9</version>
</header>
<body>
<data_block>
<dt_assoc>
<item key="protocol">XCP</item>
<item key="action">get_dns_zone</item>
<item key="object">domain</item>
<item key="attributes">
<dt_assoc>
<item key="domain">example.com</item>
</dt_assoc>
</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>Response
<?xml version='1.0' encoding="UTF-8" standalone="no"?>
<!DOCTYPE OPS_envelope SYSTEM "ops.dtd">
<OPS_envelope>
<header>
<version>0.9</version>
</header>
<body>
<data_block>
<dt_assoc>
<item key="protocol">XCP</item>
<item key="action">REPLY</item>
<item key="object">DOMAIN</item>
<item key="is_success">1</item>
<item key="response_code">200</item>
<item key="response_text">Command Successful</item>
<item key="attributes">
<dt_assoc>
<item key="records">
<dt_assoc>
<item key="A">
<dt_array>
<item key="0">
<dt_assoc>
<item key="subdomain"></item>
<item key="ip_address">17.16.156.5</item>
</dt_assoc>
</item>
</dt_array>
</item>
<item key="MX">
<dt_array>
<item key="0">
<dt_assoc>
<item key="priority">10</item>
<item key="subdomain">www</item>
<item key="hostname">example.org</item>
</dt_assoc>
</item>
<item key="1">
<dt_assoc>
<item key="priority">1</item>
<item key="subdomain"></item>
<item key="hostname">mx.cust.aug17dnstest1.com.hostedemail.com</item>
</dt_assoc>
</item>
</dt_array>
</item>
<item key="SRV">
<dt_array>
<item key="0">
<dt_assoc>
<item key="priority">1</item>
<item key="weight">3</item>
<item key="subdomain">w3</item>
<item key="hostname">yummynames.com</item>
<item key="port">81</item>
</dt_assoc>
</item>
</dt_array>
</item>
</dt_assoc>
</item>
<item key="nameservers_ok">0</item>
</dt_assoc>
</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>Updated 14 days ago
