Anda di halaman 1dari 4

Code Name SOAP fault Description

It indicates that the REST API successfully carried out whatever action the
200 OK /Success Server client requested, and that no more specific code in the 2xx series is
appropriate.
A REST API responds with the 201 status code whenever a resource is
created inside a collection. There may also be times when a new resource
is created as a result of some controller action, in which case 201 would
201 Created Server also be an appropriate response.
The newly created resource can be referenced by the URI(s) returned in
the entity of the response, with the most specific URI for the resource
given by a Location header field.

A 202 response is typically used for actions that take a long while to
202 Accepted Server process. It indicates that the request has been accepted for processing, but
the processing has not been completed. The request might or might not be
eventually acted upon, or even maybe disallowed when processing occurs.
The 204 status code is usually sent out in response to a PUT, POST, or
DELETE request when the REST API declines to send back any status
message or representation in the response message’s body.
204 No Content Server
An API may also send 204 in conjunction with a GET request to indicate
that the requested resource exists, but has no state representation to
include in the body.

The HTTP 300 Multiple Choices redirect status response code indicates
300 Multiple Choices Server that the request has more than one possible responses. The user-agent or
the user should choose one of them. As there is no standardized way of
choosing one of the responses, this response code is very rarely used.
If the server has a preferred choice, it should generate a Location header.
The requested page has been permanently moved. The server
automatically redirects the request to the new location.
The 301 status code indicates that the REST API’s resource model has been
Moved
301 Server significantly redesigned and a new permanent URI has been assigned to
permanently
the client’s requested resource. The REST API should specify the new URI
in the response’s Location header and all future requests should be
directed to the given URI.
The server has decided, based on information in the request, that the
304 Not Modified Server requested data has not been modified since the last request and so it does
not need to be sent again.
The requested page has been moved, but this change may not be
Temporary
307 Server permanent. The server automatically redirects the request to the new
Redirect
location.

The HTTP request is incomplete or malformed.


Client.BadR
400 Bad Request 400 is the generic client-side error status, used when no other 4xx error
equest
code is appropriate. Errors can be like malformed request syntax, invalid
request message parameters, or deceptive request routing etc.
Authorization is required to use the service, but a valid user name and
password were not supplied.
Unauthorized / A 401 error response indicates that the client tried to operate on a
Client.Auth
401 Authorization protected resource without providing the proper authorization. It may
orization
Required have provided the wrong credentials or none at all. The response must
include a WWW-Authenticate header field containing a challenge
applicable to the requested resource.
You do not have permission to access the database.
Client.Forbi A 403 error response indicates that the client’s request is formed correctly,
403 Forbidden
dden but the REST API refuses to honor it i.e. the user does not have the
necessary permissions for the resource.

The named database is not running on the server, or the named web
Client.NotF
404 Not Found service does not exist. The 404 error status code indicates that the REST
ound
API can’t map the client’s URI to a resource but may be available in the
future. Subsequent requests by the client are permissible.
The maximum connection idle time was exceeded while receiving the
request. The HyperText Transfer Protocol (HTTP) 408 Request Timeout
response status code means that the server would like to shut down this
unused connection. It is sent on an idle connection by some servers, even
without any previous request by the client.
Server.Requ
408 Request Timeout A server should send the "close" Connection header field in the response,
estTimeout
since 408 implies that the server has decided to close the connection
rather than continue waiting.
This response is used much more since some browsers, like Chrome,
Firefox 27+, and IE9, use HTTP pre-connection mechanisms to speed up
surfing.

The server requires that the client include a Content-Length specification


HTTP Length Client.Lengt in the request. This typically occurs when uploading data to the server. The
411
Required hRequired HyperText Transfer Protocol (HTTP) 411 Length Required client error
response code indicates that the server refuses to accept the request
without a defined Content-Length header.
The request exceeds the maximum permitted size. The HTTP 413 Payload
Too Large response status code indicates that the request entity is larger
413 Entity Too Large Server
than limits defined by server; the server might close the connection or
return a Retry-After header field.
The length of the URI exceeds the maximum allowed length. The HTTP 414
URI Too Long response status code indicates that the URI requested by the
client is longer than the server is willing to interpret.
There are a few rare conditions when this might occur:
414 URI Too Large Server a) when a client has improperly converted a POST request to a GET request
with long query information,
b) when the client has descended into a loop of redirection (for example, a
redirected URI prefix that points to a suffix of itself),
c) when the server is under attack by a client attempting to exploit
potential security holes.
The 415 error response indicates that the API is not able to process the
client’s supplied media type, as indicated by the Content-Type request
header. For example, a client request including data formatted as
Unsupported
415 Server application/xml will receive a 415 response if the API is only willing to
Media Type
process data formatted as application/json.
For example, the client uploads an image as image/svg+xml, but the server
requires that images use a different format.

An internal error occurred. The request could not be processed. 500 is the
generic REST API error response. Most web frameworks automatically
respond with this response status code whenever they execute some
Internal Server request handler code that raises an exception.
500 Server
Error A 500 error is never the client’s fault and therefore it is reasonable for the
client to retry the exact same request that triggered this response, and
hope to get a different response.
API response is the generic error message, given when an unexpected
condition was encountered and no more specific message is suitable.
The HTTP request method is not GET, HEAD, or POST. The server either
Not does not recognize the request method, or it lacks the ability to fulfill the
501 Server
Implemented request. Usually, this implies future availability (e.g., a new feature of a
web-service API).
The document requested resides on a third-party server and the server
received an error from the third-party server. The HyperText Transfer
502 Bad Gateway Server Protocol (HTTP) 502 Bad Gateway server error response code indicates
that the server, while acting as a gateway or proxy, received an invalid
response from the upstream server.

The number of connections exceeds the allowed maximum. The HyperText


Transfer Protocol (HTTP) 503 Service Unavailable server error response
Service code indicates that the server is not ready to handle the request.
503 Server
Unavailable Common causes are a server that is down for maintenance or that is
overloaded. This response should be used for temporary conditions and
the Retry-After HTTP header should, if possible, contain the estimated
time for the recovery of the service.
The HyperText Transfer Protocol (HTTP) 504 Gateway Timeout server error
Gateway response code indicates that the server, while acting as a gateway or
504 Server
Timeout proxy, did not get a response in time from the upstream server that it
needed in order to complete the request.
The HyperText Transfer Protocol (HTTP) 505 HTTP Version Not Supported
HTTP Version
505 Server response status code indicates that the HTTP version used in the request is
Not Supported
not supported by the server.

The HTTP 511 Network Authentication Required response status code


indicates that the client needs to authenticate to gain network access.
Network
This status is not generated by origin servers, but by intercepting proxies
511 Authentication Server
that control access to the network.
Required
Network operators sometimes require some authentication, acceptance of
terms, or other user interaction before granting access (for example in an
internet café or at an airport). They often identify clients who have not
done so using their Media Access Control (MAC) addresses.

Anda mungkin juga menyukai