Sunday, March 08, 2015

Http Status Codes

Subset of available HTTP Status Codes

Status codeAPI meaning
200All is good; response will include applicable resource information, as well
201Resource created; will include the Location header specifying a URI to the newly created resource
202Same as 200, but used for async; in other words, all is good, but we need to poll the service to find out when completed
301The resource was moved; should include URI to new location
400Bad request; caller should reformat the request
401Unauthorized; should respond with an authentication challenge, to let the caller resubmit with appropriate credentials
402Reserved for future use, but many times used to indicate a failure in a business rule or validation check
403Access denied; user successfully authenticated, but is not allowed to access the requested resource
404Resource not found, or caller not allowed to access the resource, and we don't want to reveal the reason
409Conflict; used as a response to a PUT request when another caller has dirtied the resource
500Server error; something bad happened, and server might include some indication of the underlying problem

No comments:

Post a Comment