- Created by Documentation, last modified on Apr 09, 2018
Description
This function assigns nameservers to a reseller's account.
Examples
https://hostname.example.com:2087/cpsess##########/json-api/setresellernameservers?user=username&nameservers=192.168.0.20%2C192.168.0.21
https://hostname.example.com:2087/cpsess##########/xml-api/setresellernameservers?user=username&nameservers=192.168.0.20%2C192.168.0.21
whmapi0 setresellernameservers user=username nameservers=192.168.0.20%2C192.168.0.21
Notes:
- You must URI-encode values.
- For more information and additional output options, read our Guide to WHM API 0 documentation or run the
whmapi0 --help
command. If you run CloudLinux™, you must use the full path of the
whmapi0
command:/usr/local/cpanel/bin/whmapi0
{ "result":[ { "status":1, "statusmsg":"Set resellers nameservers." } ] }
<setresellernameservers> <result> <status>1</status> <statusmsg>Set resellers nameservers.</statusmsg> </result> </setresellernameservers>
Parameters
Parameter | Type | Description | Possible values | Example |
---|---|---|---|---|
user | string | Required The reseller's username. | A valid reseller username on the server. | username |
nameservers | string | The nameserver IP addresses to allocate to the reseller's account. If you do not use this parameter, the function resets the reseller's nameservers to use the server default. | A comma-separated list of one or more nameserver IP addresses. | 192.168.0.20,192.168.0.21 |
Returns
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
| array of hashes | An array of hashes of function output. | This hash includes the status and statusmsg returns. |
|
| Boolean | Whether the function succeeded. The function returns this value in the |
| 1 |
| string | A message of success or a reason for failure. The function returns this value in the |
|
|
Function information
API Version:
WHM API 1 Equivalent:
Important:
We strongly recommend that you use WHM API 1. WHM API 0 is deprecated.
Available in:
WHM 11+
Methods:
GET, POST
Required Parameters:
user
Return Formats:
About WHM API 0
Warning:
WHM API 0 is deprecated. We strongly recommend that you use the equivalent WHM API 1 function instead.
Notes:
- Some functions and parameters may require that you authenticate as the
root
user. - You must use the appropriate WHM ports (
2086
or2087
) to call WHM API functions.
Find a function
Related functions
-
Page:WHM API 0 Sections - Resellers — Reseller functions allow you to manage Reseller accounts and their settings.
-
Page:WHM API 0 Functions - acctcounts — This function lists a reseller's total accounts, suspended accounts, and account creation limit.
-
Page:WHM API 0 Functions - getresellerips — This function lists a reseller's available IP addresses.
-
Page:WHM API 0 Functions - listacls — This function lists the reseller's Access Control Lists (ACLs) and each list's privileges.
-
Page:WHM API 0 Functions - listresellers — This function lists the reseller accounts on the server.