SlideShare a Scribd company logo
It is time for REST
Oleksandr Stefanovskyi
1
❏ History
❏ Resource-based
❏ Representations
❏ Six architecture constraints:
❏ Uniform interface
❏ Stateless
❏ Client-server
❏ Cacheable
❏ Layered system
❏ Code on demand
Overview
2
❏ Why Chaos came
❏ What is SOAP
❏ Why REST
At first Chaos came to be
3
Advantages:
❏ Suitable for use with any transport protocol
❏ Has available to it all the facilities of XML
Disadvantages:
❏ The verbosity of the protocol
❏ Slow parsing speed of XML
❏ Lack of a standardized interaction model
SOAP
4
❏ Performance
❏ Scalability
❏ Simplicity of a uniform Interface
❏ Modifiability of components
❏ Visibility of communication
❏ Reliability
REST - REpresentational State Transfer
5
❏ Things vs actions
❏ Nouns vs verbs
❏ Identified by URIs
❏ Separate from their representations
Resource Based
6
❏ How resources get manipulated
❏ Part of the resource state
❏ Typically JSON or XML
Representation
7
Resource: lector (Oleksandr)
Service: contact information(GET)
Representation example
Representation:
name, address, twitter
JSON or XML format
8
To create new customer
POST http://www.example.com/customers
To read a customer with Customer ID# 33245
GET http://www.example.com/customers/33245
Resource Naming Examples
9
POST http://www.example.com/orders
POST http://www.example.com/customers/33245/orders
GET http://www.example.com/customers/33245/orders
GET http://www.example.com/orders/8769
Resource Naming Examples
10
❏ Use identifiers in your URLs
❏ Leverage the hierarchical nature of the URL
❏ Design for your clients, not for your data
❏ Resource names should be nouns
❏ Use plurals in URL segments
❏ Avoid using collection verbiage in URLs
❏ Use lower-case in URL segments
❏ Keep URLs as short as possible
Resource Naming
11
Update customer with ID 12345
❏ GET api.example.com/services
?op=update_customer&id=12345&format=json
❏ GET http://api.example.com/update_customer/12345
❏ GET http://api.example.com/customers/12345/update
❏ PUT http://api.example.com/customers/12345/update
Resource Naming Anti-Patterns
12
❏ Uniform Interface
❏ Stateless
❏ Cacheable
❏ Client-Server
❏ Layered System
❏ Code on Demand (optional)
Six constraints
13
❏ Resource-Based
❏ Manipulation of Resources Through
Representations
❏ Self-descriptive Messages
Uniform Interface
14
❏ State contained within the request itself
❏ Communicated back to the client via
❏ Headers
❏ Status
❏ Response body
Stateless
15
❏ The methods GET and HEAD are
cacheable.
❏ The following status code are
cacheable: 200, 203, 204, 206,
300, 301, 404, 405, 410, 414, and
501.
❏ There is no specific headers in the
response, like Cache-Control, that
prevents caching.
Cacheable
16
❏ GET — retrieve a specific resource (by id) or a
collection of resources
❏ POST — create a new resource
❏ PUT — replace a specific resource (by id)
❏ PATCH — update or modify the resource (by id)
❏ DELETE — remove a specific resource (by id)
HTTP Methods for RESTful Services
17
❏ GET — return 200 (OK)
❏ POST — return 201 (CREATED)
❏ PUT — return 200 (OK)
❏ DELETE — return 204 (NO CONTENT)
HTTP Response Codes to Indicate Status
18
200 (OK)
201 (CREATED)
204 (NO CONTENT)
400 (BAD REQUEST)
403 (FORBIDDEN)
404 (NOT FOUND)
500 (INTERNAL SERVER ERROR)
Most common response codes
19
❏ Resource based
❏ Representation
❏ Uniform interface
❏ Cacheable
❏ Client-Server Architecture
❏ HTTP methods as verbs
So what is REST is?
20
blog.interlink-ua.com
friends@interlink-ua.com
facebook.com/interlinkua
Ask me if you dare
21

More Related Content

Similar to It is time for REST

How Orange Financial combat financial frauds over 50M transactions a day usin...
How Orange Financial combat financial frauds over 50M transactions a day usin...How Orange Financial combat financial frauds over 50M transactions a day usin...
How Orange Financial combat financial frauds over 50M transactions a day usin...
StreamNative
 
How Orange Financial combat financial frauds over 50M transactions a day usin...
How Orange Financial combat financial frauds over 50M transactions a day usin...How Orange Financial combat financial frauds over 50M transactions a day usin...
How Orange Financial combat financial frauds over 50M transactions a day usin...
JinfengHuang3
 
Woa. Reloaded
Woa. ReloadedWoa. Reloaded
Woa. Reloaded
Emiliano Pecis
 
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
Ivanti
 
Unify Storage Backend for Batch and Streaming Computation with Apache Pulsar_...
Unify Storage Backend for Batch and Streaming Computation with Apache Pulsar_...Unify Storage Backend for Batch and Streaming Computation with Apache Pulsar_...
Unify Storage Backend for Batch and Streaming Computation with Apache Pulsar_...
StreamNative
 
