HTTP API - Introduction - PowerDNS http://doc.powerdns.
com/md/httpapi/README/
experimental-json-interface=yes
experimental-api-key=changeme
webserver=yes
pdns_server
1 -> 2 07.01.2015 10:30
HTTP API - Introduction - PowerDNS http://doc.powerdns.com/md/httpapi/README/
# List zones
curl -H 'X-API-Key: changeme' http://127.0.0.1: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": [], "nameserv
ers": ["ns1.example.org", "ns2.example.org"]}' -v -H 'X-API-Key: changeme' http://127.
0.0.1:8081/servers/localhost/zones | jq .
# Show the new zone
curl -H 'X-API-Key: changeme' http://127.0.0.1:8081/servers/localhost/zones/example.or
g | jq .
# Add a new record to the new zone (would replace any existing test.example.org/A reco
rds)
curl -X PATCH --data '{"rrsets": [ {"name": "test.example.org", "type": "A", "changety
pe": "REPLACE", "records": [ {"content": "1.1.1.1", "disabled": false, "name": "test.e
xample.org", "ttl": 86400, "type": "A", "priority": 0 } ] } ] }' -H 'X-API-Key: change
me' http://127.0.0.1:8081/servers/localhost/zones/example.org | jq .
jq jq json_pp
python -mjson.tool
experimental-webserver=yes
experimental-api-key=changeme
auth-zones=
forward-zones=
forward-zones-recurse=
pdns_recursor
curl -v -H 'X-API-Key: changeme' http://127.0.0.1:8082/servers/localhost | jq .
curl -v -H 'X-API-Key: changeme' http://127.0.0.1:8082/servers/localhost/zones | jq .
api_specs.md
#powerdns irc.oftc.net
2 -> 2 07.01.2015 10:30