rrda

REST API allowing to perform DNS queries over HTTP
Log | Files | Refs | README | LICENSE

commit 840f379a44eef0b6187bebfca1b9c5b8804ab7ae
parent dd3c7c81c498011cac341b6ddd800c88d09ae77d
Author: Frederic Cambus <fcambus@users.sourceforge.net>
Date:   Fri, 11 Apr 2014 18:38:10 +0200

Documentation Update

Diffstat:
MREADME.md | 35+++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -37,6 +37,16 @@ By default, RRDA will bind on localhost, port 8080. Usage of ./rrda: -host="127.0.0.1": Set the server host -port="8080": Set the server port + +## Running RRDA at boot time + +RRDA is bundled with a Debian initscript, see : `debian/rrda` + +Modify the line containing `DAEMON=rrda` and specify the path to your RRDA binary. + +To launch the daemon at startup, run : + + update-rc.d rrda defaults ## Making Queries @@ -88,6 +98,17 @@ When incorrect user input is entered, the server returns an HTTP 400 Error (Bad - Code 402 : Input string is not a well-formed domain name - Code 403 : Input string is not a valid IP address - Code 404 : Invalid DNS query type + +### Examples + + curl http://127.0.0.1:8080/:53/statdns..net/a + {"code":402,"message":"Input string is not a well-formed domain name"} + + curl http://127.0.0.1:8080/:53/x/127.0 + {"code":403,"message":"Input string is not a valid IP address"} + + curl http://127.0.0.1:8080/:53/statdns.net/error + {"code":404,"message":"Invalid DNS query type"} ## Server Errors @@ -97,6 +118,20 @@ When the DNS server cannot be reached or returns an error, the server returns an - Code 502 : The name server encountered an internal failure while processing this request (SERVFAIL) - Code 503 : Some name that ought to exist, does not exist (NXDOMAIN) - Code 505 : The name server refuses to perform the specified operation for policy or security reasons (REFUSED) + +### Examples + + curl http://127.0.0.1:8080/127.0.0.2:53/statdns.net/a + {"code":501,"message":"DNS server could not be reached"} + + curl http://127.0.0.1:8080/:53/lame2.broken-on-purpose.generic-nic.net/soa + {"code":502,"message":"The name server encountered an internal failure while processing this request (SERVFAIL)"} + + curl http://127.0.0.1:8080/:53/statdns.nete/a + {"code":503,"message":"Some name that ought to exist, does not exist (NXDOMAIN)"} + + curl http://127.0.0.1:8080/:53/lame.broken-on-purpose.generic-nic.net/soa + {"code":505,"message":"The name server refuses to perform the specified operation for policy or security reasons (REFUSED)"} ## Sites using RRDA