SlideShare ist ein Scribd-Unternehmen logo
1 von 17
REST API
Presented By:
Md. Tofazzal Hossain (163015003)
Md. Belal Hossain (163015023)
12/8/2019
Table of Contents
• What is REST API?
• REpresentational ? State ? Transfer ?
• HTTP Methods
• Architecture of Rest API
• HTTP Request Example
• HTTP REST Request
• HTTP Response Status Code
• Advantage and Disadvantage of Rest API
• Conclusion
• Reference
12/8/2019 2
What is REST?
• Representational state transfer
• It is a certain approach to creating Web Services.
• To understand the REST design pattern, let's look at an
example (learn by example).
12/8/2019 3
What is it ?
12/8/2019 4
REpresentational ? State ? Transfer ?
• It represent the state of database at a time.
• A resource is accessed via a common interface based on the HTTP
standard methods.
• You typically have a REST server which provides access to the resources
and a REST client which accesses and modifies the REST resources.
512/8/2019
REpresentational ? State ? Transfer ? Cont.
• Every resource should support the HTTP common operations. Resources
are identified by global IDs (which are typically URIs or URLs).
• REST allows that resources have different representations, text, XML,
JSON etc.
• Stateless in nature. Excellent for distributed system.
• Stateless components can be freely redeployed if something fails, and
they can scale to accommodate load changes.
• This is because any request can be directed to any instance of a
component.
12/8/2019 6
HTTP Methods
HTTP Method CRUD Operation Description
POST INSERT Address to an existing resource
PUT UPDATE Overrides existing resource
GET SELECT
Fetches a resource. The resource is never
changed via a GET request
DELETE DELETE Deletes a resource
The PUT, GET, POST and DELETE methods are typically used in REST based
architectures. The following table gives an explanation of these
operations:
12/8/2019 7
Architecture of REST API
iPhone WindowsAndroid
Web based appDesktop App
REST API
APACHE
WEB SERVER
My SQL
DATEBASE
HTTP
REQUEST
PLAIN TEXT
RESPONSE
12/8/2019 8
HTTP Request Example:
12/8/2019 9
HTTP Request Example: Cont.
12/8/2019 10
HTTP REST Request:
12/8/2019 11
HTTP Response Status Code:
1xx Informational Codes
2xx Successful Codes
3xx Redirection Codes
4xx Client Error Code
5xx Server Error Codes
12/8/2019 12
Advantage of Rest API
• It is usually simple to build and adapt.
• Low use of resources.
• Process instances are created explicitly.
• With the initial URI, the client does not require routing information.
• Clients can have a generic ‘listener’ interface for notifications.
12/8/2019 13
Disadvantage of Rest API
• Restful web services are stateless
• SOAP requires less plumbing code than REST services design.
• REST allows a greater variety of data formats, whereas SOAP only allows
XML.
• REST provides superior performance, particularly through caching for
information that’s not altered and not dynamic.
• REST does not need much bandwidth when requests are sent to the
server. Where SOAP requires more bandwidth for its usage.
12/8/2019 14
Conclusion
• REST is a type of data transfer that is built upon the
architecture of the HTTP protocol. It allows you to easily
send and retrieve data between two different services using
XML or JSON. ... It's often good practice to plan out
your RESTful collections and resources at the very outset.
12/8/2019 15
References
• https://restfulapi.net/
12/8/2019 16
THANK YOU
12/8/2019 17

Weitere ähnliche Inhalte

Was ist angesagt? (20)

Rest API
Rest APIRest API
Rest API
 
Web api
Web apiWeb api
Web api
 
Introduction to the Web API
Introduction to the Web APIIntroduction to the Web API
Introduction to the Web API
 
RESTful API - Best Practices
RESTful API - Best PracticesRESTful API - Best Practices
RESTful API - Best Practices
 
Restful web services ppt
Restful web services pptRestful web services ppt
Restful web services ppt
 
Introduction to REST - API
Introduction to REST - APIIntroduction to REST - API
Introduction to REST - API
 
ASP.NET Web API
ASP.NET Web APIASP.NET Web API
ASP.NET Web API
 
Introduction to spring boot
Introduction to spring bootIntroduction to spring boot
Introduction to spring boot
 
Introduction to API
Introduction to APIIntroduction to API
Introduction to API
 
What is API - Understanding API Simplified
What is API - Understanding API SimplifiedWhat is API - Understanding API Simplified
What is API - Understanding API Simplified
 
