If you haven’t used WAPI before, read the WAPI Manual first.
This guide covers WAPI requests for working with DNS. In some cases concerning CZ domains, you do not work with DNS, but with NSSET. You can find instructions for working with NSSET in the article WAPI – NSSET.
This article provides information on the following requests:
- dns-domains-list – list of DNS domains in user’s account
- dns-domain-info – information about the domain
- dns-domain-add – add tomain to DNS
- dns-domain-delete – delete domain from DNS
- dns-domain-axfr-run – request AXFR transfer from the primary server to our DNS
- dns-domain-copy – add a domain to DNS by copying another domain
- dns-domain-update-keyset – edit domain keyset
- dns-domain-commit – save DNS changes
- dns-rows-list – retrieve list of domain records
- dns-row-detail – retrieve record detail
- dns-row-add – add record
- dns-row-update – edit record
- dns-row-delete – delete record
dns-domains-list
Use the dns-domains-list request to list the user’s DNS domains.
Parameters
The request takes no parameters.
Return Values
- 1000 – OK
Return Data
The request returns a list of domains using this template:
- domain
- name – domain name
- status – status
- type – type (primary/secondary)
Templates
JSON dns-domains-list
JSON request:
{ "request": { "user": "your@login.tld", "auth": "authentication string", "command": "dns-domains-list", "clTRID": "your ID", } }JSON response (OK):
{ "response": { "code": 1000, "result": "OK", "timestamp": "UTF timestamp", "clTRID": "your ID", "svTRID": "server ID", "command": "dns-domains-list", "data": { "domain1": { "name": "domain name in DNS", "type": "type (primary/secondary)", "status": "status" } } } }
dns-domain-info
Use the dns-domain-info request to find basic information about the domain in the WEDOS DNS system (WDNS).
Parametry
- name – domain name
Return Values
- 1000 = OK
- 2201 = unsupported TLD
- 2202 = invalid domain name
- 3222 = failed to open domain
- 3223 = authorization error
- 3305 = domain is locked for editing
- 3306 = domain is deleted
Return Data
If successful, the request returns the domain detail in WDNS in the data/domain node.
Templates
JSON dns-domain-info
JSON request:
{ "request": { "user": "your@login.tld", "auth": "authentication string", "command": "dns-domain-info", "clTRID": "your ID", "data": { "name": "domain name" } } }JSON response (OK):
{ "response": { "code": 1000, "result": "OK", "timestamp": "UTF timestamp", "clTRID": "your ID", "svTRID": "server ID", "command": "dns-domain-info", "data": { "domain": { "name": "domain name", "status": "", "type": "", "tlock": "", "autocommit": "", "axfr_enabled": "outgoing axfr enabled? (0/1)", "axfr_ips": "allowed axfr IPs list", "changed": "", "changed_date": "", "commit_date": "", "reload_pending": "", "reload_pending_date": "", "reload_date": "", "disabled_date": "", "enabled_date": "", "add_date": "", "rname": "", "serial": "", "refresh": "", "retry": "", "expire": "", "minimum": "", "rr_cnt6": "", "ns_out": "", "ns1": "" } } } }
dns-domain-add
Use the dns-domain-add request to add a new domain to DNS.
Parameters
- name – domain name – required
- type – domain record type (primary/secondary) – optional (default: primary)
- axfr_enabled – is outgoing axfr enabled? (0/1) – primary domains only – optional (default: 0)
- axfr_ip – list of enabled ip addresses for axfr (only for primary entry, required if axfr_enabled=1)
- ip – ip address for outgoing axfr
- primary_ip – ip address of the primary dns server (required if type=secondary)
Return Values
- 1000 = ok
- 2100 = missing required parameter
- 2101 = invalid input parameters
- 2201 = unsupported TLD
- 2202 = invalid domain name
- 2301 = wrong format of type
- 2302 = missing parameter primary_ip
- 2303 = wrong format of primary_ip
- 2304 = invalid format axfr_enabled
- 2305 = missing required parameter axfr_ips
- 2306 = invalid format of axfr_ips
- 2308 = invalid format of ns
- 2322 = reached limit of domains in the DNS per user
- 3302 = add domain to DNS failed
- 3303 = domain already exists in DNS
Return Data
The request returns no data.
Šablony
JSON dns-domain-add
JSON request:
{ "request": { "user": "your@login.tld", "auth": "authentication string", "command": "dns-domain-add", "clTRID": "your ID", "data": { "name": "domain name", "axfr_enabled": "0 or 1", "axfr_ips": { "ip1": "allowed AXFR address" } } } }JSON response (OK):
{ "response": { "code": 1000, "result": "OK", "timestamp": "UTF timestamp", "clTRID": "your ID", "svTRID": "server ID", "command": "dns-domain-add" } }
dns-domain-delete
Use the dns-domain-delete request to delete a domain from DNS, including all its records.
Parameters
- name – domain name – required
Return Values
- 1000 = ok
- 3222 = opening domain failed
- 3223 = access denied
- 3301 = record can not be removed
- 3305 = domain is locked for editing
- 3306 = domain is deleted
Return Data
The request returns no data.
Šablony
JSON dns-domain-delete
JSON request:
{ "request": { "user": "your@login.tld", "auth": "authentication string", "command": "dns-domain-delete", "clTRID": "your ID", "data": { "name": "název domény" } } }JSON response (OK):
{ "response": { "code": 1000, "result": "OK", "timestamp": "UTF timestamp", "clTRID": "your ID", "svTRID": "server ID",, "command": "dns-domain-delete" } }
dns-domain-axfr-run
The dns-domain-axfr-run request updates DNS records from the primary authoritative server via AXFR as soon as possible (within a few minutes). It is used for secondary domains, where we download the content of the zone to our system from another server.
Without this request, AXFR uses the REFRESH and RETRY data in the SOA record.
Parameters
- name – domain name – required
Return Values
- 1000 = ok
- 2201 = unsupported TLD
- 2202 = invalid, or unsupported domain name
- 2319 = can be done for secondary domain type only
- 3222 = opening domain failed
- 3223 = access denied
- 3305 = domain is locked for editing
- 3306 = domain is deleted
Return Data
- next_run – time for the next update to take place
Templates
JSON dns-domain-axfr-run
JSON příkaz:
{ "request": { "user": "your@login.tld", "auth": "authentication string", "command": "dns-domain-axfr-run", "clTRID": "your ID", "data": { "name": "domain name" } } }JSON odpověď (OK):
{ "response": { "code": 1000, "result": "OK", "timestamp": "UTF timestamp", "clTRID": "your ID", "svTRID": "server ID", "command": "dns-domain-axfr-run", "data": { "next_run": "date and time of next update" } } }
dns-domain-copy
Use the dns-domain-copy command to add a domain to DNS by copying the settings and records from another existing one.
Parameters
- name – name of the original domain (the one you want to copy) – required
- name_new – name of the newly created domain – required
Return Values
- 1000 = ok
- 2201 = unsupported TLD
- 2202 = invalid, or unsupported name of existing domain
- 2320 = invalid, or unsupported name of new domain
- 2321 = unsupported TLD of new domain name
- 2322 = reached limit of the number of domains in the DNS per user
- 3222 = opening domain failed
- 3223 = access denied
- 3305 = domain is locked for editing
- 3306 = domain is deleted
- 3311 = copying failed
- 3312 = new domain already exists in DNS
Return Data
The request returns no data.
Templates
JSON dns-domain-copy
JSON request:
{ "request": { "user": "your@login.tld", "auth": "authentication string", "command": "dns-domain-copy", "clTRID": "your ID", "data": { "name": "original domain name", "name_new": "new domain name" } } }JSON response (OK):
{ "response": { "code": 1000, "result": "OK", "timestamp": "UTF timestamp", "clTRID": "your ID", "svTRID": "server ID", "command": "dns-domain-copy" } }
dns-domain-update-keyset
The dns-domain-update-keyset request allows you to make changes to the KEYSET settings for the domain, i.e. to enable, disable, or update DNSSEC settings.
Parameters
- name – domain name – required
- keyset – KEYSET settings – required
0 = no KEYSET / disable DNSSEC
1 = our KEYSET / our DNSSEC (if the domain uses our DNS servers and is set as primary)
string = the name of your own KEYSET (if the domain does not use our DNS servers or is set as secondary)
Return Values
- 1000 = OK
- 2202 = invalid, or unsupported name of existing domain
- 2264 = invalid KEYSET name
- 2265 = no DNSSEC support
- 2266 = unsupported action for secondary domain
- 2267 = unsupported action for primary domain
- 3260 = pending DNSSEC order already exists
- 3258 = registry downtime in progress
- 3263 = domain does not use our DNS
- 3222 = opening domain failed
- 3223 = access denied
- 3259 = KEYSET is unavailable
- 3262 = DNSSEC setup failed
- 3264 = KEYSET is blocked
Return Data
The request returns no data.
Templates
JSON dns-domain-update-keyset
JSON request:
{ "request": { "user": "your@login.tld", "auth": "authentication string", "command": "dns-domain-update-keyset", "clTRID": "your ID", "data": { "name": "domain name", "keyset": "0/1/string", } } }JSON odpověď (OK):
{ "response": { "code": 1000, "result": "OK", "timestamp": "UTF timestamp", "clTRID": "your ID", "svTRID": "server ID", "command": "dns-domain-update-keyset" } }
dns-domain-commit
Use the dns-domain-commit request after making any changes to the domain or its DNS records. You confirm the changes and request their distribution to DNS servers.
Without using the dns-domain-commit command, the system will do it automatically 5 minutes after the last change.
Parameters
- name – domain name – required
Return Values
- 1000 = ok
- 2201 = unsupported TLD
- 2202 = invalid or unsupported domain name
- 3222 = opening domain failed
- 3223 = access denied
- 3305 = domain is locked for editing
- 3306 = domain is deleted
Return Data
The request returns no data.
Šablony
JSON dns-domain-commit
JSON request:
{ "request": { "user": "your@login.tld", "auth": "authentication string", "command": "dns-domain-commit", "clTRID": "your ID", "data": { "name": "domain name" } } }JSON response (OK):
{ "response": { "code": 1000, "result": "OK", "timestamp": "UTF timestamp", "clTRID": "your ID", "svTRID": "server ID", "command": "dns-domain-commit" } }
dns-rows-list
Use the dns-rows-list request to get a list of domain records in DNS along with basic information.
To get more detailed information about a particular record, use the dns-row-detail request.
Parameters
- domain – domain name – required
Return Values
- 1000 = ok
- 2201 = unsupported TLD
- 2202 = invalid or unsupported domain name
- 2318 = can not be performed at the secondary domain type
- 3222 = opening domain failed
- 3223 = access denied
- 3305 = domain is locked for editing
- 3306 = domain is deleted
Návratová data
- row – record
- ID – record ID
- name – record name
- ttl – record TTL
- rdtype – record type
- rdata – record data
- changed_date – date of change
- author_comment – comment
Templates
JSON dns-rows-list
JSON request:
{ "request": { "user": "your@login.tld", "auth": "authentication string", "command": "dns-rows-list", "clTRID": "your ID", "data": { "domain": "domain name" } } }JSON response (OK):
{ "response": { "code": 1000, "result": "OK", "timestamp": "UTF timestamp", "clTRID": "your ID", "svTRID": "server ID", "command": "dns-rows-list", "data": { "row1": { "ID": "record ID", "name": "record name (may be empty)", "ttl": "TTL", "rdtype": "record type", "rdata": "record data", "changed_date": "date and time of last update", "author_comment": "comment" } } } }
dns-row-detail
The dns-row-detail request returns detailed information about a specific domain DNS record.
To get a complete list of a domain’s records, use the dns-rows-list request.
Parameters
- name – domain name – required
- row_id – record ID – required, gained from dns-rows-list
Return Values
- 1000 = ok
- 2201 = unsupported TLD
- 2202 = invalid or unsupported domain name
- 2318 = This action can not be performed on the secondary domain type
- 3222 = opening of the domain failed
- 3223 = access denied
- 3305 = domain is locked for editing
- 3306 = domain is deleted
- 3309 = required DNS record for the domain does not exist
Return Data
- row – record
- ID – record ID
- name – record name
- ttl – record TTL
- rdtype – record type
- rdata – record data
- changed_date – date of change
- author_comment – comment
Templates
JSON dns-row-detail
JSON příkaz:
{ "request": { "user": "your@login.tld", "auth": "authentication string", "command": "dns-row-detail", "clTRID": "your ID", "data": { "name": "název domény", "row_id": "ID záznamu" } } }JSON response (OK):"response": { "code": 1000, "result": "OK", "timestamp": "UTF timestamp", "clTRID": "your ID", "svTRID": "server ID", "command": "dns-row-detail", "data": { "row1": { "ID": "record ID", "name": "record name (may be empty)", "ttl": "TTL", "rdtype": "record type", "rdata": "record data", "changed_date": "date and time of last update", "author_comment": "comment" } } } }
dns-row-add
The dns-row-add request adds a new DNS record to the domain.
Parameters
- domain – domain name – required
- name – record name – required, but can be empty
- ttl – TTL value – required
- type – record type – required
- rdata – record data – required
- auth_comment – author comment – optional
Return Values
- 1000 = ok
- 2201 = unsupported TLD
- 2202 = invalid or unsupported domain name
- 2309 = invalid record type
- 2310 = unable to add another record to the domain
- 2311 = invalid name
- 2312 = invalid name for that type of the record
- 2313 = invalid CNAME for this name
- 2314 = invalid data of the record
- 2315 = invalid TLD
- 2316 = this record already exists
- 2317 = invalid TTL
- 2318 = action can not be performed on the secondary domain type
- 3222 = opening of the domain failed
- 3223 = access denied
- 3305 = domain is locked for editing
- 3306 = domain is deleted
Return Data
The request returns no data.
Templates
JSON dns-row-add
JSON request:
{ "request": { "user": "your@login.tld", "auth": "authentication string", "command": "dns-row-add", "clTRID": "your ID", "data": { "domain": "domain name", "name": "record name (may be empty)", "ttl": "TTL", "type": "record type", "rdata": "record data" } } }JSON request (OK):
{ "response": { "code": 1000, "result": "OK", "timestamp": "UTF timestamp", "clTRID": "your ID", "svTRID": "server ID", "command": "dns-row-add", } }
dns-row-update
Use the dns-row-update request to change a DNS record.
You cannot change the name and type of a record. In such a situation, delete the original record and then create a new one.
Parameters
- domain – domain name – required
- row_id – record ID – required, gained from dns-rows-list
- ttl – TTL value – required
- rdata – record data – required
Return Values
- 1000 = ok
- 2201 = unsupported TLD
- 2202 = invalid or unsupported domain name
- 2309 = invalid record type
- 2310 = you can not add another record to the domain
- 2311 = invalid name
- 2312 = invalid name for this type of record
- 2313 = invalid CNAME for this title
- 2314 = invalid data record
- 2315 = invalid TLD
- 2316 = this record already exists
- 2317 = invalid TTL
- 2318 = action can not be performed on the secondary domain type
- 3222 = open domain failed
- 3223 = access denied
- 3305 = domain is locked for editing
- 3306 = domain is deleted
- 3309 = record of that ID does not exist
- 3310 = modification of record failed
Return Data
The request returns no data.
Templates
JSON dns-row-update
JSON příkaz:
{ "request": { "user": "your@login.tld", "auth": "authentication string", "command": "dns-row-update", "clTRID": "your ID", "data": { "domain": "domain name", "row_id": "row ID", "ttl": "TTL", "rdata": "record data" } } }JSON response (OK):
{ "response": { "code": 1000, "result": "OK", "timestamp": "UTF timestamp", "clTRID": "your ID", "svTRID": "server ID", "command": "dns-row-update" } }
dns-row-delete
Use the dns-row-delete request to delete a DNS record for a domain.
Parameters
- domain – domain name – required
- row_id – record ID – required, gained from dns-rows-list
Return Values
- 1000 = ok
- 2201 = unsupported TLD
- 2202 = invalid or unsupported domain name
- 2318 = invalid action for secondary domain type
- 3222 = opening of the domain failed
- 3223 = access denied
- 3305 = domain is locked for editing
- 3306 = domain is deleted
- 3308 = deleting of the record failed
- 3309 = record with this ID does not exist
Return Data
The request returns no data.
Templates
JSON dns-row-delete
JSON request:
{ "request": { "user": "your@login.tld", "auth": "authentication string", "command": "dns-row-delete", "clTRID": "your ID", "data": { "domain": "domain name", "row_id": "record ID" } } }JSON request (OK):
{ "response": { "code": 1000, "result": "OK", "timestamp": "UTF timestamp", "clTRID": "your ID", "svTRID": "server ID", "command": "dns-row-delete", } }