Sandeep Satyavolu

Jan 3, 20231 min

REST HTTP Status Codes #API

Here is a list of some common HTTP status codes that you may encounter when working with REST APIs:

  • 200 OK: Indicates that the request was successful and the requested information was returned.

  • 201 Created: Indicates that the request was successful and a new resource was created as a result.

  • 204 No Content: Indicates that the request was successful, but no information is being returned (e.g. after a DELETE request).

  • 400 Bad Request: Indicates that the request was invalid or could not be understood by the server.

  • 401 Unauthorized: Indicates that the request requires authentication.

  • 403 Forbidden: Indicates that the server understands the request, but refuses to authorize it.

  • 404 Not Found: Indicates that the requested resource could not be found.

  • 500 Internal Server Error: Indicates that an unexpected condition was encountered by the server, which prevented it from fulfilling the request.

This is just a small sampling of the HTTP status codes that you may encounter when working with REST APIs. There are many other status codes that can be returned, depending on the specific circumstances of the request and the nature of the API.

    560
    0