Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function assigns nameservers to a reseller's account.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/setresellernameservers?user=username&nameservers=192.168.0.20%2C192.168.0.21
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/setresellernameservers?user=username&nameservers=192.168.0.20%2C192.168.0.21
 Command Line
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. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{
   "result":[
      {
         "status":1,
         "statusmsg":"Set resellers nameservers."
      }
   ]
}
 Output (XML)
<setresellernameservers>
     <result>
          <status>1</status>
          <statusmsg>Set resellers nameservers.</statusmsg>
     </result>
</setresellernameservers>

Parameters

ParameterTypeDescriptionPossible valuesExample
userstring

Required

The reseller's username.

A valid reseller username on the server.username
nameserversstring

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

ReturnTypeDescriptionPossible valuesExample

result

array of hashes

An array of hashes of function output.

This hash includes the status and statusmsg returns.

 

status

Boolean

Whether the function succeeded.

The function returns this value in the result hash.

  • 1 — Success.
  • 0 — Failure.
1

statusmsg

string

A message of success or a reason for failure.

The function returns this value in the result hash.

  • Set resellers nameservers.
  • An error message.

Set resellers nameservers.