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/resolvedomainname
- A server running WHM.
https://whm-server.tld:2087/json-api/resolvedomainname
- 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/resolvedomainname?domain=example.com'{ "data": { "ip": "192.168.0.20" }, "metadata": { "command": "resolvedomainname", "reason": "OK", "result": 1, "version": 1 } }
Request
This function creates a new MX record.
Important:
When you disable the DNS role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/savemxs
- A server running WHM.
https://whm-server.tld:2087/json-api/savemxs
- 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/savemxs?domain=example.com&exchange=mail.example.com&name=mail.example.com&preference=20&class=IN&ttl=14400'{ "metadata": { "command": "savemxs", "reason": "Bind reloading on server1 using rndc zone: [example.com]\n", "result": 1, "version": 1 } }
Request
This function configures the domain to use Next Secure Record 3 (NSEC3) semantics.
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.
The domain for which to enable NSEC3 semantics.
The number of times that the system re-executes the first resource record hash operation.
Whether NSEC3 will operate in Narrow mode or Inclusive mode.
Note
For information about these modes, read PowerDNS's DNSSEC documentation.
1- Narrow mode.0- Inclusive mode.
Whether the system will create records for all delegations.
1- Create records for all delegations.0- Create records only for secure delegations.
Note
Only select 1 if you must create records for all delegations.
The salt value that PowerDNS uses in the hashes.
Note:
For information about salt values, read RFC 5155.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/set_nsec3_for_domains
- A server running WHM.
https://whm-server.tld:2087/json-api/set_nsec3_for_domains
- 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/set_nsec3_for_domains?domain=example.com&nsec3_iterations=7&nsec3_narrow=1&nsec3_opt_out=0&nsec3_salt=1a2b3c4d5e6f'{ "data": { "domains": [ … ] }, "metadata": { "command": "set_nsec3_for_domains", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/resolvedomainname
- A server running WHM.
https://whm-server.tld:2087/json-api/resolvedomainname
- 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/resolvedomainname?domain=example.com'{ "data": { "ip": "192.168.0.20" }, "metadata": { "command": "resolvedomainname", "reason": "OK", "result": 1, "version": 1 } }
Request
This function creates a new MX record.
Important:
When you disable the DNS role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/savemxs
- A server running WHM.
https://whm-server.tld:2087/json-api/savemxs
- 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/savemxs?domain=example.com&exchange=mail.example.com&name=mail.example.com&preference=20&class=IN&ttl=14400'{ "metadata": { "command": "savemxs", "reason": "Bind reloading on server1 using rndc zone: [example.com]\n", "result": 1, "version": 1 } }
Request
This function configures the domain to use Next Secure Record 3 (NSEC3) semantics.
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.
The domain for which to enable NSEC3 semantics.
The number of times that the system re-executes the first resource record hash operation.
Whether NSEC3 will operate in Narrow mode or Inclusive mode.
Note
For information about these modes, read PowerDNS's DNSSEC documentation.
1- Narrow mode.0- Inclusive mode.
Whether the system will create records for all delegations.
1- Create records for all delegations.0- Create records only for secure delegations.
Note
Only select 1 if you must create records for all delegations.
The salt value that PowerDNS uses in the hashes.
Note:
For information about salt values, read RFC 5155.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/set_nsec3_for_domains
- A server running WHM.
https://whm-server.tld:2087/json-api/set_nsec3_for_domains
- 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/set_nsec3_for_domains?domain=example.com&nsec3_iterations=7&nsec3_narrow=1&nsec3_opt_out=0&nsec3_salt=1a2b3c4d5e6f'{ "data": { "domains": [ … ] }, "metadata": { "command": "set_nsec3_for_domains", "reason": "OK", "result": 1, "version": 1 } }