UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings.
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/
https://{host}:{port}/execute/
Request
This function parses a given DNS zone.
Important:
Most DNS zones contain only 7-bit ASCII. However, it is possible for DNS zones to contain any binary sequence. An application that decodes this function's base64 output must be able to handle cases where the decoded octets do not match any specific character encoding.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/DNS/parse_zone
- A server running cPanel.
https://cpanel-server.tld:2083/execute/DNS/parse_zone
- 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/cpanel.openapi/DNS/parse_zone?zone=example.com'{ "apiversion": 3, "func": "parse_zone", "module": "DNS", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
The IPv4 address to use as the replacement in the zone files.
The domain to perform the zone file updates on.
Note:
To update multiple domains, increment or duplicate the parameter name. For example, domain-0, domain-1, and domain-2.
The IPv4 address to use as the replacement for FTP records in the zone files.
If this parameter is not provided, then the system will use the dest_ip value.
The IPv4 address to replace in the zone files. The detected source IPv4 address is one of:
- If there is an A record for the root of the zone and the IP address is not a loopback address, then the system will use its address.
- If there are any A records in the zone whose addresses are not loopback addresses, then the system will use the address of the first such A record in the zone file.
- If no A records exist in the zone or all A records have loopback addresses, then the system will not update the zone file.
If you do not call this parameter, the system will automatically detect the IP addresses in the zone files.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/DNS/swap_ip_in_zones
- A server running cPanel.
https://cpanel-server.tld:2083/execute/DNS/swap_ip_in_zones
- 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/cpanel.openapi/DNS/swap_ip_in_zones?dest_ip=192.0.2.1&domain=example.com&ftp_ip=192.0.2.1&source_ip=192.0.2.0'{ "apiversion": 3, "func": "swap_ip_in_zones", "module": "DNS", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }