All RESTful service APIs should return appropriate HTTP Status Codes for every request.
Code | Description |
---|---|
200 | Success! |
201 | Created. A new resource has been created successfully. The response body is either empty or contains a representation revealing the URI of the newly created resource. |
202 | Accepted. The request was valid and accepted but not yet processed. The response body should containe a URI to poll for status updates or a token assigned to this request. This allows for asynchronous REST requests. |
204 | No content. The request was successfull but the server has no response for it. |
301 | Moved permanently |
302 | Moved temporarily. The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client SHOULD continue to use the Request-URI for future requests |
400 | Bad request. Look at the accompanying error messages to see why the request was invalid. |
401 | Unauthorized. Client not authorized to make the request. |
403 | Forbidden. The request is understood, but it has been refused. Look at the accompanying error messages to see why the request was invalid. |
404 | Not Found |
405 | Method Not Allowed. The requested method is not allowed for that resource |
406 | Not Acceptable. Cannot generate representation with given formats, headers or parameters. |
410 | Gone, the resource is no longer available. |
500 | Internal service error. |
503 | Service unavailable. Maybe too many requests. |