WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
Retrieve the connection information related to a application that has been granted access to this server. This data may include any number of properties, but its primary purpose is to associate API tokens and public/private key pairs and similar resources with a specific connected application.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/fetch_connected_application
- A server running WHM.
https://whm-server.tld:2087/json-api/fetch_connected_application
- 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/fetch_connected_application?name=application-1'{ "data": { "data": { … }, "name": "application-1" }, "metadata": { "command": "fetch_connected_application", "reason": "OK", "result": 1, "version": 1 } }
Request
Retrieve the connection information for all the connected applications that have been granted access to this server. This data may include any number of properties, but its primary purpose is to associate API tokens and public/private key pairs and similar resources with a specific connected application.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/list_connected_applications
- A server running WHM.
https://whm-server.tld:2087/json-api/list_connected_applications
- 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/list_connected_applications{ "data": { "list": [ … ] }, "metadata": { "command": "list_connected_applications", "reason": "OK", "result": 1, "version": 1 } }
Request
Remove the connected application from the server. This only removes the connection information from the configuration file. It does not clean up any allocated resources, such as API tokens and public/private keys. Any tokens or keys need to be removed from the system separately.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/remove_connected_application
- A server running WHM.
https://whm-server.tld:2087/json-api/remove_connected_application
- 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/remove_connected_application?name=application-1'{ "metadata": { "command": "remove_connected_application", "reason": "OK", "result": 1, "version": 1 } }