3.2.8 Common Response Codes

This section summarizes the response codes a data service uses to indicate various conditions. A data service can use alternate or additional response codes. If multiple conditions apply, the HTTP [RFC2616] and AtomPub specification [RFC5023] are consulted to determine the most appropriate response code. Additional information about the following response codes is provided in [RFC2616].

200 (OK): Indicates that a request has been received and processed successfully by a data service and that the response includes a non-empty response body.

202 (Accepted): Indicates that a batch request has been accepted for processing, but that the processing has not been completed.

204 (No Content): Indicates that a request has been received and processed successfully by a data service and that the response does not include a response body.

400 (Bad Request): Indicates that the payload, request headers, or request URI provided in a request are not correctly formatted according to the syntax rules defined in this document.

404 (Not Found): Indicates that a segment in the request URI's Resource Path does not map to an existing resource in the data service. A data service MAY<74> respond with a representation of an empty collection of entities if the request URI addressed a collection of entities.

405 (Method Not Allowed): Indicates that a request used an HTTP method not supported by the resource identified by the request URI, see Request Types (section 2.2.7).

412 (Precondition Failed): Indicates that one or more of the conditions specified in the request headers evaluated to false. This response code is used to indicate an optimistic concurrency check failure, see If-Match (section 2.2.5.5) and If-None-Match (section 2.2.5.6).

500 (Internal Server Error): Indicates that a request being processed by a data service encountered an unexpected error during processing.