<div dir="ltr">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 ;)<div class="gmail_extra"><br><div class="gmail_quote">2015-02-26 21:06 GMT+01:00 Christian Hofstaedtler <span dir="ltr"><<a href="mailto:christian.hofstaedtler@deduktiva.com" target="_blank">christian.hofstaedtler@deduktiva.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
> On 26 Feb 2015, at 21:06, Melvin Mughal <<a href="mailto:melvin@mughal.nu" target="_blank">melvin@mughal.nu</a>> wrote:<br>
><br>
> I've seen the API example (<a href="http://doc.powerdns.com/md/httpapi/README/" target="_blank">http://doc.powerdns.com/md/httpapi/README/</a>), 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?<br>
<br>
</span>There are no templates, but you can include records with the create call.<br>
<br>
Example:<br>
<br>
curl -X POST --data '{<br>
"name": "<a href="http://example.com" target="_blank">example.com</a>",<br>
"kind": "Native",<br>
"masters": [],<br>
"nameservers": ["<a href="http://ns1.example.org" target="_blank">ns1.example.org</a>", "<a href="http://ns2.example.org" target="_blank">ns2.example.org</a>"],<br>
"records": [<br>
{<br>
"name": "<a href="http://www.example.com" target="_blank">www.example.com</a>",<br>
"type": "A",<br>
"ttl": 3600,<br>
"content": “192.0.2.4",<br>
"disabled": false<br>
}<br>
]<br>
<div><div>}' -v -H 'X-API-Key: changeme' <a href="http://127.0.0.1:8081/servers/localhost/zones" target="_blank">http://127.0.0.1:8081/servers/localhost/zones</a><br>
<br>
<br>
</div></div><span><font color="#888888"> Christian<br>
<br>
--<br>
Christian Hofstaedtler / Deduktiva GmbH (FN 418592 b, HG Wien)<br>
<a href="http://www.deduktiva.com" target="_blank">www.deduktiva.com</a> / +43 1 353 1707<br>
<br>
<br>
<br>
</font></span></blockquote></div><br></div></div>