WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
- 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 } }
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 } }