WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
This function converts cPanel accounts that use a given child node to use the local server instead.
Unlike the WHM API 1 modifyacct API call, this API does not transfer users’ data from the child node as part of the conversion. This API is useful for emergency repairs if, for example, a child node goes permanently offline while accounts still use it.
Warning:
Because this API does not transfer users’ data from the child node, all converted users will lose data. You should only call this API as a last resort.
The child node’s alias (friendly name). This is the value passed in the WHM API 1 link_server_node_with_api_token function’s alias parameter.
The usernames of the distributed cPanel accounts to convert.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/force_dedistribution_from_node
- A server running WHM.
https://whm-server.tld:2087/json-api/force_dedistribution_from_node
- 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/force_dedistribution_from_node?node_alias=mailalias&user=username%2Cusername1'{ "data": { "log": [ … ], "user_info": [ … ] }, "metadata": { "command": "force_dedistribution_from_node", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/get_linked_server_node
- A server running WHM.
https://whm-server.tld:2087/json-api/get_linked_server_node
- 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/get_linked_server_node?alias=example'{ "data": { "enabled_services": [ … ], "hostname": "example.com", "last_check": 1556576165, "system_settings": { … }, "tls_verified": 1, "username": "root", "version": "11.86.0.0", "worker_capabilities": { … } }, "metadata": { "command": "get_linked_server_node", "reason": "OK", "result": 1, "version": 1 } }
The required API token to make API calls to the remote server node.
Note:
The API token must have root-level access on the remote server node.
The remote server node's hostname or IP address.
Note:
If you use an IP address, you must use the skip_tls_verification=1 parameter.
The username required to make API calls to the remote server node.
Note:
The username must have root-level access on the remote server node.
Whether to skip SSL/TLS verification. The system performs this action when it queries the remote server node.
1- Skip SSL/TLS verification.0- Do not skip SSL/TLS verification.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/get_server_node_status
- A server running WHM.
https://whm-server.tld:2087/json-api/get_server_node_status
- 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/get_server_node_status?api_token=23ZX8RA1FTE1IVJRL90MB5CREDS4UE2H&hostname=example.com&username=root&skip_tls_verification=1'{ "data": { "enabled_services": [ … ], "remote_node_linkages": [ … ], "system_settings": { … }, "tls_verified": 1, "version": "11.90.0.0" }, "metadata": { "command": "get_server_node_status", "reason": "OK", "result": 1, "version": 1 } }