Appearance
DNS zones
DNS zones and their records (product family zone, scope console-zones beta, or user / user:read / products:read).
| Method | Path | |
|---|---|---|
| GET | /zones | your zones; ?name= |
| GET | /zones/{zone} | one zone |
| DELETE | /zones/{zone} | delete; body name = the zone name |
| GET | /zones/{zone}/records | records; ?name=, ?type=, ?content= |
| POST | /zones/{zone}/records | create a record |
| GET | /zones/{zone}/records/{record} | one record |
| PUT | /zones/{zone}/records/{record} | change a record |
| DELETE | /zones/{zone}/records/{record} | delete a record |
New zones are ordered through orders (family zone, see Order attributes).
Zones
bash
curl "https://console.anikeen.com/api/v1/zones?name=example.com" \
-H "Authorization: Bearer $ANIKEEN_TOKEN" -H "Accept: application/json"Delete a zone
http
DELETE /v1/zones/{zone}
{"name": "example.com"}→ 204. A wrong name answers 422 with an error on name.
Records
Fields
| Field | Rules |
|---|---|
name | required: the zone name itself or a name ending in .<zone> (e.g. www.example.com); letters, digits, -, _, ., optionally starting with *. for a wildcard |
type | required: A, AAAA, ALIAS, CNAME, MX, SRV, TLSA, TXT |
content | required, must be valid for the type |
ttl | required, integer 0–604800 (seconds) |
prio | required for MX and SRV (0–65535), ignored for other types |
Create
bash
curl -X POST https://console.anikeen.com/api/v1/zones/01JC…/records \
-H "Authorization: Bearer $ANIKEEN_TOKEN" -H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name":"www.example.com","type":"A","content":"192.0.2.10","ttl":3600}'json
{"name": "example.com", "type": "MX", "content": "mail.example.com", "ttl": 3600, "prio": 10}The response is the created record. PUT /zones/{zone}/records/{record} takes the same fields and returns the changed record; DELETE answers 204.
Filter
http
GET /v1/zones/{zone}/records?type=TXT&name=example.comname, type and content filter by exact match. The list is paginated.
When records are not available
The record endpoints answer 409 (the zone is not set up on its DNS servers) or 503 (the DNS servers are not reachable) with {"message": …} while the zone's records are not available.