DEV Community

Cover image for Basics of  RESTful API

Posted on

Basics of RESTful API

πŸŽ‡A REST API (also known as RESTful API) is an application programming interface (API or web API) that conforms to the constraints of REST architectural style and allows for interaction with RESTful web services.
πŸŽ‡REST stands for representational state transfer and was created by computer scientist Roy Fielding

Restful Api
1-- Make a simple server of node Js and expressπŸ•Ά.

2-- Make Connection to the MongoDB(It's an example of Offline Mongo Db Database)πŸŽ†
3-- Actions in API πŸ”¨

The action should be indicated by the HTTP request method that we’re making. The most common methods include GET, POST, PUT, and DELETE.

  • GET retrieves resources.
  • POST submits new data to the server.
  • PUT updates existing data.
  • DELETE removes data.

For Example - image

4-- Examples Of GET , POST , PUT , PUT , DELETE

Main HTTP Methods.

5-- Example Of URL

Discussion (0)