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/activate_zone_key
- A server running WHM.
https://whm-server.tld:2087/json-api/activate_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/activate_zone_key?domain=example.com&key_id=1'{ "metadata": { "command": "activate_zone_key", "reason": "OK", "result": 1, "version": 1 } }
Request
This function generates a DNSSEC zone key for a domain.
Note:
- Only servers that run PowerDNS can use DNSSEC. If you call this function on a server that doesn't use PowerDNS, you will receive an error.
- After you enable DNSSEC on the domain, you must add the Delegation of Signing (DS) records to your zone record and your registrar.
- You cannot modify the DNSSEC security key. To make any changes, you must disable, delete, and re-create the DNSSEC security key.
The algorithm that the system uses to generate the security key.
5— RSA/SHA-16— DSA-NSEC3-SHA17— RSA SHA1-NSEC3-SHA18— RSA/SHA-25613— ECDSA Curve P-256 with SHA-25614— ECDSA Curve P-384 with SHA-384
Note:
We recommend that you use a 13 (ECDSA Curve P-256 with SHA-256) value if your registrar supports it.
The type of security key to add.
ksk— Key Signing Key.zsk— Zone Signing Key.
Note:
You must call these values in lowercase.
Whether to activate the new security key.
1— Activate.0— Do not activate.
The security key size, in bits.
Note:
This parameter defaults to the following values, depending on the algo_num and key_type values:
algo_num=5ksk=2048zsk=1024
algo_num=6ksk=2048zsk=1024
algo_num=7ksk=2048zsk=1024
algo_num=8ksk=2048zsk=1024
algo_num=13kskandzsk=256
algo_num=14kskandzsk=384
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/add_zone_key
- A server running WHM.
https://whm-server.tld:2087/json-api/add_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/add_zone_key?algo_num=13&domain=example.com&key_type=ksk&active=1&key_size=256'{ "data": { "new_key_id": "1" }, "metadata": { "command": "add_zone_key", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/deactivate_zone_key
- A server running WHM.
https://whm-server.tld:2087/json-api/deactivate_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/deactivate_zone_key?domain=example.com&key_id=1'{ "metadata": { "command": "deactivate_zone_key", "reason": "OK", "result": 1, "version": 1 } }