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

Description


This function adds a server to a configuration cluster.

Important:

  • We deprecated WHM's Remote Access Key feature in cPanel & WHM version 64. We strongly recommend that you use API tokens instead.
  • Run this function as a root-level user on the server that you wish to use as the master server.
  • If you log in to a configuration cluster server that is not the master server, nothing will indicate that the server is part of a configuration cluster. You can only view and modify this information from the master server.

We recommend that you run this function as a POST request with SSL enabled:

  • The length of the remote access key may cause problems if you run the function with the GET method (for example, a URL in your browser).
  • You risk security problems if you enter a remote access key through the GET method.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/add_configclusterserver?api.version=1&name=example.com&user=root&key=d0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/add_configclusterserver?api.version=1&name=example.com&user=root&key=d0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0
 Command Line
whmapi1 add_configclusterserver name=example.com user=root key=d0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0


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. 

 Output (JSON)
{
  "metadata": {
    "signature": "d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0",
    "version": 1,
    "user": "root",
    "name": "example.com",
    "reason": "OK",
    "result": 1,
    "command": "add_configclusterserver"
  }
}
 Output (XML)
<result>
  <metadata>
   <signature>d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0</signature>
   <version>1</version>
   <user>root</user>
   <name>example.com</name>
   <reason>OK</reason>
   <result>1</result>
   <command>add_configclusterserver</command>
   </metadata>
</result>


Note:

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

   

Parameters

ParameterTypeDescriptionPossible valuesExample
name
string

Required

The remote configuration cluster server's name.

A valid hostname or IP address.example.com
userstring

Required

The username for the server's root-level account.

A valid username.root
keystring

Required

A truncated version of the server's remote access key.

A valid string.
 Click to view...
d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0

 

Returns

Note:

The function's return data appears in the metadata section of its output.

ReturnTypeDescriptionPossible valuesExample
name
string

The remote configuration cluster server's name.

A valid hostname or IP address.example.com
userstringThe username for the server's root-level account.A valid username.root
keystring

A truncated version of the server's remote access key.

A valid string.
 Click to view...
d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0