From 7d02e691bb5aa15223d3ed75c0131dcfb930e9d3 Mon Sep 17 00:00:00 2001 From: Damian Myerscough Date: Tue, 8 Oct 2013 13:33:42 -0700 Subject: [PATCH 1/4] Currently supported features How to query the RESTful API --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..c37742e --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +BIND-RESTful +============ + +BIND RESTful API + +Show Entire Zone +================ + +```curl http://127.0.0.1:5000/dns/zone/internal.net + +Create DNS Entry +================ + +```curl -i -H "Content-Type: application/json" -X POST http://127.0.0.1:5000/dns/record/create/mynewhost.internal.net/300/A/192.168.0.15 + +Update DNS Entry +================ + +```curl -i -H "Content-Type: application/json" -X POST http://127.0.0.1:5000/dns/record/update/mynewhost.internal.net/300/A/192.168.0.13 From b2d7ee86a8fd13a26ce7f2100ec3d5b7433637ea Mon Sep 17 00:00:00 2001 From: Damian Myerscough Date: Tue, 8 Oct 2013 13:34:35 -0700 Subject: [PATCH 2/4] Update README.md --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c37742e..9407000 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,20 @@ BIND-RESTful ============ -BIND RESTful API +BIND RESTful API to perform dyanmic DNS updates and display the entire zone file. + Show Entire Zone ================ -```curl http://127.0.0.1:5000/dns/zone/internal.net +```bash curl http://127.0.0.1:5000/dns/zone/internal.net Create DNS Entry ================ -```curl -i -H "Content-Type: application/json" -X POST http://127.0.0.1:5000/dns/record/create/mynewhost.internal.net/300/A/192.168.0.15 +```bash curl -i -H "Content-Type: application/json" -X POST http://127.0.0.1:5000/dns/record/create/mynewhost.internal.net/300/A/192.168.0.15 Update DNS Entry ================ -```curl -i -H "Content-Type: application/json" -X POST http://127.0.0.1:5000/dns/record/update/mynewhost.internal.net/300/A/192.168.0.13 +```bash curl -i -H "Content-Type: application/json" -X POST http://127.0.0.1:5000/dns/record/update/mynewhost.internal.net/300/A/192.168.0.13 From 4906b0c40370048688cc821878a364593ddbc660 Mon Sep 17 00:00:00 2001 From: Damian Myerscough Date: Tue, 8 Oct 2013 13:35:19 -0700 Subject: [PATCH 3/4] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9407000..fa039d1 100644 --- a/README.md +++ b/README.md @@ -7,14 +7,14 @@ BIND RESTful API to perform dyanmic DNS updates and display the entire zone file Show Entire Zone ================ -```bash curl http://127.0.0.1:5000/dns/zone/internal.net +` curl http://127.0.0.1:5000/dns/zone/internal.net Create DNS Entry ================ -```bash curl -i -H "Content-Type: application/json" -X POST http://127.0.0.1:5000/dns/record/create/mynewhost.internal.net/300/A/192.168.0.15 +` curl -i -H "Content-Type: application/json" -X POST http://127.0.0.1:5000/dns/record/create/mynewhost.internal.net/300/A/192.168.0.15 Update DNS Entry ================ -```bash curl -i -H "Content-Type: application/json" -X POST http://127.0.0.1:5000/dns/record/update/mynewhost.internal.net/300/A/192.168.0.13 +` curl -i -H "Content-Type: application/json" -X POST http://127.0.0.1:5000/dns/record/update/mynewhost.internal.net/300/A/192.168.0.13 From 1390f41094f7f075f33dc6e3d428cf0433c36bb5 Mon Sep 17 00:00:00 2001 From: Damian Myerscough Date: Tue, 8 Oct 2013 13:41:35 -0700 Subject: [PATCH 4/4] Update README.md --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fa039d1..b41f6aa 100644 --- a/README.md +++ b/README.md @@ -7,14 +7,20 @@ BIND RESTful API to perform dyanmic DNS updates and display the entire zone file Show Entire Zone ================ -` curl http://127.0.0.1:5000/dns/zone/internal.net +The simple GET reuqest will cause a zone transfer to occur and will provide JSON output for an entire zone file + +`curl http://127.0.0.1:5000/dns/zone/internal.net` Create DNS Entry ================ -` curl -i -H "Content-Type: application/json" -X POST http://127.0.0.1:5000/dns/record/create/mynewhost.internal.net/300/A/192.168.0.15 +The simple POST request will create a domain called 'mynewhost.internal.net' with the IP address of 192.168.0.15 + +`curl -i -H "Content-Type: application/json" -X POST http://127.0.0.1:5000/dns/record/create/mynewhost.internal.net/300/A/192.168.0.15` Update DNS Entry ================ -` curl -i -H "Content-Type: application/json" -X POST http://127.0.0.1:5000/dns/record/update/mynewhost.internal.net/300/A/192.168.0.13 +The simple PUT request updates the 'mynewhost.internal.net' to 192.168.0.13 + +`curl -i -H "Content-Type: application/json" -X PUT http://127.0.0.1:5000/dns/record/update/mynewhost.internal.net/300/A/192.168.0.13`