title: Inserting A records using the PowerDNS REST api
body: <p>I have an issue with the web interface. I'm using powerdns v3.4.5 with mysql as the back-end.
  I have followed instructions from here:
  <a href="https://www.unixmen.com/how-to-install-powerdns-on-ubuntu-14-04/" rel="nofollow noreferrer">https://www.unixmen.com/how-to-install-powerdns-on-ubuntu-14-04/</a></p>
  
  <p>I have successfully installed powerdns with mysql and got the web-api to work.
  However I have trouble inserting A records using the REST api.
  I have followed command from here:
  <a href="https://doc.powerdns.com/md/httpapi/README/" rel="nofollow noreferrer">https://doc.powerdns.com/md/httpapi/README/</a></p>
  
  <p>This creates a new zone:</p>
  
  <pre><code>curl -X POST --data '{"name":"example.org.", "kind": "Native", "masters": [], "nameservers": ["ns1.example.org.", "ns2.example.org."]}' -v -H 'X-API-Key: changeme' http://127.0.0.1:8081/servers/localhost/zones | jq .
  </code></pre>
  
  <p>(note that I changed the url and removed /api/v1/)</p>
  
  <p>However when I run the following command to add a new A record:</p>
  
  <pre><code>curl -X PATCH --data '{"rrsets": [ {"name": "test.example.org.", "type": "A", "ttl": 86400, "changetype": "REPLACE", "records": [ {"content": "192.0.5.4", "disabled": false } ] } ] }' -H 'X-API-Key: changeme' http://127.0.0.1:8081/servers/localhost/zones/example.org. | jq .
  </code></pre>
  
  <p>I get the following error: </p>
  
  <p>"error": "RRset test.example.org. IN A: Name is out of zone"</p>
  
  <p>is there anything that I'm missing?</p>