> On 26 Feb 2015, at 21:06, Melvin Mughal <[email protected]> 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
[email protected]
http://mailman.powerdns.com/mailman/listinfo/pdns-users

Reply via email to