Child pages
  • WHM API 1 Functions - update_nameservers_config

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

This function updates nameservers in the wwwacct.conf file.

 For more information, read our Installation Guide - Customize Your Installation documentation.

Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/update_nameservers_config?nameserver=ns1.example.com



Expand
titleCommand Line


Code Block
languagebash
whmapi1 update_nameservers_config nameserver=ns1.example.com

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


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

Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote


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'sNS2 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.