GithubHelp home page GithubHelp logo

pdnsapi's Introduction

PowerDNS API

PowerDNS features a built-in API. For the Authoritative Server, starting with version 3.4, for the Recursor starting with version 3.6.

At the time of writing this, these versions were not released, but preliminary support is available in git.

You can get suitable packages for testing (RPM or DEB) from these links:

Try it

Install PowerDNS Authoritative with one of the gsql backends (i.e. MySQL, PostgreSQL or SQLite3).

Then configure as follows:

experimental-json-interface=yes
webserver=yes
webserver-password=changeme

After restarting pdns_server, the following examples should start working:

# List zones
curl -v http://a:[email protected]:8081/servers/localhost/zones | jq .
# Create new zone "example.org" with nameservers ns1.example.org, ns2.example.org
curl -X POST --data '{"name":"example.org", "kind": "Native", "masters": [], "nameservers": ["ns1.example.org", "ns2.example.org"]}' -v http://a:[email protected]:8081/servers/localhost/zones | jq .
# Show the new zone
curl -v http://a:[email protected]:8081/servers/localhost/zones/example.org | jq .

jq is a highly recommended tool for pretty-printing JSON. If you don't have jq, try json_pp or python -mjson.tool instead.

Try it (Recursor edition)

Install PowerDNS Recursor, configured as follows:

experimental-webserver=yes
experimental-webserver-password=changeme
auth-zones=
forward-zones=
forward-zones-recurse=

After restarting pdns_recursor, the following examples should start working:

curl -v http://a:[email protected]:8082/servers/localhost | jq .
curl -v http://a:[email protected]:8082/servers/localhost/zones | jq .

API Specification

The complete API docs are available in api_specs.md.

Additional help

For additional help, come to the #powerdns IRC channel on irc.oftc.net.

pdnsapi's People

Contributors

tuxis-ie avatar xbgmsharp avatar zeha avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.