WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
This function adds a server to a configuration cluster. The function's return data appears in the metadata section of its output.
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
GETmethod (for example, a URL in your browser). - You risk security problems if you enter a remote access key through the
GETmethod.
Important:
- Run this function as a
root-level user on the server that you wish to use as the parent server. - If you log in to a configuration cluster server that is not the parent server, nothing will indicate that the server is part of a configuration cluster. You can only view and modify this information from the parent server.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/add_configclusterserver
- A server running WHM.
https://whm-server.tld:2087/json-api/add_configclusterserver
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/add_configclusterserver?key=d0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0%3Ad0&name=example.com&user=root'{ "metadata": { "command": "add_configclusterserver", "name": "example.com", "reason": "OK", "result": 1, "signature": "d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0:d0", "user": "root", "version": 1 } }
Request
This function removes a server from a configuration cluster. The function's return data appears in the metadata section of its output.
Important:
If you log in to a configuration cluster server that is not the parent server, nothing will indicate that the server is part of a configuration cluster. You can only view and modify this information from the parent server.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/delete_configclusterserver
- A server running WHM.
https://whm-server.tld:2087/json-api/delete_configclusterserver
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/delete_configclusterserver?name=example.com'{ "metadata": { "command": "delete_configclusterserver", "name": "example.com", "reason": "OK", "result": 1, "version": 1 } }
Request
This function lists the servers in the server's configuration cluster.
Warning:
WHM's Remote Access Key feature is deprecated. We strongly recommend that you use API tokens instead.
If you log in to a configuration cluster server that is not the parent server, nothing will indicate that the server is part of a configuration cluster. You can only view and modify this information from the parent server.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/list_configclusterservers
- A server running WHM.
https://whm-server.tld:2087/json-api/list_configclusterservers
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/list_configclusterserversHTTP Request was successful.
Configuration cluster signatures and users for each server.
{ "data": { "example1.com": { … }, "example2.com": { … } }, "metadata": { "command": "list_configclusterservers", "reason": "OK", "result": 1, "version": 1 } }