Project

General

Profile

Draft 20 version of DNS API » History » Version 20

Brian Gupta, 05/20/2011 01:34 PM
Added link to DNS Made Easy's API

1 1 Brian Gupta
h1. Draft 20 version of DNS API, with working notes
2
3 5 Brian Gupta
h2. Current API
4
5 4 Ohad Levy
|_.DNS |
6 1 Brian Gupta
|/dns|POST|Create a new DNS record|@{"fqdn":string(name/ip), "value":string(ip/reverse), "type":string(A/PTR)}@|
7
|/dns/value|DELETE|remove value(ip or reverse) DNS record||
8
9 2 Brian Gupta
h2. Record types
10 1 Brian Gupta
11 2 Brian Gupta
h3. Should be implemented in next version of DNS API
12 3 Brian Gupta
13 12 Brian Gupta
|_.Path|_.REST Type|_.Description|_.Example Input JSON|_.Notes|
14 17 Brian Gupta
|/dns|GET|List of DNS zones managed by the proxy|||
15
|/dns/zone|GET|List all zone records|||
16 18 Brian Gupta
|/dns/zone/A|GET/PUT/POST/DELETE|A Record - Name to IPv4 address|@{"fqdn":string(name), "value":string(ip), "type":string(A)}@|Supports multiple records|
17
|/dns/zone/PTR|GET/PUT/POST/DELETE|PTR - Reverse record, IP address to Name|@{"fqdn":string(ip/ipv6), "value":string(name), "type":string(PTR)}@|Does not support multiple records|
18
|/dns/zone/CNAME|GET/PUT/POST/DELETE|CNAME - DNS Alias|@{"fqdn":string(name), "value":string(name), "type":string(CNAME)}@|Bind 9 doesn't support roundrobin cnames, so we should at first limit CNAMEs to a single record|
19
|/dns/zone/AAAA|GET/PUT/POST/DELETE|IPv6 A Record - Name to IPv6 address|@{"fqdn":string(ipv6), "value":string(name), "type":string(AAAA)}@|IPv6 address, supports multiple records|
20
|/dns/zone/TXT|GET/PUT/POST/DELETE|TXT - Text string|@{"fqdn":string(name), "value":string("arbitrary text string"), "type":string(TXT)}@|supports multiple records|
21
|/dns/zone/SPF|GET/PUT/POST/DELETE|SPF - Sender Policy Framework records|@{"fqdn":string(name), "value":string("v=spf1 a:mail.example.com -all"), "type":string(SPF)}@|supports multiple records|
22
|/dns/zone/MX|GET/PUT/POST/DELETE|MX - Mail Exchanger records|@{"fqdn":string(name), "value":integer(preference), "value":string(ip/name), "type":string(MX)}@|Needs an extra preference number field, supports multiple records|
23 1 Brian Gupta
24 2 Brian Gupta
h3. Deferred:
25 3 Brian Gupta
26 1 Brian Gupta
/dns/zone/SOA (Can not be dynamically deleted, and needs extra code to handle)
27
/dns/zone/NS (Needs manual serial number increment
28 13 Brian Gupta
/dns/zone/SRV (Needs more research.. Looks easy enough http://en.wikipedia.org/wiki/SRV_record, but isn't a priority yet) 
29 16 Brian Gupta
/dns/zone/ZONE (Currently smartproxy uses nsupdate to make changes so zone creation and deletion is not supported on the backend.)
30 1 Brian Gupta
31 11 Brian Gupta
h2. Methods
32
33 18 Brian Gupta
GET - Lists resource records or gets the details of an individual record(s)
34
PUT - Replaces a record or collection
35
POST - Creates a new record or records
36
DELETE - Deletes a record or records
37 1 Brian Gupta
38
h2. Ohad notes
39 17 Brian Gupta
40 1 Brian Gupta
GET /dns/zone/record_type list of all dns records with a given type, for
41
example all CNAME would be /dns/1.2.3.4/CNAME
42
GET /dns/zone/record -> details of the specific record.
43
44
POST /dns/zone -> creates a new record
45
DELETE /dns/zone/record -> deletes a record
46
47 8 Brian Gupta
h2. Brian notes
48 3 Brian Gupta
49 1 Brian Gupta
Dynamic DNS RFC http://tools.ietf.org/html/rfc2136
50
Howto: http://caunter.ca/nsupdate.txt
51
52
SOA: https://lists.isc.org/pipermail/bind-users/2003-November/047015.html
53
MX: http://forums.devshed.com/dns-36/using-nsupdate-to-add-an-mx-record-326788.html
54
NS: http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1304925290721+28353475&threadId=702920
55 6 Brian Gupta
56 8 Brian Gupta
h2. Other APIs to investigate
57 6 Brian Gupta
58 20 Brian Gupta
http://www.dnsmadeeasy.com/enterprisedns/api.html
59 6 Brian Gupta
http://dyn.com/developer
60 1 Brian Gupta
http://docs.amazonwebservices.com/Route53/latest/APIReference/
61
http://ns.zerigo.com/
62 8 Brian Gupta
63
h2. DNS backends
64
65
NSUPDATE/BIND
66 19 Brian Gupta
PowerDNS
67 8 Brian Gupta
Amazon/Route53
68
Dynect/DynDNS
69
DNSMadeEasy
70
UltraDNS
71 9 Brian Gupta
ActiveDirectory/Microsoft DNS
72 14 Paul Kelly
73
h3. Additional features
74 15 Brian Gupta
75 14 Paul Kelly
An API to retrieve the proxy's settings might be useful for consistency checks and diagnostic reasons.
76
Should foreman also be provided with the ability to push settings out into the proxies, though this might prove to be a security issue?