From: Christian Hofstaedtler Date: Sun, 26 Oct 2014 14:05:57 +0000 (+0100) Subject: API: Document causes of the 400 Bad Request reply X-Git-Tag: rec-3.7.0-rc1~186^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0cdc95b31e70169bfaa57778f3de78abd0222458;p=thirdparty%2Fpdns.git API: Document causes of the 400 Bad Request reply --- diff --git a/pdns/docs/httpapi/api_spec.md b/pdns/docs/httpapi/api_spec.md index 9200ef43ca..1fd56a6316 100644 --- a/pdns/docs/httpapi/api_spec.md +++ b/pdns/docs/httpapi/api_spec.md @@ -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: / ------