# Modify Zonedata

## dns-zone-list

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">**Accepts:**  
</span>

<table border="1" id="bkmrk-pattern-pattern-to-m" style="width: 387px;"><tbody><tr><td>*<span style="font-family: arial,helvetica,sans-serif; font-size: small;"> pattern</span>*</td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">Pattern to match (globbing, like "dom\*")</span></td></tr></tbody></table>

**<span style="font-family: arial,helvetica,sans-serif; font-size: small;">Returns:</span>**

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">List zones (domains) which are managed and served by Joker.com name  
servers. Zones are listed one per line.</span>

## dns-zone-get

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">**Requires:**</span>

<table align="left" border="1" cellpadding="2" cellspacing="0" id="bkmrk-domain-zone-%28domain%29" style="width: 80%;"><tbody><tr align="left" valign="middle"><td>*<span style="font-family: arial,helvetica,sans-serif; font-size: small;">domain</span>*</td><td align="left" valign="middle"><span style="font-family: arial,helvetica,sans-serif; font-size: small;">Zone (domain) name to fetch data from</span></td></tr></tbody></table>

**Accepts:**

<table border="1" id="bkmrk-include-defaults-if-" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 50%;"></col><col style="width: 50%;"></col></colgroup><tbody><tr><td>include-defaults</td><td>If specified with value "1", the zone will always include default values (which are omitted otherwise)</td></tr></tbody></table>

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">**Returns:**</span>

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">Returns list of zone records. </span>

The format of zone is as follows (one record per line):

```
<label> <type> <pri> <target> <ttl> <valid-from> <valid-to> <parameters(s)> 
```

Where:<span style="font-family: arial,helvetica,sans-serif; font-size: small;">  
</span>

<table border="1" cellpadding="2" cellspacing="0" id="bkmrk-label-subdomain%2Fredi" style="height: 181px; width: 542px;"><tbody><tr><td>*<span style="font-family: arial,helvetica,sans-serif; font-size: small;">label</span>*

</td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">subdomain/redirection label, relative to current zone, or '@' (which means current zone name)</span>

</td></tr><tr><td>*<span style="font-family: arial,helvetica,sans-serif; font-size: small;"> type</span>*

</td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">record type (A, AAAA, MX, CNAME, URL, MAILFW, TXT, NAPTR, DYNA, DYNAAAA, SRV, CAA)</span>

</td></tr><tr><td>*<span style="font-family: arial,helvetica,sans-serif; font-size: small;"> pri</span>*

</td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">numeric value, meaningful only for types MX, NAPTR and SRV, must be 0 for all other types</span>

</td></tr><tr><td>*<span style="font-family: arial,helvetica,sans-serif; font-size: small;"> target</span>*

</td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">record target/value. Must be quoted if contains spaces</span>

</td></tr><tr><td>*<span style="font-family: arial,helvetica,sans-serif; font-size: small;"> ttl</span>*

</td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">record TTL (time to live) in seconds</span>

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">if empty, the default is 86400 (1 day)</span>

</td></tr><tr><td>*<span style="font-family: arial,helvetica,sans-serif; font-size: small;"> valid-from</span>*

</td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">record is not valid before this time (UNIX timestamp) or 0</span>

</td></tr><tr><td>*<span style="font-family: arial,helvetica,sans-serif; font-size: small;"> valid-to</span>*

</td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">record is not valid after this time (UNIX timestamp) or 0</span>

</td></tr><tr><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;"> *parameters*    
</span>

</td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">record-specific parameter(s)</span>

</td></tr></tbody></table>

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">All values from "name" to "ttl" are mandatory for every record.  
  
&lt;valid-to&gt; and &lt;valid-from&gt; are not implemented yet, so usually are 0, and may be omitted if there are no other parameters required.  
  
&lt;parameters(s)&gt; are record dependent, used in NAPTR, MAILFW, FRAME and URL records.  
  
&lt;ttl&gt; must be at least 60 for all records except NAPTR and SVC, where it can be 0 (meaning: no caching). For MAILFW/URL/FRAME &lt;ttl&gt; is irrelevant and assumed to be 60 seconds (i.e., any change will be  
in effect within 60 seconds from zone change).  
  
&lt;pri&gt; preference value for MX records, priority/weight for SRV records and order/preference for NAPTR records. For any other record, the value must be 0.  
  
</span> Examples of zone records:<span style="font-family: arial,helvetica,sans-serif; font-size: small;">  
</span>

<span style="font-family: arial,helvetica,sans-serif; font-size: small;"> </span><span style="font-family: arial,helvetica,sans-serif; font-size: small;"><span style="font-family: courier new,courier;">www A 0 127.0.0.1 86400  
www AAAA 0 fec0::17 86400  
</span>  
<span style="font-family: courier new,courier;"> @ MX 10 mail.example.com. 86400  
  