Rest api standards and best practices
Rest api standards and best practicesRest api standards and best practices
Rest api standards and best practices
 
Rest api and-crud-api
Rest api and-crud-apiRest api and-crud-api
Rest api and-crud-api
 
Express JS Rest API Tutorial
Express JS Rest API TutorialExpress JS Rest API Tutorial
Express JS Rest API Tutorial
 
API for Beginners
API for BeginnersAPI for Beginners
API for Beginners
 
HTTP Request and Response Structure
HTTP Request and Response StructureHTTP Request and Response Structure
HTTP Request and Response Structure
 
Rest web services
Rest web servicesRest web services
Rest web services
 
Learn REST in 18 Slides
Learn REST in 18 SlidesLearn REST in 18 Slides
Learn REST in 18 Slides
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot Introduction
 
Web API Basics
Web API BasicsWeb API Basics
Web API Basics
 
Spring MVC Framework
Spring MVC FrameworkSpring MVC Framework
Spring MVC Framework
 

Ähnlich wie REST API

zendframework2 restful
zendframework2 restfulzendframework2 restful
zendframework2 restfultom_li
 
REST and REST-fulness
REST and REST-fulnessREST and REST-fulness
REST and REST-fulnessDavid Waite
 
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)Pete Morano
 
REST - Representational State Transfer
REST - Representational State TransferREST - Representational State Transfer
REST - Representational State TransferPeter R. Egli
 
Fundamental essentials for api design
Fundamental essentials for api designFundamental essentials for api design
Fundamental essentials for api designMichael James Cyrus
 
Fundamental essentials for api design
Fundamental essentials for api designFundamental essentials for api design
Fundamental essentials for api designMichael James Cyrus
 
Fundamental Essentials for API Design
Fundamental Essentials for API DesignFundamental Essentials for API Design
Fundamental Essentials for API DesignMichael James Cyrus
 
Restful web services rule financial
Restful web services   rule financialRestful web services   rule financial
Restful web services rule financialRule_Financial
 
Advanced Web Development in PHP - Understanding REST API
Advanced Web Development in PHP - Understanding REST APIAdvanced Web Development in PHP - Understanding REST API
Advanced Web Development in PHP - Understanding REST APIRasan Samarasinghe
 
REST API Recommendations
REST API RecommendationsREST API Recommendations
REST API RecommendationsJeelani Shaik
 
Restful web-services
Restful web-servicesRestful web-services
Restful web-servicesrporwal
 
IRJET- Rest API for E-Commerce Site
IRJET- Rest API for E-Commerce SiteIRJET- Rest API for E-Commerce Site
IRJET- Rest API for E-Commerce SiteIRJET Journal
 
Rest API Automation with REST Assured
Rest API Automation with REST AssuredRest API Automation with REST Assured
Rest API Automation with REST AssuredTO THE NEW Pvt. Ltd.
 
RESTful applications: The why and how by Maikel Mardjan
RESTful applications: The why and how by Maikel MardjanRESTful applications: The why and how by Maikel Mardjan
RESTful applications: The why and how by Maikel MardjanJexia
 

Ähnlich wie REST API (20)

zendframework2 restful
zendframework2 restfulzendframework2 restful
zendframework2 restful
 
ReSTful API Final
ReSTful API FinalReSTful API Final
ReSTful API Final
 
REST and REST-fulness
REST and REST-fulnessREST and REST-fulness
REST and REST-fulness
 
RESTful APIs
RESTful APIsRESTful APIs
RESTful APIs
 
Unerstanding and Using RESTful APIs
Unerstanding and Using RESTful APIsUnerstanding and Using RESTful APIs
Unerstanding and Using RESTful APIs
 
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
Understanding and Using Rest APIs (SocialDevCamp Chicago 2009)
 
A Look at OData
A Look at ODataA Look at OData
A Look at OData
 
REST - Representational State Transfer
REST - Representational State TransferREST - Representational State Transfer
REST - Representational State Transfer
 
Fundamental essentials for api design
Fundamental essentials for api designFundamental essentials for api design
Fundamental essentials for api design
 
Fundamental essentials for api design
Fundamental essentials for api designFundamental essentials for api design
Fundamental essentials for api design
 
Fundamental Essentials for API Design
Fundamental Essentials for API DesignFundamental Essentials for API Design
Fundamental Essentials for API Design
 
Restful web services rule financial
Restful web services   rule financialRestful web services   rule financial
Restful web services rule financial
 
