Re: [Pdns-users] "HTTP/1.1 422 Unprocessable Entity" when creating a zone

2020-06-30 Thread Tomasz Chmielewski via Pdns-users
I did it exactly as in PowerDNS README: https://doc.powerdns.com/md/httpapi/README/ Does it mean README is buggy? But it also fails without "masters" attribute: # echo '{"name":"example.org.", "kind": "Native", "nameservers": ["ns1.example.org.", "ns2.example.org."]}' | jq { "name": "examp

Re: [Pdns-users] "HTTP/1.1 422 Unprocessable Entity" when creating a zone

2020-06-30 Thread Frank Louwers via Pdns-users
Hi Tomasz, What version are you using? The docs you mention, refer to an old version of PowerDNS Auth... Frank > On 30 Jun 2020, at 15:09, Tomasz Chmielewski via Pdns-users > wrote: > > I did it exactly as in PowerDNS README: > https://doc.powerdns.com/md/httpapi/README/ > > Does it mean R

Re: [Pdns-users] "HTTP/1.1 422 Unprocessable Entity" when creating a zone

2020-06-30 Thread Tomasz Chmielewski via Pdns-users
I'm using pdns 4.2.1. Tomasz On 2020-06-30 22:17, Frank Louwers wrote: Hi Tomasz, What version are you using? The docs you mention, refer to an old version of PowerDNS Auth... Frank On 30 Jun 2020, at 15:09, Tomasz Chmielewski via Pdns-users wrote: I did it exactly as in PowerDNS READM

Re: [Pdns-users] "HTTP/1.1 422 Unprocessable Entity" when creating a zone

2020-06-30 Thread Frank Louwers via Pdns-users
Please find the docs for 4.2.x at https://docs.powerdns.com/authoritative/http-api/index.html#endpoints-and-objects-in-the-api In particular, note that the "masters" string must only be set if the type is Slave. Regards, Frank On 30 Jun 2020, at 15:20, Tomasz Chmielewski wrote: > > I'm usi

Re: [Pdns-users] "HTTP/1.1 422 Unprocessable Entity" when creating a zone

2020-06-30 Thread Tomasz Chmielewski via Pdns-users
Unfortunately I'm not able to find what I'm doing wrong. The error is returned no matter if I have "master=yes" set in pdns.conf or not, and no matter if I use "masters": [] or not. The query I'm sending: # curl --data '{"name":"example.org.", "kind": "Native", "nameservers": ["ns1.example.o

Re: [Pdns-users] "HTTP/1.1 422 Unprocessable Entity" when creating a zone

2020-06-30 Thread Michael Loftis via Pdns-users
On Tue, Jun 30, 2020 at 08:52 Tomasz Chmielewski via Pdns-users < pdns-users@mailman.powerdns.com> wrote: > Unfortunately I'm not able to find what I'm doing wrong. > > The error is returned no matter if I have "master=yes" set in pdns.conf > or not, and no matter if I use "masters": [] or not.

Re: [Pdns-users] "HTTP/1.1 422 Unprocessable Entity" when creating a zone

2020-06-30 Thread Tomasz Chmielewski via Pdns-users
This type? https://docs.powerdns.com/authoritative/http-api/zone.html Objects A Zone object represents an authoritative DNS Zone. A Resource Record Set (below as “RRset”) are all records for a given name and type. type (string) – Set to “Zone” So let's see - nope, still error: # curl --d

[Pdns-users] tips for CNAME Flattening

2020-06-30 Thread Tom Barrett via Pdns-users
I'm looking for tips on how to implement CNAME Flattening in PowerDNS . I believe other DNS providers accomplish this using so-called "ANAME" records. I assume it involves the use of ALIAS records and found this comment in another thread: Starting with the PowerDNS Authoritative Server 4.0.0, DNS

Re: [Pdns-users] "HTTP/1.1 422 Unprocessable Entity" when creating a zone

2020-06-30 Thread Frank Louwers via Pdns-users
That exact same example works in my setup, which uses 4.3.0 with a MySQL backend. Could you provide us your full config, backend & backend schema? Could you also increase logging (see https://docs.powerdns.com/authoritative/settings.html#webserver-loglevel) and send us the log when you're doin

Re: [Pdns-users] "HTTP/1.1 422 Unprocessable Entity" when creating a zone

2020-06-30 Thread Kevin Olbrich via Pdns-users
Did you try to send your request without the last dot? Like example.com instead if example.com. <-- Maybe I'm wrong but I noticed the same when I had to implement a sync between PDNS and our management system. I assumed I had to end all FQDNs by a dot but that's not the case with PDNS (which is pe