advanced_update_nameservers

Adds nameservers to a domain, or adds or removes nameservers for a domain that already has nameservers assigned to it.

📘

Note:

This command does not create a nameserver; the nameserver must already exist.

This command is not supported for .DK. Use the update_all_info command to change the nameservers for .DK domains.

When you use this command to add or change nameservers for .IT domains, even though the response says the command was successful, the new nameservers are not activated immediately. The registry runs a series of tests against the nameservers before activating them. During the time that the tests are being run, any query about the domain, such as get nameservers or getdomainall_info, will return the old nameservers. If the nameservers do not pass the registry tests within 30 days, the registry ignores the request. If you issue another advanced_update_nameservers command before the registry has completed their tests, the new command is assumed to refer to the old, currently active nameservers.

Request parameters for advanced_update_nameservers

Standard parameters

  • action = advanced_update_nameservers
  • object = domain

Attributes

Parameters within the attributes associative array are described below.

Parameter nameObligationDefinition/Value
add_nsOptionalList of nameservers to add. This array cannot be submitted in the same command with the assign_ns parameter, but can be submitted with remove_ns.
assign_nsOptionalList of nameservers to assign. This array cannot be submitted in the same command with the add_ns or remove_ns parameters.
domainRequiredThe relevant domain.
op_typeRequiredThe type of operation to perform on the object.

Use assign when submitted with the assign_ns array.

Use add_remove when submitted with the add_ns or remove_ns arrays.
remove_nsOptionalList of nameservers to remove. This array cannot be submitted in the same command with the assign_ns parameter, but can be submitted with add_ns.

Response parameters for advanced_update_nameservers

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

Examples for advanced_update_nameservers

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">advanced_update_nameservers</item>
                <item key="object">domain</item>
                <item key="domain">yourdomain.com</item>
                <item key="attributes">
                    <dt_assoc>
                        <item key="assign_ns">
                            <dt_array>
                                <item key="0">ns1.example.com</item>
                                <item key="1">ns2.example.com</item>
                                <item key="2">ns3.example.com</item>
                                <item key="3">ns4.example.com</item>
                            </dt_array>
                        </item>
                        <item key="op_type">assign</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">advanced_update_nameservers</item>
                <item key="object">domain</item>
                <item key="domain">yourdomain.com</item>
                <item key="attributes">
                    <dt_assoc>
                        <item key="op_type">add_remove</item>
                        <item key="remove_ns">
                            <dt_array>
                                <item key="0">ns1.example.com</item>
                                <item key="1">ns2.example.com</item>
                            </dt_array>
                        </item>
                        <item key="add_ns">
                            <dt_array>
                                <item key="0">ns4.example.com</item>
                                <item key="1">ns3.example.com</item>
                            </dt_array>
                        </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 completed
                    successfully</item>
            </dt_assoc>
        </data_block>
    </body>
</OPS_envelope>