Child pages
  • WHM API 1 Functions - update_nameservers_config
Skip to end of metadata
Go to start of metadata

Description

This function updates nameservers in the wwwacct.conf file. For more information, read our Installation Guide - Customize Your Installation documentation.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/update_nameservers_config?nameserver=ns1.example.com
 Command Line
whmapi1 update_nameservers_config nameserver=ns1.example.com


Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)


   "metadata":{ 
      "reason":"OK",
      "result":1,
      "command":"update_nameservers_config",
      "version":1
   },
   "data":{ 
   }
}


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

ParameterTypeDescriptionPossible valuesExample
nameserverstring

The nameserver to add or update as the wwwacct.conf file's NS setting.

If you do not supply a value, the function does not update the setting.

A valid nameserver.

ns1.example.com
nameserver2string

The nameserver to add or update as the wwwacct.conf file's NS2 setting.

If you do not supply a value, the function does not update the setting.

A valid nameserver.ns2.example.com
nameserver3string

The nameserver to add or update as the wwwacct.conf file's NS3 setting.

If you do not supply a value, the function does not update the setting.

A valid nameserver.ns3.example.com
nameserver4string

The nameserver to add or update as the wwwacct.conf file's NS4 setting.

If you do not supply a value, the function does not update the setting.

A valid nameserver.ns4.example.com

Returns

This function only returns metadata.