SlideShare a Scribd company logo
HTTP, REST  and the PATCH verb (accompanied by kittens) Thomas Parslow @almostobsolete http://almostobsolete.net
Web services ,[object Object],[object Object],[object Object],[object Object],[object Object]
HTTP is awesome! ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
REST ,[object Object],[object Object],[object Object],[object Object],[object Object]
Current main HTTP verbs GET PUT DELETE POST Show! Replace! Destroy! Do stuff!
Why REST? Trendy buzzword Discoverable, self describing APIs Less special cases and one offs More maintanable Less code!
Real world example:  Telephone conference control Conference Caller Get conference details ( GET ) Lock/Unlock Record On/ Record Off End conference Add caller (dialout) Get List Of Callers Evict caller Mute Caller Unmute caller
Conference {    "type": "conference",    "href": "http://example.com/conferences/1",    "head": {      "allow": [ "GET", "DELETE", "PUT", "PATCH" ],      "created_at": "2011-10-21T10:56:54Z",       "related": {        "callers": {"href": "http://example.com/conferences/1/callers"}    },    "body": {      "recording": false,      "locked": false    } } Caller List {    "type": "caller-list",    "href": "http://example.com/api/v1/conferences/1/callers",    "head": {      "allow": ["GET", "POST"]    },    "body": [      {"href": "http://example.com/conferences/1/callers/1"}    ] } Caller {    "type": "caller",    "href": "http://example.com/conferences/1/callers/1",    "head": {      "allow": [ "GET", "DELETE", "PUT", "PATCH" ]    },    "body": {      "phone_number": "07951261227",      "name": "Tom",      "type": "chair",      "muted": false    } } Real world example:  Telephone conference control Conference Caller
Real world example:  Telephone conference control Conference Caller Get conference details ( GET ) Lock/Unlock ( PUT ) Record On/ Record Off ( PUT ) End conference ( DELETE ) Get caller details ( GET ) Evict caller ( DELETE ) Mute Caller ( PUT ) Unmute caller ( PUT ) Caller List Get list of callers ( GET ) Add caller (dialout) ( POST )
Partial updates ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The PATCH Verb ,[object Object],[object Object],[object Object],[object Object],[object Object]
JSONPatch    ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Thanks for listening! Questions? @almostobsolete

More Related Content

Similar to REST, HTTP, and the PATCH verb (with kittens)

XML and Web Services with PHP5 and PEAR
XML and Web Services with PHP5 and PEARXML and Web Services with PHP5 and PEAR
XML and Web Services with PHP5 and PEAR
Stephan Schmidt
 
Lecture 3 - Comm Lab: Web @ ITP
Lecture 3 - Comm Lab: Web @ ITP Lecture 3 - Comm Lab: Web @ ITP
Lecture 3 - Comm Lab: Web @ ITP
yucefmerhi
 
Php 3 1
Php 3 1Php 3 1
Putting SOAP to REST
Putting SOAP to RESTPutting SOAP to REST
Putting SOAP to REST
Igor Moochnick
 
Real-time Ruby for the Real-time Web
Real-time Ruby for the Real-time WebReal-time Ruby for the Real-time Web
Real-time Ruby for the Real-time Web
Ilya Grigorik
 
Html tutorial
Html tutorialHtml tutorial
Html tutorial
mohamed ashraf
 
Php performance
Php performancePhp performance
Php performance
Xinchen Hui
 
Forum Presentation
Forum PresentationForum Presentation
Forum Presentation
Angus Pratt
 
Ruby off Rails---rack, sinatra and sequel
Ruby off Rails---rack, sinatra and sequelRuby off Rails---rack, sinatra and sequel
Ruby off Rails---rack, sinatra and sequel
Jiang Wu
 
An Introduction to Solr
An Introduction to SolrAn Introduction to Solr
An Introduction to Solr
tomhill
 
Control Structures In Php 2
Control Structures In Php 2Control Structures In Php 2
Control Structures In Php 2
Digital Insights - Digital Marketing Agency
 
John Rowley Notes
John Rowley NotesJohn Rowley Notes
John Rowley Notes
IBAT College
 
Jsonsaga
JsonsagaJsonsaga
Jsonsaga
nohmad
 
PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
Nikhil Jain
 
We9 Struts 2.0
We9 Struts 2.0We9 Struts 2.0
We9 Struts 2.0
wangjiaz
 
Lect_html1
Lect_html1Lect_html1
Lect_html1
ibrahim osama
 
Douglas Crockford Presentation Jsonsaga
Douglas Crockford Presentation JsonsagaDouglas Crockford Presentation Jsonsaga
Douglas Crockford Presentation Jsonsaga
Ajax Experience 2009
 
The JSON Saga
The JSON SagaThe JSON Saga
The JSON Saga
kaven yan
 
Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)
Michiel Rook
 
