Hello.


I'm writing code to interface with the HTTP JSON REST API of a PowerDNS 3.4.1 
authoritative server with a MySQL backend.



I'm submitting a request to modify the records on a zone using a PATCH method 
as specified at 
https://doc.powerdns.com/md/httpapi/api_spec/#url-serversserver95idzoneszone95id,
 and I'm getting back a "405 Method Not Allowed" response. I am able to 
successfully GET the pre-created example.com zone and POST (create) or DELETE 
my own test zone. It's only PATCH that's not working.



I tried increasing the server log level to 9 (the maximum), and I see my 
request in the log, but it only shows the request size and the fact that it 
caused a 405 error, which I already know.



It doesn't seem to matter what content the PATCH request actually contains, 
what zone I use, or even if the zone exists at all. It seems to just be the 
PATCH method itself causing the problem. This makes me think that it is a 
simple configuration problem on the server. Maybe the internal HTTP server 
component is rejecting PATCH requests by default?



Anyways, here is the request. This is attempting to delete all TXT records on 
example.com:



10.9.9.64:8081 /servers/localhost/zones/example.com PATCH 
{"rrsets":[{"name":"example.com","type":"TXT","changetype":"DELETE","records":[],"comments":[]}]}



Response: 405 Method Not Allowed



Thanks in advance.



_______________________________________________
Pdns-users mailing list
[email protected]
http://mailman.powerdns.com/mailman/listinfo/pdns-users

Reply via email to