The Couchbase Server will return one of the following HTTP status codes in response to your REST API request:
Table 8.2. REST API — HTTP Status Codes
| HTTP Status | Description |
|---|---|
| 200 OK | Successful request and an HTTP response body returns. If this creates a new resource with a URI, the 200 status will also have a location header containing the canonical URI for the newly created resource. |
| 201 Created | Request to create a new resource is successful, but no HTTP response body returns. The URI for the newly created resource returns with the status code. |
| 202 Accepted | The request is accepted for processing, but processing is not complete. Per HTTP/1.1, the response, if any, SHOULD include an indication of the request's current status, and either a pointer to a status monitor or some estimate of when the request will be fulfilled. |
| 204 No Content | The server fulfilled the request, but does not need to return a response body. |
| 400 Bad Request | The request could not be processed because it contains missing or invalid information, such as validation error on an input field, a missing required value, and so on. |
| 401 Unauthorized | The credentials provided with this request are missing or invalid. |
| 403 Forbidden | The server recognized the given credentials, but you do not possess proper access to perform this request. |
| 404 Not Found | URI you provided in a request does not exist. |
| 405 Method Not Allowed | The HTTP verb specified in the request (DELETE, GET, HEAD, POST, PUT) is not supported for this URI. |
| 406 Not Acceptable | The resource identified by this request cannot create a response corresponding to one of the media types in the Accept header of the request. |
| 409 Conflict | A create or update request could not be completed, because it would cause a conflict in the current state of the resources supported by the server. For example, an attempt to create a new resource with a unique identifier already assigned to some existing resource. |
| 500 Internal Server Error | The server encountered an unexpected condition which prevented it from fulfilling the request. |
| 501 Not Implemented | The server does not currently support the functionality required to fulfill the request. |
| 503 Service Unavailable | The server is currently unable to handle the request due to temporary overloading or maintenance of the server. |