> Hi there, > > I am trying to create a new zone using the REST API, and I am getting a > very generic error message saying *{ "error": "Creating domain > 'testdomain.com <http://testdomain.com>.' failed" }* > > Can someone please advise if the following JSON is valid or not? > > POST to http://<pdns server ip>/api/v1/servers/localhost/zones > > { > "id": "testdomain.com.", > "name": "testdomain.com.", > "type": "Zone", > "url": "/servers/localhost/zones/testdomain.com", > "kind": "Native", > "rrsets": [ > { > "name": "www.testdomain.com.", > "type": "A", > "ttl": 0, > "changetype": "REPLACE", > "records": [ > { > "content": "10.11.12.13", > "disabled": false, > "set-ptr": false > } > ] > } > ], > "serial": 1, > "notified_serial": 0, > "masters": [], > "nameservers": [ > "ns1.provider.com.", > "ns2.provider.com." > ] > } > > System details: > > - CentOS 7 with pdns-4.1.3-1pdns.el7.x86_64 > - Bind backend > > Appreciate any help. > > Regards, > Chris.
You should provide SOA record when creating a domain. Also, bind backend is not supported by the API, so you'll have to use some SQL based backend instead. Aki _______________________________________________ Pdns-users mailing list Pdns-users@mailman.powerdns.com https://mailman.powerdns.com/mailman/listinfo/pdns-users