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

Melvin Mughal melvin at mughal.nu
Fri Feb 27 12:12:02 UTC 2015


Probably it's a Poweradmin thing. I thought it was a PowerDNS feature. In
Poweradmin, you can create zone templates and when creating a zone, you can
select a template you wish to use for the records to be automatically
created. Very handy feature.


2015-02-27 10:57 GMT+01:00 Christian Hofstaedtler <
christian.hofstaedtler at deduktiva.com>:

> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20150227/ca2f8f9c/attachment-0001.html>


More information about the Pdns-users mailing list