WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
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 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/restore_config_from_file
- A server running WHM.
https://whm-server.tld:2087/json-api/restore_config_from_file
- 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/restore_config_from_file?module=Main&path=%2Fvar%2Fcpanel%2Fcpanel.config'{ "metadata": { "command": "restore_config_from_file", "reason": "OK", "result": 1, "version": 1 } }