Web services that use REST architecture are called RESTful
services.
▪ RESTful systems communicates over HTTP protocol with HTTP
methods used by Web Browsers to transfer pages.
▪ Richardson Maturity Model
Leonard Richardson proposed the Richardson Maturity Model for
web APIs:
▪ Level 0: Define one URI, and all operations are POST requests to
this URI.
▪ Level 1: Create separate URIs for individual resources.
▪ Level 2: Use HTTP methods to define operations on resources.
▪ Level 3: Use hypermedia
xxxxxxxxxx
1) REQUEST
2) RESPONSE
When we send request, we need to know the API
methods/endpoints that are available:
- read documentation about API methods.
- Swagger tool, that has API methods and descriptions
simple endpoint:
…school.com/api/students
Types of Requests:
GET -> Read data
POST -> Create/insert data
PUT -> Update data
DELETE-> Delete data
I send GET, POST, PUT, DELETE type of API requests to
API endpoint/method and get response.
ORDS (oracle data service) API -> HR Database
ORDS API has methods that we can send request to, and it sends
response with Data from HR database.
xxxxxxxxxx
Rest API:
Why we use Rest Api?
Front-End Technoligies can not directly connect with database so we use rest api to connect them.
We make rest apis and can use it with any front-end technology like angular, vuejs and also can use with
android applications.
In MVC we use frontend direct in backend so no need of rest apis.
An API basically work as third party that interacts two systems/languages.
Representational State Transfer (REST) is a architectural style in which we request and get response from server
in json, xml formats.We use JSon format most.
REST API uses HTTP methods for communication between both client and server side and most of us are familiar
with the HTTP verbs such as GET, POST, PUT or DELETE.
xxxxxxxxxx
Representational state transfer is a software architectural style that defines
a set of constraints to be used for creating Web services.
Web services that conform to the REST architectural style, called RESTful Web
services, provide interoperability between computer systems on the internet
REST (Representational State Transfer) is an architectural style for designing networked applications. It defines a set of principles and constraints that enable the development of scalable and efficient web services. A REST API (Application Programming Interface) is an implementation of a web service that adheres to the principles of REST.
RESTful APIs are widely used for building web services and are commonly used in client-server communication over HTTP. They are platform-independent, language-agnostic, and can be consumed by various clients, including web browsers, mobile apps, or other servers.