[Pdns-users] API issue

qutic development mailinglists at qutic.com
Mon Jun 22 11:12:15 UTC 2020


Hi Aki,

>> 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
> 
> Did you remember to update the schema as well?

Yes, I executed the documented schema changes.

- Stefan


More information about the Pdns-users mailing list