create (nameserver)

Creates a nameserver in the same domain space as the cookie's domain.

📘

Note:

This action is not the same as modify (nameserver), which actually assigns a nameserver to a domain.

Request parameters for create (nameserver)

Standard parameters

  • action = create
  • object = nameserver
  • registrant_ip = valid IP address of the registrant (optional)
  • cookie = cookie created to access OpenSRS, see "set (cookie)" (optional)

Attributes

Parameters within the attributes associative array are described below.

Parameter nameObligationDefinition/Value
add_to_all_registryOptionalAdds the newly created nameserver to other
registries so that the nameserver can be used
on other TLDs.
Specify OpenSRS supported TLDs where the
Registry supports nameservers as a separate
object.
DomainRequired if cookie is not submittedThe relevant domain.
ipaddressRequired if ipv6 is not submittedThe IPv4 address of the nameserver.

You can specify ipaddress or ipv6, or both.

Note: This parameter is always required for .DE, even if ipv6 is submitted.
ipv6Required if ipaddress is not submittedThe IPv6 address of the nameserver.

You can specify ipaddress or ipv6, or both.

Note:This parameter is not supported for .CN.
nameRequiredFully qualified race-encoded domain name of the nameserver.

Response parameters for create (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

Examples for create (nameserver)

Example 1

This example creates an IPv4 nameserver without adding to any foreign
registries.

<?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">create</item>
<item key="object">nameserver</item>
<item key="domain">example.com</item>
<item key="attributes">
<dt_assoc>
<item key="name">ns1.example.com</item>
<item key="ipaddress">212.112.123.11</item>
</dt_assoc>
</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>
<?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_text">Nameserver Created</item>
<item key="is_success">1</item>
<item key="response_code">200</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>

Example 2

This example creates an IPv4 nameserver and adds it to any foreign
registries.

<?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_array>
<item key="0">
<dt_assoc>
<item key="protocol">XCP</item>
<item key="action">create</item>
<item key="object">nameserver</item>
<item key="domain">example.com</item>
<item key="attributes">
<dt_assoc>
<item key="add_to_all_registry">
<dt_array>
<item key="0">.info</item>
<item key="1">.name</item>
<item key="2">.org</item>
<item key="3">.biz</item>
<item key="4">.de</item>
<item key="5">.cc</item>
<item key="6">.us</item>
</dt_array>
</item>
<item key="ipaddress">207.136.65.24</item>
<item key="name">ns6.example.com</item>
</dt_assoc>
</item>
</dt_assoc>
</item>
</dt_array>
</data_block>
</body>
</OPS_envelope>
<?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_array>
<item key="0">
<dt_assoc>
<item key="protocol">XCP</item>
<item key="action">reply</item>
<item key="object">nameserver</item>
<item key="add_to_all_registry">
<dt_assoc>
<item key=".biz">
<dt_assoc>
<item key="is_success">1</item>
<item key="response_code">200</item>
<item key="response_text">Command
successful</item>
</dt_assoc>
</item>
<item key=".cc">
<dt_assoc>
<item key="is_success">1</item>
<item key="response_code">200</item>
successful</item>
successful</item>
successful</item>
successful</item>
successful</item>
<item key="response_text">Command
</dt_assoc>
</item>
<item key=".info">
<dt_assoc>
<item key="is_success">1</item>
<item key="response_code">200</item>
<item key="response_text">Command
</dt_assoc>
</item>
<item key=".name">
<dt_assoc>
<item key="is_success">1</item>
<item key="response_code">200</item>
<item key="response_text">Command
</dt_assoc>
</item>
<item key=".org">
<dt_assoc>
<item key="is_success">1</item>
<item key="response_code">200</item>
<item key="response_text">Command
</dt_assoc>
</item>
<item key=".us">
<dt_assoc>
<item key="is_success">1</item>
<item key="response_code">200</item>
<item key="response_text">Command
</dt_assoc>
</item>
</dt_assoc>
</item>
<item key="is_success">1</item>
<item key="response_code">200</item>
<item key="response_text">Nameserver Created</item>
</dt_assoc>
</item>
</dt_array>
</data_block>
</body>
</OPS_envelope>

Example 3

This example submits the create nameserver command without end-user
credentials and creates an IPv4 nameserver without adding it to any foreign
registries.

<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<OPS_envelope>
<header>
<version>0.9</version>
</header>
<body>
<data_block>
<dt_assoc>
<item key="protocol">XCP</item>
<item key="action">create</item>
<item key="object">nameserver</item>
<item key="domain">example.com</item>
<item key="attributes">
<dt_assoc>
<item key="ipaddress">212.112.123.11</item>
<item key="name">ns5.example.com</item>
</dt_assoc>
</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>
<?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="is_success">1</item>
<item key="response_text">Nameserver Created</item>
<item key="response_code">200</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>

Example 4

This example creates an IPv6 nameserver without adding to any foreign
registries.

<?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">create</item>
<item key="object">nameserver</item>
<item key="domain">example.com</item>
<item key="attributes">
<dt_assoc>
<item key="name">ns1.example.com</item>
<item key="ipv6">2a00:1450:4008:c00:0:0:0:1</item>
</dt_assoc>
</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>
<?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_text">Nameserver Created</item>
<item key="is_success">1</item>
<item key="response_code">200</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>