Description
This function retrieves a zone file.
Warning:
We strongly recommend that you use UAPI instead of cPanel API 2. However, no equivalent UAPI function exists.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
domain |
string |
Required The record's domain. |
A valid domain name. |
example.com |
customonly |
Boolean |
Whether to return only non-essential A and CNAME records. This value defaults to 0. |
|
0 |
line |
integer |
Filter results for line numbers that match this value. This value defaults to 1. |
A positive integer. |
1 |
ttl |
integer |
Filter results for Time to Live (TTL) values that match this value. This value defaults to 14400. |
A positive integer.
|
14400 |
name |
string |
Filter results for name values that match this value. If you do not use this parameter, the function returns all results for the domain. |
A valid string. |
example.com |
class |
string |
Filter results for class values that match this value. This value defaults to IN. |
IN |
IN |
address |
string |
Filter results for address values that match this value. If you do not use this parameter, the function returns all of the domain's record types. |
A valid IPv4 or IPv6 address. |
10.10.10.10 |
type |
string |
Filter results for types that match this value. If you do not use this parameter, the function returns all of the domain's record types. |
Any valid record type. For example:
|
A |
txtdata |
string |
Filter results for TXT values that match this value. Note: Only use this parameter if you pass TXT as the type parameter's value. This value defaults to a blank string.
|
A valid string. |
v=blahblahblah |
preference |
string |
Filter results for preference values that match this value. This value defaults to 0. |
An integer value. |
0 |
exchange |
string |
Filter results for MX values that match this value. Note: Only use this parameter if you pass MX as the type parameter's value. This value defaults to a blank string.
|
A valid hostname. |
mail.example.com |