Know about Rest API’s in Software Engineering

What is a resource?

Resources are the basic building block of a RESTful service. Examples of a resource from an online book store application include a book, an order from a store, and a collection of users. Resources are addressable by URLs and HTTP methods can perform operations on resources.

  1. Create: POST
  2. Read: GET
  3. Update: PUT, PATCH
  4. Delete: DELETE

Status Codes in REST API:

Whenever he hit one of the above methods, then the server sends state of the requested resource. This state is generally sent as the status of that resource.

  • 1xx: Informational — Communicates transfer protocol-level information.
  • 2xx: Success — Indicates that the client’s request was accepted successfully.
  • 3xx: Redirection — Indicates that the client must take some additional action in order to complete their request.
  • 4xx: Client Error — This category points the finger at clients. Either the request contains bad syntax or cannot be fulfilled
  • 5xx: Server Error — The server takes responsibility for these error status codes. The server failed to fulfil an apparently valid request.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store