[Pdns-users] API issue

qutic development mailinglists at qutic.com
Fri Jun 19 16:23:36 UTC 2020


Hi list,

we are using PowerDNS version 4.2.2 and seeing errors creating subdomains via the api.

The following curl worked for years [1], but after an update to latest pdns version it is returning 500 http errors:

curl -i -s -XPATCH \
  -H 'X-API-Key: $powerdns_api_key' \
  https://$powerdns_host/api/v1/servers/localhost/zones/$domain -d '{
  "rrsets": [
    {
      "name": "$subdomain.$domain.",
      "type": "A",
      "changetype": "REPLACE",
      "ttl": 600,
      "records": [
        {
          "content": "$ip",
          "disabled": false
        }
      ]
    }
  ]
}'

HTTP ISE for "/api/v1/servers/localhost/zones/example.com": Exception: GSQLBackend unable to insert empty non-terminal rr '_domainkey.example.com' in domain_id 2: Could not execute mysql statement: insert into records (type,domain_id,disabled,name,ordername,auth,content,ttl,prio) values (null,?,0,?,?,?,NULL,NULL,NULL): Column 'type' cannot be null

Any ideas what´s wrong?

Best regards
Stefan

[1] https://doc.powerdns.com/md/httpapi/README/


More information about the Pdns-users mailing list