WHM API.
Download OpenAPI description
Overview
URL
WebPros International, LLC
License
Languages
Servers
Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
A server running WHM.
https://{host}:{port}/json-api/
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/export_zone_key
- A server running WHM.
https://whm-server.tld:2087/json-api/export_zone_key
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
export_zone_key \
domain='example.com' \
key_id='1'Response
application/json
{ "data": { "key_tag": 40481, "key_type": "CSK" }, "metadata": { "command": "export_zone_key", "reason": "OK", "result": 1, "version": 1 } }
Query
The security key's data that the pdnsuti utility's export-zone-key call returns.
Example: key_data=Private-key-format:%20v1.2%0AAlgorithm:%2013%20\(ECDSAP256SHA256\)%0APrivateKey:%20xCM281KtWE9oCsUX8fP1hDZ02/X7JCjp4QZA/DZjfX0=%0A%0A
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/import_zone_key
- A server running WHM.
https://whm-server.tld:2087/json-api/import_zone_key
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty import_zone_key domain='example.com' key_type='ksk' key_data='Private-key-format:%20v1.2%0AAlgorithm:%2013%20\(ECDSAP256SHA256\)%0APrivateKey:%20xCM281KtWE9oCsUX8fP1hDZ02/X7JCjp4QZA/DZjfX0=%0A%0A'Response
application/json
{ "data": { "import_key_id": 1 }, "metadata": { "command": "import_zone_key", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/remove_zone_key
- A server running WHM.
https://whm-server.tld:2087/json-api/remove_zone_key
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
remove_zone_key \
domain='example.com' \
key_id='1'Response
application/json
{ "metadata": { "command": "remove_zone_key", "reason": "OK", "result": 1, "version": 1 } }