redirect URL 0 [http://joker.com](https://joker.com//) 86400  
</span></span>

Sets redirection from redirect.joker.com to [http://joker.com](https://joker.com//) (assuming that current zone is "joker.com").  
<span style="font-family: arial,helvetica,sans-serif; font-size: small;">  
<span style="font-family: courier new,courier;"> frame FRAME 0 [http://joker.com](https://joker.com//) 86400 0 0 "Header: Frame-Forward" "head" "title" "body"  
</span>  
Sets frame-based redirection similar to URL redirection.  
  
For FRAME record, extra parameters are as follows:  
  
</span>

- <span style="font-family: arial,helvetica,sans-serif; font-size: small;"> Extra HTTP headers. (newlines may be escaped as \\n)</span>
- <span style="font-family: arial,helvetica,sans-serif; font-size: small;"> Extra text placed in &lt;head&gt;&lt;/head&gt; section of generated HTML.</span>
- <span style="font-family: arial,helvetica,sans-serif; font-size: small;"> Title text (&lt;title&gt;&lt;/title&gt;) of generated HTML.</span>
- <span style="font-family: arial,helvetica,sans-serif; font-size: small;"> Body text (used for &lt;noframes&gt; section)</span>

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">  
<span style="font-family: courier new,courier;"> username MAILFW 0 <redirected@example.com> 86400 0 0 1  
</span>  
This MAILFW records makes redirection of mail sent to <username@joker.com> (assuming that current zone name is "joker.com") to <redirected@example.com>, extra parameter ("1") specifies that spam-filtering should be used.  
  
<span style="font-family: courier new,courier;"> naptr NAPTR 10/100 replacement 86400 0 0 "flags" "service" "regex"</span>  
  
This NAPTR record has order 10 and preference 100. Only one of "replacement" or "regex" may be  
specified, if "regex" is specified, "replacement" must be "." (without quotes), if "replacement"  
is specified, "regex" must be empty string. Quotes are mandatory for all extra parameters.  
For details please consult RFC 2915, or look here: [http://de.wikipedia.org/wiki/NAPTR](http://de.wikipedia.org/wiki/NAPTR)  
  
<span style="font-family: courier new,courier;"> \_ldap.\_tcp SRV 10/100 ldap.example.com:389 60</span>  
  
This SRV record has priority 10, weight 100, target "ldap.example.com" and port "389" with TTL 60 seconds. Please consult RFC 2782 for details.  
  
<span style="font-family: courier new,courier;"> txt TXT 0 "key=value" 86400</span>  
  
Quoting of values for TXT records is mandatory.  
  
</span>

<span style="font-family: 'courier new', courier; font-size: small;">caa CAA 0 issue "letsencrypt.org" 86400  
caa CAA 0 issuewild "letsencrypt.org" 86400  
</span>

<span style="font-family: 'courier new', courier; font-size: small;">caa CAA 0 iodef "mailto:certissues@example.com" 86400</span>

<span style="font-family: arial, helvetica, sans-serif; font-size: small;">For more information about CAA records please check [Wikipedia](https://en.wikipedia.org/wiki/DNS_Certification_Authority_Authorization "CAA record").</span><span style="font-size: 13px;"> </span>

<span style="font-family: arial,helvetica,sans-serif; font-size: small;"><span style="font-family: courier new,courier;">www CNAME 0 example.com. 86400</span>  
  
Two special record types, DYNA and DYNAAAA, are used in case if DynDNS is active.  
They have same meaning as corresponding "A" and "AAAA" records, except that their targets may be updated using Joker DynDNS service.  
  
To enable/disable DynDNS service, and to define username/password used to access it, the record format is as follows:  
  
<span style="font-family: courier new,courier;"> $dyndns=yes:username:password</span>  
  
username/password may not contain spaces or colon (":") characters. If "no" is specified instead of "yes", DynDNS will be turned off (i.e. DYN\* entries will have no effect).  
  
In case if there are any errors, zone modification will not be accepted. All errors will be reported for every erroneous line, so if there are more than one, you will be able to see all detected errors.</span>

## dns-zone-put

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">**Requires:**</span>

<table align="left" border="1" cellpadding="2" cellspacing="0" id="bkmrk-domain-zone-%28domain%29-1" style="width: 80%;"><tbody><tr><td>*<span style="font-family: arial,helvetica,sans-serif; font-size: small;">domain</span>*

</td><td><span style="font-family: arial,helvetica,sans-serif; font-size: small;">Zone (domain) name to store data to</span>

</td></tr><tr><td>*<span style="font-family: arial,helvetica,sans-serif; font-size: small;">zone</span>*

</td><td align="left" valign="middle"><span style="font-family: arial,helvetica,sans-serif; font-size: small;">URL encoded zone data</span>

</td></tr></tbody></table>

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">**Returns:**</span>

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">Replace current zone for provided domain with specified value.</span>

<span style="font-family: arial,helvetica,sans-serif; font-size: small;"> Field "zone" will be parsed as multiline text (so usual line erminators are expected).</span>

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">**Warning: This request will overwrite current zone, i.e. all current ecords will be replaced by new records.**  
</span>

<span style="font-family: arial,helvetica,sans-serif; font-size: small;">The format of zone is as follows (one record per line):  
</span>

```
<label> <type> <pri> <target> <ttl> <valid-from> <valid-to> <parameters(s)><br></br>
```