What is Restful Api

REST stands for REpresentational State Transfer and is used to access and manipulate data using several stateless operations. These operations are integral to the HTTP protocol and represent an essential CRUD functionality (Create, Read, Update, Delete).

Http method are

GET:- It is used to get the resource.

POST:- It is used to add the resource.

PUT:- It is used to update the resource.

DELETE:- It is used to delete the resource.

PATCH:- It is used to update the small part of the resource.

Note:-In the Restful API, we use JSON date to perform all actions.

users collection JSON data


{
[
{ _id:1, name:"Rom", age:30 },

{ _id:2, name:"Tony", age:31 },

{ _id:3, name:"Peter", age:32 },

{ _id:4, name:"Andrew", age:33 },

{ _id:5, name:"Symonds", age:34 },

{ _id:6, name:"John", age:35 },

{ _id:7, name:"Ponting", age:36 }
]
}