get (nameserver)
Queries nameservers that exist in the current user profile. These nameservers may or may not be currently assigned to a domain.
Request parameters for get (nameserver)
Standard parameters
- action = get
- object = nameserver
- registrant_ip = valid IP address of the registrant (optional)
Attributes
Parameters within the attributes associative array are described below.
Parameter name | Obligation | Definition/Value |
---|---|---|
domain | Required | The relevant domain. |
name | Required | Specify all. |
Response parameters for get (nameserver)
Standard parameters
- action = reply
- object = nameserver
- 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
Attributes
If the request is successful, the attributes associative array may include the
following:
Parameter name | Obligation | Definition/Value |
---|---|---|
nameserver_list | Returned if is_success = true | A list (array) of nameservers, each of which can contain any of the attributes listed in the Nameserver_List table below. |
Nameserver_List
Parameters within the nameserver_list associative array are described below.
Parameter name | Obligation | Definition/Value |
---|---|---|
can_delete | Always returned | A flag indicating whether the nameserver is currently serving a domain in OpenSRS. To delete a nameserver with can_delete set to zero, it must first be un-assigned from the domain it serves. Note: If the registry in which the nameserver object resides is serving a domain outside of OpenSRS, a delete_nameserver action returns an error, and the nameserver is not deleted. 0—Nameserver can be deleted. 1—Nameserver cannot be deleted. |
ipaddress | Returned if the nameserver has an Ipv4 address | The IPv4 address of the nameserver. Note: This parameter is always required for .DE, even if ipv6 is submitted. |
ipv6 | Returned if the nameserver has an Ipv6 address | The IPv6 address of the nameserver. Note: This parameter is not supported for .CN. |
name | Always returned | The fully qualified domain name of the nameserver. |
Examples for get (nameserver)
Example 1
This example returns information about an IPv4 nameserver.
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</item>
<item key="object">nameserver</item>
<item key="domain">yourdomain.com</item>
<item key="attributes">
<dt_assoc>
<item key="name">all</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">nameserver</item>
<item key="response_code">200</item>
<item key="response_text">Query Successful</item>
<item key="is_success">1</item>
<item key="attributes">
<dt_assoc>
<item key="nameserver_list">
<dt_array>
<item key="0">
<dt_assoc>
<item key="name">ns1.systemdns.com</item>
<item key="can_delete">1</item>
<item key="ipaddress">191.11.121.111</item>
</dt_assoc>
</item>
<item key="1">
<dt_assoc>
<item key="name">ns2.systemdns.com</item>
<item key="can_delete">0</item>
<item key="ipaddress">11.111.121.111</item>
</dt_assoc>
</item>
</dt_array>
</item>
</dt_assoc>
</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>
Example 2
This example returns information about an IPv6 nameserver.
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</item>
<item key="object">nameserver</item>
<item key="domain">yourdomain.com</item>
<item key="attributes">
<dt_assoc>
<item key="name">all</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">nameserver</item>
<item key="response_code">200</item>
<item key="response_text">Query Successful</item>
<item key="is_success">1</item>
<item key="attributes">
<dt_assoc>
<item key="nameserver_list">
<dt_array>
<item key="0">
<dt_assoc>
<item key="name">ns3.systemdns.com</item>
<item key="can_delete">1</item>
<item key="ipv6">2a00:1450:4008:c00:0:0:0:1</item>
</dt_assoc>
</item>
<item key="1">
<dt_assoc>
<item key="name">ns4.systemdns.com</item>
<item key="can_delete">0</item>
<item key="ipv6">2001:0db8:85a3:0000:0000:8a2e:0370:7334</item>
</dt_assoc>
</item>
</dt_array>
</item>
</dt_assoc>
</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>
Updated almost 2 years ago