SOAP vs REST
SOAP vs RESTSOAP vs REST
SOAP vs REST
Nadia Boumaza
 
CouchDB : More Couch
CouchDB : More CouchCouchDB : More Couch
CouchDB : More Couch
delagoya
 
Intro to Hypermedia APIs
Intro to Hypermedia APIsIntro to Hypermedia APIs
Intro to Hypermedia APIs
SmartLogic
 
Intro to databricks delta lake
 Intro to databricks delta lake Intro to databricks delta lake
Intro to databricks delta lake
Mykola Zerniuk
 
Amazon builder Library notes
Amazon builder Library notesAmazon builder Library notes
Amazon builder Library notes
Diego Pacheco
 
ORDS - Oracle REST Data Services
ORDS - Oracle REST Data ServicesORDS - Oracle REST Data Services
ORDS - Oracle REST Data Services
Justin Michael Raj
 
6 Months Dotnet internship in Noida
6 Months Dotnet internship in Noida6 Months Dotnet internship in Noida
6 Months Dotnet internship in Noida
Tech Mentro
 
TWJUG August, MySQL JDBC Driver "Connector/J"
TWJUG August, MySQL JDBC Driver "Connector/J"TWJUG August, MySQL JDBC Driver "Connector/J"
TWJUG August, MySQL JDBC Driver "Connector/J"
Ryusuke Kajiyama
 
Web services tutorial
Web services tutorialWeb services tutorial
Web services tutorial
Lorna Mitchell
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuse
ejlp12
 
A RESTful introduction
A RESTful introductionA RESTful introduction
A RESTful introduction
Daniel Toader
 
ARM CoAP Tutorial
ARM CoAP TutorialARM CoAP Tutorial
ARM CoAP Tutorial
zdshelby
 
Web Services Tutorial
Web Services TutorialWeb Services Tutorial
Web Services Tutorial
Lorna Mitchell
 
The never-ending REST API design debate
The never-ending REST API design debateThe never-ending REST API design debate
The never-ending REST API design debate
Restlet
 
Chill, Distill, No Overkill: Best Practices to Stress Test Kafka with Siva Ku...
Chill, Distill, No Overkill: Best Practices to Stress Test Kafka with Siva Ku...Chill, Distill, No Overkill: Best Practices to Stress Test Kafka with Siva Ku...
Chill, Distill, No Overkill: Best Practices to Stress Test Kafka with Siva Ku...
HostedbyConfluent
 

Similar to It is time for REST (20)

How Orange Financial combat financial frauds over 50M transactions a day usin...
How Orange Financial combat financial frauds over 50M transactions a day usin...How Orange Financial combat financial frauds over 50M transactions a day usin...
How Orange Financial combat financial frauds over 50M transactions a day usin...
 
How Orange Financial combat financial frauds over 50M transactions a day usin...
How Orange Financial combat financial frauds over 50M transactions a day usin...How Orange Financial combat financial frauds over 50M transactions a day usin...
How Orange Financial combat financial frauds over 50M transactions a day usin...
 
Woa. Reloaded
Woa. ReloadedWoa. Reloaded
Woa. Reloaded
 
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
UEMB200: Next Generation of Endpoint Management Architecture and Discovery Se...
 
Unify Storage Backend for Batch and Streaming Computation with Apache Pulsar_...
Unify Storage Backend for Batch and Streaming Computation with Apache Pulsar_...Unify Storage Backend for Batch and Streaming Computation with Apache Pulsar_...
Unify Storage Backend for Batch and Streaming Computation with Apache Pulsar_...
 
SOAP vs REST
SOAP vs RESTSOAP vs REST
SOAP vs REST
 
CouchDB : More Couch
CouchDB : More CouchCouchDB : More Couch
CouchDB : More Couch
 
Intro to Hypermedia APIs
Intro to Hypermedia APIsIntro to Hypermedia APIs
Intro to Hypermedia APIs
 
Intro to databricks delta lake
 Intro to databricks delta lake Intro to databricks delta lake
Intro to databricks delta lake
 
Amazon builder Library notes
Amazon builder Library notesAmazon builder Library notes
Amazon builder Library notes
 
ORDS - Oracle REST Data Services
ORDS - Oracle REST Data ServicesORDS - Oracle REST Data Services
ORDS - Oracle REST Data Services
 
6 Months Dotnet internship in Noida
6 Months Dotnet internship in Noida6 Months Dotnet internship in Noida
6 Months Dotnet internship in Noida
 
TWJUG August, MySQL JDBC Driver "Connector/J"
TWJUG August, MySQL JDBC Driver "Connector/J"TWJUG August, MySQL JDBC Driver "Connector/J"
TWJUG August, MySQL JDBC Driver "Connector/J"
 
Web services tutorial
Web services tutorialWeb services tutorial
Web services tutorial
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuse
 
