WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
This function links your server to a remote server node. The server uses an API token to communicate with the remote server node.
Important:
- This function only runs on a Standard Node profile server.
- The remote server node must use a version that is the same as or greater than your server version.
- This function requires the use of an API token. For more information, read our Guide to API Authentication - API Tokens in WHM documentation.
A unique name that refers to the remote server node.
Note:
The alias may only contain alphanumeric characters, dashes (-), and underscores (_). It also has a maximum length of 50 characters.
The API token required 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.
Note:
This parameter does not accept an IP address.
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.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/link_server_node_with_api_token
- A server running WHM.
https://whm-server.tld:2087/json-api/link_server_node_with_api_token
- 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/link_server_node_with_api_token?alias=example&api_token=23ZX8RA1FTE1IVJRL90MB5CREDS4UE2H&hostname=host.example.com&username=root&skip_tls_verification=0'{ "metadata": { "command": "link_server_node_with_api_token", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/list_linked_server_nodes
- A server running WHM.
https://whm-server.tld:2087/json-api/list_linked_server_nodes
- 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_linked_server_nodes{ "data": { "payload": [ … ] }, "metadata": { "command": "list_linked_server_nodes", "reason": "OK", "result": 1, "version": 1 } }
Request
This function returns the system's cPanel accounts and the linked cPanel & WHM server on which they exist.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/list_user_child_nodes
- A server running WHM.
https://whm-server.tld:2087/json-api/list_user_child_nodes
- 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_user_child_nodes{ "data": { "payload": [ … ] }, "metadata": { "command": "list_user_child_nodes", "reason": "OK", "result": 1, "version": 1 } }