]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
API: Document causes of the 400 Bad Request reply
authorChristian Hofstaedtler <christian@hofstaedtler.name>
Sun, 26 Oct 2014 14:05:57 +0000 (15:05 +0100)
committerChristian Hofstaedtler <christian@hofstaedtler.name>
Sun, 26 Oct 2014 14:29:54 +0000 (15:29 +0100)
pdns/docs/httpapi/api_spec.md

index 9200ef43ca5d3b854e0b33dacdf4b66afd938c7b..1fd56a631647cab60bcdb38fb2239e9cc1e0c031 100644 (file)
@@ -82,6 +82,16 @@ Error responses have a JSON body of this format:
 Where `errors` is optional, and the contents are error-specific.
 
 
+Common Error Causes
+-------------------
+
+##### 400 Bad Request
+
+1. The client body was not a JSON document, or it could not be parsed, or the root element of the JSON document was not a hash.
+2. The client did not send an `Accept:` header, or it was set to `*/*`.
+3. For requests that operate on a zone, the `zone_id` URL part was invalid. To get a valid `zone_id`, list the zones with the `/servers/:server_id/zones` endpoint.
+
+
 URL: /
 ------