Php Training
Php TrainingPhp Training
Php Training
adfa
 

Similar to REST, HTTP, and the PATCH verb (with kittens) (20)

XML and Web Services with PHP5 and PEAR
XML and Web Services with PHP5 and PEARXML and Web Services with PHP5 and PEAR
XML and Web Services with PHP5 and PEAR
 
Lecture 3 - Comm Lab: Web @ ITP
Lecture 3 - Comm Lab: Web @ ITP Lecture 3 - Comm Lab: Web @ ITP
Lecture 3 - Comm Lab: Web @ ITP
 
Php 3 1
Php 3 1Php 3 1
Php 3 1
 
Putting SOAP to REST
Putting SOAP to RESTPutting SOAP to REST
Putting SOAP to REST
 
Real-time Ruby for the Real-time Web
Real-time Ruby for the Real-time WebReal-time Ruby for the Real-time Web
Real-time Ruby for the Real-time Web
 
Html tutorial
Html tutorialHtml tutorial
Html tutorial
 
Php performance
Php performancePhp performance
Php performance
 
Forum Presentation
Forum PresentationForum Presentation
Forum Presentation
 
Ruby off Rails---rack, sinatra and sequel
Ruby off Rails---rack, sinatra and sequelRuby off Rails---rack, sinatra and sequel
Ruby off Rails---rack, sinatra and sequel
 
An Introduction to Solr
An Introduction to SolrAn Introduction to Solr
An Introduction to Solr
 
Control Structures In Php 2
Control Structures In Php 2Control Structures In Php 2
Control Structures In Php 2
 
John Rowley Notes
John Rowley NotesJohn Rowley Notes
John Rowley Notes
 
Jsonsaga
JsonsagaJsonsaga
Jsonsaga
 
PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
 
We9 Struts 2.0
We9 Struts 2.0We9 Struts 2.0
We9 Struts 2.0
 
Lect_html1
Lect_html1Lect_html1
Lect_html1
 
Douglas Crockford Presentation Jsonsaga
Douglas Crockford Presentation JsonsagaDouglas Crockford Presentation Jsonsaga
Douglas Crockford Presentation Jsonsaga
 
The JSON Saga
The JSON SagaThe JSON Saga
The JSON Saga
 
Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)Phing - A PHP Build Tool (An Introduction)
Phing - A PHP Build Tool (An Introduction)
 
Php Training
Php TrainingPhp Training
Php Training
 

Recently uploaded

Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
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
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
Claudio Di Ciccio
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
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
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
Techgropse Pvt.Ltd.
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
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
 
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
 
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
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 

Recently uploaded (20)

Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
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
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
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
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
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
 
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
 
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
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 

REST, HTTP, and the PATCH verb (with kittens)

  • 1. HTTP, REST  and the PATCH verb (accompanied by kittens) Thomas Parslow @almostobsolete http://almostobsolete.net
  • 2.
  • 3.
  • 4.
  • 5. Current main HTTP verbs GET PUT DELETE POST Show! Replace! Destroy! Do stuff!
  • 6. Why REST? Trendy buzzword Discoverable, self describing APIs Less special cases and one offs More maintanable Less code!
  • 7. Real world example:  Telephone conference control Conference Caller Get conference details ( GET ) Lock/Unlock Record On/ Record Off End conference Add caller (dialout) Get List Of Callers Evict caller Mute Caller Unmute caller
  • 8. Conference {   "type": "conference",   "href": "http://example.com/conferences/1",   "head": {     "allow": [ "GET", "DELETE", "PUT", "PATCH" ],     "created_at": "2011-10-21T10:56:54Z",      "related": {       "callers": {"href": "http://example.com/conferences/1/callers"}   },   "body": {     "recording": false,     "locked": false   } } Caller List {   "type": "caller-list",   "href": "http://example.com/api/v1/conferences/1/callers",   "head": {     "allow": ["GET", "POST"]   },   "body": [     {"href": "http://example.com/conferences/1/callers/1"}   ] } Caller {   "type": "caller",   "href": "http://example.com/conferences/1/callers/1",   "head": {     "allow": [ "GET", "DELETE", "PUT", "PATCH" ]   },   "body": {     "phone_number": "07951261227",     "name": "Tom",     "type": "chair",     "muted": false   } } Real world example:  Telephone conference control Conference Caller
  • 9. Real world example:  Telephone conference control Conference Caller Get conference details ( GET ) Lock/Unlock ( PUT ) Record On/ Record Off ( PUT ) End conference ( DELETE ) Get caller details ( GET ) Evict caller ( DELETE ) Mute Caller ( PUT ) Unmute caller ( PUT ) Caller List Get list of callers ( GET ) Add caller (dialout) ( POST )
  • 10.
  • 11.
  • 12.
  • 13. Thanks for listening! Questions? @almostobsolete