From 0cdc95b31e70169bfaa57778f3de78abd0222458 Mon Sep 17 00:00:00 2001 From: Christian Hofstaedtler Date: Sun, 26 Oct 2014 15:05:57 +0100 Subject: [PATCH] API: Document causes of the 400 Bad Request reply --- pdns/docs/httpapi/api_spec.md | 10 ++++++++++ 1 file changed, 10 insertions(+) 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: / ------ -- 2.47.2