Update IP addresses in zone files
This function replaces a domain's IPv4 address in the DNS zone file with the specified destination IPv4 address.
Query parameters
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.
Response
HTTP Request was successful.
Example response
{
"apiversion": 3,
"func": "swap_ip_in_zones",
"module": "DNS",
"result": {
"data": [
{
"zone_name": "example.com",
"record_name": "example.com",
"record_type": "A",
"old_value": "192.0.2.0",
"new_value": "192.0.2.1"
}
],
"status": 1
}
}Changes
No recorded changes to this endpoint across all 1 revision of this API.