A RESTful introduction
A RESTful introductionA RESTful introduction
A RESTful introduction
 
ARM CoAP Tutorial
ARM CoAP TutorialARM CoAP Tutorial
ARM CoAP Tutorial
 
Web Services Tutorial
Web Services TutorialWeb Services Tutorial
Web Services Tutorial
 
The never-ending REST API design debate
The never-ending REST API design debateThe never-ending REST API design debate
The never-ending REST API design debate
 
Chill, Distill, No Overkill: Best Practices to Stress Test Kafka with Siva Ku...
Chill, Distill, No Overkill: Best Practices to Stress Test Kafka with Siva Ku...Chill, Distill, No Overkill: Best Practices to Stress Test Kafka with Siva Ku...
Chill, Distill, No Overkill: Best Practices to Stress Test Kafka with Siva Ku...
 

Recently uploaded

TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 

Recently uploaded (20)

TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 

It is time for REST

  • 1. It is time for REST Oleksandr Stefanovskyi 1
  • 2. ❏ History ❏ Resource-based ❏ Representations ❏ Six architecture constraints: ❏ Uniform interface ❏ Stateless ❏ Client-server ❏ Cacheable ❏ Layered system ❏ Code on demand Overview 2
  • 3. ❏ Why Chaos came ❏ What is SOAP ❏ Why REST At first Chaos came to be 3
  • 4. Advantages: ❏ Suitable for use with any transport protocol ❏ Has available to it all the facilities of XML Disadvantages: ❏ The verbosity of the protocol ❏ Slow parsing speed of XML ❏ Lack of a standardized interaction model SOAP 4
  • 5. ❏ Performance ❏ Scalability ❏ Simplicity of a uniform Interface ❏ Modifiability of components ❏ Visibility of communication ❏ Reliability REST - REpresentational State Transfer 5
  • 6. ❏ Things vs actions ❏ Nouns vs verbs ❏ Identified by URIs ❏ Separate from their representations Resource Based 6
  • 7. ❏ How resources get manipulated ❏ Part of the resource state ❏ Typically JSON or XML Representation 7
  • 8. Resource: lector (Oleksandr) Service: contact information(GET) Representation example Representation: name, address, twitter JSON or XML format 8
  • 9. To create new customer POST http://www.example.com/customers To read a customer with Customer ID# 33245 GET http://www.example.com/customers/33245 Resource Naming Examples 9
  • 10. POST http://www.example.com/orders POST http://www.example.com/customers/33245/orders GET http://www.example.com/customers/33245/orders GET http://www.example.com/orders/8769 Resource Naming Examples 10
  • 11. ❏ Use identifiers in your URLs ❏ Leverage the hierarchical nature of the URL ❏ Design for your clients, not for your data ❏ Resource names should be nouns ❏ Use plurals in URL segments ❏ Avoid using collection verbiage in URLs ❏ Use lower-case in URL segments ❏ Keep URLs as short as possible Resource Naming 11
  • 12. Update customer with ID 12345 ❏ GET api.example.com/services ?op=update_customer&id=12345&format=json ❏ GET http://api.example.com/update_customer/12345 ❏ GET http://api.example.com/customers/12345/update ❏ PUT http://api.example.com/customers/12345/update Resource Naming Anti-Patterns 12
  • 13. ❏ Uniform Interface ❏ Stateless ❏ Cacheable ❏ Client-Server ❏ Layered System ❏ Code on Demand (optional) Six constraints 13
  • 14. ❏ Resource-Based ❏ Manipulation of Resources Through Representations ❏ Self-descriptive Messages Uniform Interface 14
  • 15. ❏ State contained within the request itself ❏ Communicated back to the client via ❏ Headers ❏ Status ❏ Response body Stateless 15
  • 16. ❏ The methods GET and HEAD are cacheable. ❏ The following status code are cacheable: 200, 203, 204, 206, 300, 301, 404, 405, 410, 414, and 501. ❏ There is no specific headers in the response, like Cache-Control, that prevents caching. Cacheable 16
  • 17. ❏ GET — retrieve a specific resource (by id) or a collection of resources ❏ POST — create a new resource ❏ PUT — replace a specific resource (by id) ❏ PATCH — update or modify the resource (by id) ❏ DELETE — remove a specific resource (by id) HTTP Methods for RESTful Services 17
  • 18. ❏ GET — return 200 (OK) ❏ POST — return 201 (CREATED) ❏ PUT — return 200 (OK) ❏ DELETE — return 204 (NO CONTENT) HTTP Response Codes to Indicate Status 18
  • 19. 200 (OK) 201 (CREATED) 204 (NO CONTENT) 400 (BAD REQUEST) 403 (FORBIDDEN) 404 (NOT FOUND) 500 (INTERNAL SERVER ERROR) Most common response codes 19
  • 20. ❏ Resource based ❏ Representation ❏ Uniform interface ❏ Cacheable ❏ Client-Server Architecture ❏ HTTP methods as verbs So what is REST is? 20