Advanced Web Development in PHP - Understanding REST API
Advanced Web Development in PHP - Understanding REST APIAdvanced Web Development in PHP - Understanding REST API
Advanced Web Development in PHP - Understanding REST API
 
Restful web services
Restful web servicesRestful web services
Restful web services
 
REST API Recommendations
REST API RecommendationsREST API Recommendations
REST API Recommendations
 
Switch to Backend 2023 | Day 1 Part 1
Switch to Backend 2023 | Day 1 Part 1Switch to Backend 2023 | Day 1 Part 1
Switch to Backend 2023 | Day 1 Part 1
 
Restful web-services
Restful web-servicesRestful web-services
Restful web-services
 
IRJET- Rest API for E-Commerce Site
IRJET- Rest API for E-Commerce SiteIRJET- Rest API for E-Commerce Site
IRJET- Rest API for E-Commerce Site
 
Rest API Automation with REST Assured
Rest API Automation with REST AssuredRest API Automation with REST Assured
Rest API Automation with REST Assured
 
RESTful applications: The why and how by Maikel Mardjan
RESTful applications: The why and how by Maikel MardjanRESTful applications: The why and how by Maikel Mardjan
RESTful applications: The why and how by Maikel Mardjan
 

Kürzlich hochgeladen

Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction managementMariconPadriquez1
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 

Kürzlich hochgeladen (20)

Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction management
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 

REST API

  • 1. REST API Presented By: Md. Tofazzal Hossain (163015003) Md. Belal Hossain (163015023) 12/8/2019
  • 2. Table of Contents • What is REST API? • REpresentational ? State ? Transfer ? • HTTP Methods • Architecture of Rest API • HTTP Request Example • HTTP REST Request • HTTP Response Status Code • Advantage and Disadvantage of Rest API • Conclusion • Reference 12/8/2019 2
  • 3. What is REST? • Representational state transfer • It is a certain approach to creating Web Services. • To understand the REST design pattern, let's look at an example (learn by example). 12/8/2019 3
  • 4. What is it ? 12/8/2019 4
  • 5. REpresentational ? State ? Transfer ? • It represent the state of database at a time. • A resource is accessed via a common interface based on the HTTP standard methods. • You typically have a REST server which provides access to the resources and a REST client which accesses and modifies the REST resources. 512/8/2019
  • 6. REpresentational ? State ? Transfer ? Cont. • Every resource should support the HTTP common operations. Resources are identified by global IDs (which are typically URIs or URLs). • REST allows that resources have different representations, text, XML, JSON etc. • Stateless in nature. Excellent for distributed system. • Stateless components can be freely redeployed if something fails, and they can scale to accommodate load changes. • This is because any request can be directed to any instance of a component. 12/8/2019 6
  • 7. HTTP Methods HTTP Method CRUD Operation Description POST INSERT Address to an existing resource PUT UPDATE Overrides existing resource GET SELECT Fetches a resource. The resource is never changed via a GET request DELETE DELETE Deletes a resource The PUT, GET, POST and DELETE methods are typically used in REST based architectures. The following table gives an explanation of these operations: 12/8/2019 7
  • 8. Architecture of REST API iPhone WindowsAndroid Web based appDesktop App REST API APACHE WEB SERVER My SQL DATEBASE HTTP REQUEST PLAIN TEXT RESPONSE 12/8/2019 8
  • 10. HTTP Request Example: Cont. 12/8/2019 10
  • 12. HTTP Response Status Code: 1xx Informational Codes 2xx Successful Codes 3xx Redirection Codes 4xx Client Error Code 5xx Server Error Codes 12/8/2019 12
  • 13. Advantage of Rest API • It is usually simple to build and adapt. • Low use of resources. • Process instances are created explicitly. • With the initial URI, the client does not require routing information. • Clients can have a generic ‘listener’ interface for notifications. 12/8/2019 13
  • 14. Disadvantage of Rest API • Restful web services are stateless • SOAP requires less plumbing code than REST services design. • REST allows a greater variety of data formats, whereas SOAP only allows XML. • REST provides superior performance, particularly through caching for information that’s not altered and not dynamic. • REST does not need much bandwidth when requests are sent to the server. Where SOAP requires more bandwidth for its usage. 12/8/2019 14
  • 15. Conclusion • REST is a type of data transfer that is built upon the architecture of the HTTP protocol. It allows you to easily send and retrieve data between two different services using XML or JSON. ... It's often good practice to plan out your RESTful collections and resources at the very outset. 12/8/2019 15