-
Notifications
You must be signed in to change notification settings - Fork 1
/
apiary.apib
58 lines (37 loc) · 2.57 KB
/
apiary.apib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FORMAT: 1A
HOST: https://nameserver.dns/
# Rest2DNS
API for managing zones on the DNS servers.
## Zones [/zones]
### Add or update DNS zone [POST]
There is the same endpoint for creating or updating zones. You can create or update multiple zones at once if they should have same content.
+ zones (array[string]) - contains list of created/changed zones
+ content (string) - plain text zone content
+ Request (application/json)
{
"zones": [
"somezone.cz",
"otherzonewithsamecontent.cz"
],
"content": "$TTL 600\n@ 600 IN SOA ns.kraxnet.cz. admin.kraxnet.cz. 2018073101 3600 600 3600000 86400\n@ 600 IN A 178.217.244.33\n@ 600 IN MX 10 cust4.xnet.cz.\n@ 600 IN NS ns.kraxnet.cz.\n@ 600 IN NS ns.kraxnet.com.\n@ 600 IN TXT \"keybase-site-verification=Xf5rKKvYLE7XLyzXASVT1d_GHKCPeicW9iRoLm-sR5g\" *\n* 600 IN CNAME easy5.xnet.cz.\nblog 600 IN A 72.32.231.8\nbouncer 600 IN A 178.217.247.148\ncal 600 IN CNAME ghs.google.com.\ndocs 600 IN CNAME ghs.google.com.\ngoogleffffffffa0b6f2c6 600 IN CNAME google.com.\nipv6 600 IN AAAA 2a02:1360::56\nlocalhost 600 IN A 127.0.0.1\nmail 600 IN CNAME ghs.google.com.\nrails 600 IN CNAME ghs.google.com.\nserver 600 IN A 178.217.247.170\nwww 600 IN CNAME kubicek.github.io."
}
+ Response 200 (application/json)
### Remove DNS zones [DELETE]
You can remove multiple zones at once.
+ zones (array[string]) - contains list of removed domains
+ Request (application/json)
{
"zones": [
"somezone.cz",
"otherzone.cz"
]
}
+ Response 200 (application/json)
### Check DNS zonefile [POST /zones/check]
Service for validating zone content.
+ content (string) - plain text zone content
+ Request (application/json)
{
"content": "$TTL = 600\n$ORIGIN = kubicek.cz.\n@ 600 IN SOA ns.kraxnet.cz.admin.kraxnet.cz .2018073101 3600 600 3600000 86400\n@ 600 IN A 178.217 .244 .33\n@ 600 IN MX 10 cust4.xnet.cz.\n@ 600 IN NS ns.kraxnet.cz.\n@ 600 IN NS ns.kraxnet.com.\n@ 600 IN TXT \"keybase-site-verification=Xf5rKKvYLE7XLyzXASVT1d_GHKCPeicW9iRoLm-sR5g\" *\n600 IN CNAME easy5.xnet.cz.\nblog 600 IN A 72.32 .231 .8\nbouncer 600 IN A 178.217 .247 .148\ncal 600 IN CNAME ghs.google.com.\ndocs 600 IN CNAME ghs.google.com.\ngoogleffffffffa0b6f2c6 600 IN CNAME google.com.\nipv6 600 IN AAAA 2 a02: 1360::56\nlocalhost 600 IN A 127.0 .0 .1\nmail 600 IN CNAME ghs.google.com.\nrails 600 IN CNAME ghs.google.com.\nserver 600 IN A 178.217 .247 .170\nwww 600 IN CNAME kubicek.github.io."
}
+ Response 200 (application/json)