[Pdns-users] How to add master zone through PowerDNS API?

Christian Hofstaedtler christian.hofstaedtler at deduktiva.com
Fri Feb 27 09:57:00 UTC 2015


PowerDNS doesn’t know anything about templates.
What are you talking about?

-- 
Christian Hofstaedtler / Deduktiva GmbH (FN 418592 b, HG Wien)
www.deduktiva.com / +43 1 353 1707



> On 27 Feb 2015, at 11:09, Melvin Mughal <melvin at mughal.nu> wrote:
> 
> That's a shame. It would be great if you could give the template name with the API call and it would automatically create records from that template. That would be a feature request ;)
> 
> 2015-02-26 21:06 GMT+01:00 Christian Hofstaedtler <christian.hofstaedtler at deduktiva.com>:
> 
> > On 26 Feb 2015, at 21:06, Melvin Mughal <melvin at mughal.nu> wrote:
> >
> > I've seen the API example (http://doc.powerdns.com/md/httpapi/README/), but it doesn't show how to create a new zone with an existing zone template. How can I include the zone template in that API call?
> 
> There are no templates, but you can include records with the create call.
> 
> Example:
> 
> curl -X POST --data '{
>   "name": "example.com",
>   "kind": "Native",
>   "masters": [],
>   "nameservers": ["ns1.example.org", "ns2.example.org"],
>   "records": [
>     {
>       "name": "www.example.com",
>       "type": "A",
>       "ttl": 3600,
>       "content": “192.0.2.4",
>       "disabled": false
>     }
>   ]
> }' -v -H 'X-API-Key: changeme' http://127.0.0.1:8081/servers/localhost/zones
> 
> 
>   Christian
> 
> --
> Christian Hofstaedtler / Deduktiva GmbH (FN 418592 b, HG Wien)
> www.deduktiva.com / +43 1 353 1707
> 
> 
> 
> 
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> http://mailman.powerdns.com/mailman/listinfo/pdns-users



More information about the Pdns-users mailing list