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/
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
- 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/import_zone_key?domain=example.com&key_data=Private-key-format%3A%2520v1.2%250AAlgorithm%3A%252013%2520%5C%28ECDSAP256SHA256%5C%29%250APrivateKey%3A%2520xCM281KtWE9oCsUX8fP1hDZ02%2FX7JCjp4QZA%2FDZjfX0%3D%250A%250A&key_type=ksk'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
- 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/remove_zone_key?domain=example.com&key_id=1'Response
application/json
{ "metadata": { "command": "remove_zone_key", "reason": "OK", "result": 1, "version": 1 } }