[Pdns-users] How to add master zone through PowerDNS API?
bert hubert
bert.hubert at powerdns.com
Thu Feb 26 19:05:32 UTC 2015
On Thu, Feb 26, 2015 at 07:41:04PM +0100, Melvin Mughal wrote:
> I can't find any good reference on how to do this through the PowerDNS API.
> I want to post it a domain from the application via an API call and request
> to make a new master zone file for the domain with the zone template.
Hi Melvin,
Try:
# Create new zone "example.org" with nameservers ns1.example.org,
# ns2.example.org
curl -X POST --data '{"name":"example.org", "kind": "Master", "masters": [],
"nameservers": ["ns1.example.org", "ns2.example.org"]}' -v -H 'X-API-Key:
changeme' http://127.0.0.1:8081/servers/localhost/zones | jq .
This is from: https://doc.powerdns.com/md/httpapi/README/
Can you let us know if this works?
Bert
More information about the Pdns-users
mailing list