SlideShare a Scribd company logo
1 of 21
Download to read offline
Demystifying REST
Kirsten Jones, API Ninja, 3Scale
Kirsten Jones - @synedra
API Ninja (that’s me!)
 Developer Evangelist
 Worked at Netflix, LinkedIn
 Lots of experience helping developers
 Language Polyglot
 Where I came from...
2
Kirsten Jones - @synedra
This talk
 HTTP - Quick Overview
 REST Web Services
 Debugging Tips and Techniques
Kirsten Jones - @synedra
Want to play along?
 HTTPScoop
 Macintosh only
 Pretty (my favorite)
 Doesn’t support SSL
 http://www.tuffcode.com
 Fiddler
 Windows only
 Supports SSL
 http://fiddler2.com
4
Kirsten Jones - @synedra
HTTP
 HyperText Transfer Protocol
 Used for conversations between web
clients and servers
 Supports verbs for GET, PUT, POST,
DELETE
 Includes support for query parameters
Kirsten Jones - @synedra
How does HTTP Work?
 Client sends a request
 Method
 URL
 Headers
 Parameters
 Body
 Server replies with a response
 Content
 Status
 Headers
Kirsten Jones - @synedra
What do you Mean, Status?
HTTP response codes for dummies.
 50x: we f*cked up.
 40x: you f*cked up.
 30x: ask that dude over there.
 20x: cool.
Props to @DanaDanger for that one
Kirsten Jones - @synedra
An example request
 Chrome browser sends a request to Google
 Method: GET
 URL: http://www.google.com
 Headers:
▪ Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/
*;q=0.8
▪ Accept-Language: en-US,en;q=0.8
▪ Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
▪ Connection: keep-alive
▪ User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3)
AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168
Safari/535.19
▪ Accept-Encoding: gzip,deflate,sdch
▪ Cookie:
NID=59=EudJ2a15ql8832PCysQA0qchtuvGWMoA7rkp79VpIYAQ8-
j42IO17LFudCYNMXm9l6SHcu3YgrGRCdrRCyM468xPZaOek4Pi-
AXQ8eARqU1SGYx6y7_9LW-c3HHb-vs2;
Kirsten Jones - @synedra
Example Response
 Google sends a response
 Headers:
▪ Content-Length: 24716
▪ Content-Encoding: gzip
▪ Set-Cookie: NID=59=F48kbwfwOi-qCHJyrnMSUlDBVxK-
ZVKZpq5B5jttt_25IRN4lS-0rQcVttq-
dnOIlQzafw1i4HPQAO0RpZ7NuC0WCKWta7SYoekx0--
YGf2zIFZ9VXIKS-_UEaOH9iBe; expires=Sat, 10-Nov-2012 21:26:46
GMT; path=/; domain=.google.com; HttpOnly
▪ Expires: -1
▪ Server: gws
▪ X-XSS-Protection: 1; mode=block
▪ Cache-Control: private, max-age=0
▪ X-Frame-Options: SAMEORIGIN
▪ Content-Type: text/html; charset=UTF-8
▪ Date: Fri, 11 May 2012 21:26:46 GMT
 Content: A bunch of HTML
 Status: 200
Kirsten Jones - @synedra
Example: HTTPScoop
Request
Kirsten Jones - @synedra
Example: HTTPScoop
Headers
Kirsten Jones - @synedra
Example: HTTPScoop
Request/Response
Kirsten Jones - @synedra
REST APIs Leverage HTTP
 Uses URL paths to define resources
 Create, Read, Update, Delete
 POST, GET, PUT, DELETE
 Error Codes
 HTTP Status Codes
 Request parameters
 Query parameters
 Response types and configuration
 Headers
Kirsten Jones - @synedra
Example REST Request
 Blog Info from Tumblr
 GET (read) http://api.tumblr.com/v2/
blog/synedra.tumbler.com/info
 Requires api_key sent as parameter
Kirsten Jones - @synedra
Example Request:
Kirsten Jones - @synedra
Example Request:
 Headers
Kirsten Jones - @synedra
Example Request:
 Request/Response
Kirsten Jones - @synedra
Example REST Response
Status: 200
Content:
{"meta":
{"status":200,"msg":"OK”},
"response":{
"blog":{"title":"Untitled","posts":0,
"name":"synedra",
"url":"http://synedra.tumblr.com/",
"updated":0,
"description":"","ask":false,"likes":0}}}
Kirsten Jones - @synedra
Troubleshooting API Calls
 HTTPScoop to understand your calls
 Compare against a known good call
 Simplify request (weird chars?)
 Try a different (simpler) resource
 Ask good questions
19
Kirsten Jones - @synedra
PreventingPreventableProblems
 Use existing libraries/code/examples
 Code Defensively
 Test Defensively
 Test Frequently
 Handle Errors Gracefully
 Pass back errors/log issues
20
Kirsten Jones - @synedra
Questions?
Information about me:
 @synedra on twitter
 kirsten@3scale.net
 http://www.princesspolymath.com
 API Strategy Conference (Oct. 23-25)
Thanks to Twilio!!!
21

More Related Content

What's hot

Password hashing, salting, bycrpt
Password hashing, salting, bycrptPassword hashing, salting, bycrpt
Password hashing, salting, bycrptAhmad karawash
 
4.5. Contests [extras]
4.5. Contests [extras]4.5. Contests [extras]
4.5. Contests [extras]defconmoscow
 
Http
HttpHttp
HttpNEATS
 
Delivery Status Notification (Delay)
Delivery Status Notification (Delay)Delivery Status Notification (Delay)
Delivery Status Notification (Delay)opxmarketing
 
Delivery Status Notification (Delay)
Delivery Status Notification (Delay)Delivery Status Notification (Delay)
Delivery Status Notification (Delay)opxmarketing
 
Android webservices
Android webservicesAndroid webservices
Android webservicesKrazy Koder
 
Delivery Status Notification (Delay)
Delivery Status Notification (Delay)Delivery Status Notification (Delay)
Delivery Status Notification (Delay)opxmarketing
 
Meetup#1: 10 reasons to fall in love with MongoDB
Meetup#1: 10 reasons to fall in love with MongoDBMeetup#1: 10 reasons to fall in love with MongoDB
Meetup#1: 10 reasons to fall in love with MongoDBMinsk MongoDB User Group
 
Delivery Status Notification (Delay)
Delivery Status Notification (Delay)Delivery Status Notification (Delay)
Delivery Status Notification (Delay)opxmarketing
 
Powerpoint presentation
Powerpoint presentationPowerpoint presentation
Powerpoint presentation8281409347
 
Webinar: MongoDB Connector for Spark
Webinar: MongoDB Connector for SparkWebinar: MongoDB Connector for Spark
Webinar: MongoDB Connector for SparkMongoDB
 
Webinar slides: How to Secure MongoDB with ClusterControl
Webinar slides: How to Secure MongoDB with ClusterControlWebinar slides: How to Secure MongoDB with ClusterControl
Webinar slides: How to Secure MongoDB with ClusterControlSeveralnines
 
WebCamp: Developer Day: The Big, the Small and the Redis - Андрей Савченко
WebCamp: Developer Day: The Big, the Small and the Redis - Андрей СавченкоWebCamp: Developer Day: The Big, the Small and the Redis - Андрей Савченко
WebCamp: Developer Day: The Big, the Small and the Redis - Андрей СавченкоGeeksLab Odessa
 
MongoDB Drivers And High Availability: Deep Dive
MongoDB Drivers And High Availability: Deep DiveMongoDB Drivers And High Availability: Deep Dive
MongoDB Drivers And High Availability: Deep Diveemptysquare
 
26 january to 1 february 2015 12 18 nav. 12 final
26 january to 1  february 2015 12 18 nav. 12 final26 january to 1  february 2015 12 18 nav. 12 final
26 january to 1 february 2015 12 18 nav. 12 finalsnehalcnp
 

What's hot (20)

Password hashing, salting, bycrpt
Password hashing, salting, bycrptPassword hashing, salting, bycrpt
Password hashing, salting, bycrpt
 
Ruby Postgres
Ruby PostgresRuby Postgres
Ruby Postgres
 
4.5. Contests [extras]
4.5. Contests [extras]4.5. Contests [extras]
4.5. Contests [extras]
 
JSON Schema MegaWat
JSON Schema MegaWatJSON Schema MegaWat
JSON Schema MegaWat
 
Http
HttpHttp
Http
 
Delivery Status Notification (Delay)
Delivery Status Notification (Delay)Delivery Status Notification (Delay)
Delivery Status Notification (Delay)
 
Delivery Status Notification (Delay)
Delivery Status Notification (Delay)Delivery Status Notification (Delay)
Delivery Status Notification (Delay)
 
Android webservices
Android webservicesAndroid webservices
Android webservices
 
Delivery Status Notification (Delay)
Delivery Status Notification (Delay)Delivery Status Notification (Delay)
Delivery Status Notification (Delay)
 
Meetup#1: 10 reasons to fall in love with MongoDB
Meetup#1: 10 reasons to fall in love with MongoDBMeetup#1: 10 reasons to fall in love with MongoDB
Meetup#1: 10 reasons to fall in love with MongoDB
 
Delivery Status Notification (Delay)
Delivery Status Notification (Delay)Delivery Status Notification (Delay)
Delivery Status Notification (Delay)
 
Powerpoint presentation
Powerpoint presentationPowerpoint presentation
Powerpoint presentation
 
A Brief MongoDB Intro
A Brief MongoDB IntroA Brief MongoDB Intro
A Brief MongoDB Intro
 
Webinar: MongoDB Connector for Spark
Webinar: MongoDB Connector for SparkWebinar: MongoDB Connector for Spark
Webinar: MongoDB Connector for Spark
 
Webinar slides: How to Secure MongoDB with ClusterControl
Webinar slides: How to Secure MongoDB with ClusterControlWebinar slides: How to Secure MongoDB with ClusterControl
Webinar slides: How to Secure MongoDB with ClusterControl
 
WebCamp: Developer Day: The Big, the Small and the Redis - Андрей Савченко
WebCamp: Developer Day: The Big, the Small and the Redis - Андрей СавченкоWebCamp: Developer Day: The Big, the Small and the Redis - Андрей Савченко
WebCamp: Developer Day: The Big, the Small and the Redis - Андрей Савченко
 
MongoDB Drivers And High Availability: Deep Dive
MongoDB Drivers And High Availability: Deep DiveMongoDB Drivers And High Availability: Deep Dive
MongoDB Drivers And High Availability: Deep Dive
 
陈海洋_e
陈海洋_e陈海洋_e
陈海洋_e
 
26 january to 1 february 2015 12 18 nav. 12 final
26 january to 1  february 2015 12 18 nav. 12 final26 january to 1  february 2015 12 18 nav. 12 final
26 january to 1 february 2015 12 18 nav. 12 final
 
C++ programming in hindi
C++ programming in hindiC++ programming in hindi
C++ programming in hindi
 

Viewers also liked

Designing for developers
Designing for developersDesigning for developers
Designing for developersKirsten Hunter
 
Api intensive - What they Are
Api intensive - What they AreApi intensive - What they Are
Api intensive - What they AreKirsten Hunter
 
Quantifying your-fitness
Quantifying your-fitnessQuantifying your-fitness
Quantifying your-fitnessKirsten Hunter
 
Dockercon 2015 - Faster Cheaper Safer
Dockercon 2015 - Faster Cheaper SaferDockercon 2015 - Faster Cheaper Safer
Dockercon 2015 - Faster Cheaper SaferAdrian Cockcroft
 
API 101 - Understanding APIs.
API 101 - Understanding APIs.API 101 - Understanding APIs.
API 101 - Understanding APIs.Kirsten Hunter
 
Microservices Application Tracing Standards and Simulators - Adrians at OSCON
Microservices Application Tracing Standards and Simulators - Adrians at OSCONMicroservices Application Tracing Standards and Simulators - Adrians at OSCON
Microservices Application Tracing Standards and Simulators - Adrians at OSCONAdrian Cockcroft
 
Microservices: What's Missing - O'Reilly Software Architecture New York
Microservices: What's Missing - O'Reilly Software Architecture New YorkMicroservices: What's Missing - O'Reilly Software Architecture New York
Microservices: What's Missing - O'Reilly Software Architecture New YorkAdrian Cockcroft
 
Microservices Workshop - Craft Conference
Microservices Workshop - Craft ConferenceMicroservices Workshop - Craft Conference
Microservices Workshop - Craft ConferenceAdrian Cockcroft
 
What's Missing? Microservices Meetup at Cisco
What's Missing? Microservices Meetup at CiscoWhat's Missing? Microservices Meetup at Cisco
What's Missing? Microservices Meetup at CiscoAdrian Cockcroft
 
Monitoring Challenges - Monitorama 2016 - Monitoringless
Monitoring Challenges - Monitorama 2016 - MonitoringlessMonitoring Challenges - Monitorama 2016 - Monitoringless
Monitoring Challenges - Monitorama 2016 - MonitoringlessAdrian Cockcroft
 
Evolution of Microservices - Craft Conference
Evolution of Microservices - Craft ConferenceEvolution of Microservices - Craft Conference
Evolution of Microservices - Craft ConferenceAdrian Cockcroft
 
Gophercon 2016 Communicating Sequential Goroutines
Gophercon 2016 Communicating Sequential GoroutinesGophercon 2016 Communicating Sequential Goroutines
Gophercon 2016 Communicating Sequential GoroutinesAdrian Cockcroft
 
Microservices Workshop All Topics Deck 2016
Microservices Workshop All Topics Deck 2016Microservices Workshop All Topics Deck 2016
Microservices Workshop All Topics Deck 2016Adrian Cockcroft
 

Viewers also liked (17)

Designing for developers
Designing for developersDesigning for developers
Designing for developers
 
Api intensive - What they Are
Api intensive - What they AreApi intensive - What they Are
Api intensive - What they Are
 
Quantifying fitness
Quantifying fitnessQuantifying fitness
Quantifying fitness
 
Facebook appsincloud
Facebook appsincloudFacebook appsincloud
Facebook appsincloud
 
Quantifying your-fitness
Quantifying your-fitnessQuantifying your-fitness
Quantifying your-fitness
 
Git store
Git storeGit store
Git store
 
Dockercon 2015 - Faster Cheaper Safer
Dockercon 2015 - Faster Cheaper SaferDockercon 2015 - Faster Cheaper Safer
Dockercon 2015 - Faster Cheaper Safer
 
API 101 - Understanding APIs.
API 101 - Understanding APIs.API 101 - Understanding APIs.
API 101 - Understanding APIs.
 
Microservices Application Tracing Standards and Simulators - Adrians at OSCON
Microservices Application Tracing Standards and Simulators - Adrians at OSCONMicroservices Application Tracing Standards and Simulators - Adrians at OSCON
Microservices Application Tracing Standards and Simulators - Adrians at OSCON
 
Microservices: What's Missing - O'Reilly Software Architecture New York
Microservices: What's Missing - O'Reilly Software Architecture New YorkMicroservices: What's Missing - O'Reilly Software Architecture New York
Microservices: What's Missing - O'Reilly Software Architecture New York
 
Microservices Workshop - Craft Conference
Microservices Workshop - Craft ConferenceMicroservices Workshop - Craft Conference
Microservices Workshop - Craft Conference
 
What's Missing? Microservices Meetup at Cisco
What's Missing? Microservices Meetup at CiscoWhat's Missing? Microservices Meetup at Cisco
What's Missing? Microservices Meetup at Cisco
 
Monitoring Challenges - Monitorama 2016 - Monitoringless
Monitoring Challenges - Monitorama 2016 - MonitoringlessMonitoring Challenges - Monitorama 2016 - Monitoringless
Monitoring Challenges - Monitorama 2016 - Monitoringless
 
Evolution of Microservices - Craft Conference
Evolution of Microservices - Craft ConferenceEvolution of Microservices - Craft Conference
Evolution of Microservices - Craft Conference
 
Speeding Up Innovation
Speeding Up InnovationSpeeding Up Innovation
Speeding Up Innovation
 
Gophercon 2016 Communicating Sequential Goroutines
Gophercon 2016 Communicating Sequential GoroutinesGophercon 2016 Communicating Sequential Goroutines
Gophercon 2016 Communicating Sequential Goroutines
 
Microservices Workshop All Topics Deck 2016
Microservices Workshop All Topics Deck 2016Microservices Workshop All Topics Deck 2016
Microservices Workshop All Topics Deck 2016
 

Similar to Demystifying REST APIs

20190516 web security-basic
20190516 web security-basic20190516 web security-basic
20190516 web security-basicMksYi
 
LAWDI - Rogue Linked Data
LAWDI - Rogue Linked DataLAWDI - Rogue Linked Data
LAWDI - Rogue Linked DataRyan Baumann
 
Type URL, Enter, and Then …
Type URL, Enter, and Then …Type URL, Enter, and Then …
Type URL, Enter, and Then …Jinglun Li
 
SPDY - http reloaded - WebTechConference 2012
SPDY - http reloaded - WebTechConference 2012SPDY - http reloaded - WebTechConference 2012
SPDY - http reloaded - WebTechConference 2012Fabian Lange
 
HTTP/2 What's inside and Why
HTTP/2 What's inside and WhyHTTP/2 What's inside and Why
HTTP/2 What's inside and WhyAdrian Cole
 
Introduction to HTTP protocol
Introduction to HTTP protocolIntroduction to HTTP protocol
Introduction to HTTP protocolAviran Mordo
 
Web Fundamentals
Web FundamentalsWeb Fundamentals
Web Fundamentalsarunv
 
Metodologias de Programação IV - Aula 4, Secção 2 - Suporte para sessões no p...
Metodologias de Programação IV - Aula 4, Secção 2 - Suporte para sessões no p...Metodologias de Programação IV - Aula 4, Secção 2 - Suporte para sessões no p...
Metodologias de Programação IV - Aula 4, Secção 2 - Suporte para sessões no p...Leonel Morgado
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2Ido Flatow
 
Introduction to Web Application Security - Blackhoodie US 2018
Introduction to Web Application Security - Blackhoodie US 2018Introduction to Web Application Security - Blackhoodie US 2018
Introduction to Web Application Security - Blackhoodie US 2018Niranjanaa Ragupathy
 
Moving from HTTP to HTTPS
Moving from HTTP to HTTPSMoving from HTTP to HTTPS
Moving from HTTP to HTTPSBlake Crosby
 
Revisiting HTTP/2
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2Fastly
 
CSU33012-I-microservices.pdf
CSU33012-I-microservices.pdfCSU33012-I-microservices.pdf
CSU33012-I-microservices.pdfRicky Garg
 

Similar to Demystifying REST APIs (20)

20190516 web security-basic
20190516 web security-basic20190516 web security-basic
20190516 web security-basic
 
LAWDI - Rogue Linked Data
LAWDI - Rogue Linked DataLAWDI - Rogue Linked Data
LAWDI - Rogue Linked Data
 
Type URL, Enter, and Then …
Type URL, Enter, and Then …Type URL, Enter, and Then …
Type URL, Enter, and Then …
 
HTTPS @Scale
HTTPS @ScaleHTTPS @Scale
HTTPS @Scale
 
Demystifying REST
Demystifying RESTDemystifying REST
Demystifying REST
 
SPDY - http reloaded - WebTechConference 2012
SPDY - http reloaded - WebTechConference 2012SPDY - http reloaded - WebTechConference 2012
SPDY - http reloaded - WebTechConference 2012
 
HTTP/2 What's inside and Why
HTTP/2 What's inside and WhyHTTP/2 What's inside and Why
HTTP/2 What's inside and Why
 
Introduction to HTTP protocol
Introduction to HTTP protocolIntroduction to HTTP protocol
Introduction to HTTP protocol
 
Web Fundamentals
Web FundamentalsWeb Fundamentals
Web Fundamentals
 
HTTP
HTTPHTTP
HTTP
 
Metodologias de Programação IV - Aula 4, Secção 2 - Suporte para sessões no p...
Metodologias de Programação IV - Aula 4, Secção 2 - Suporte para sessões no p...Metodologias de Programação IV - Aula 4, Secção 2 - Suporte para sessões no p...
Metodologias de Programação IV - Aula 4, Secção 2 - Suporte para sessões no p...
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2
 
Http2 kotlin
Http2   kotlinHttp2   kotlin
Http2 kotlin
 
Introduction to Web Application Security - Blackhoodie US 2018
Introduction to Web Application Security - Blackhoodie US 2018Introduction to Web Application Security - Blackhoodie US 2018
Introduction to Web Application Security - Blackhoodie US 2018
 
spdy
spdyspdy
spdy
 
The SPDY Protocol
The SPDY ProtocolThe SPDY Protocol
The SPDY Protocol
 
Moving from HTTP to HTTPS
Moving from HTTP to HTTPSMoving from HTTP to HTTPS
Moving from HTTP to HTTPS
 
Revisiting HTTP/2
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2
 
SPDY - or maybe HTTP2.0
SPDY - or maybe HTTP2.0SPDY - or maybe HTTP2.0
SPDY - or maybe HTTP2.0
 
CSU33012-I-microservices.pdf
CSU33012-I-microservices.pdfCSU33012-I-microservices.pdf
CSU33012-I-microservices.pdf
 

More from Kirsten Hunter

Designing irresistible apis
Designing irresistible apisDesigning irresistible apis
Designing irresistible apisKirsten Hunter
 
Designing irresistible apis
Designing irresistible apisDesigning irresistible apis
Designing irresistible apisKirsten Hunter
 
Designing irresistible APIs
Designing irresistible APIsDesigning irresistible APIs
Designing irresistible APIsKirsten Hunter
 
API 101 Workshop from APIStrat Conference
API 101 Workshop from APIStrat ConferenceAPI 101 Workshop from APIStrat Conference
API 101 Workshop from APIStrat ConferenceKirsten Hunter
 
Prototyping in the cloud
Prototyping in the cloudPrototyping in the cloud
Prototyping in the cloudKirsten Hunter
 
PHP Architect Virtual Cloud summit
PHP Architect Virtual Cloud summitPHP Architect Virtual Cloud summit
PHP Architect Virtual Cloud summitKirsten Hunter
 
Social Marketing with LinkedIn
Social Marketing with LinkedInSocial Marketing with LinkedIn
Social Marketing with LinkedInKirsten Hunter
 
Creating Professional Applications with the LinkedIn API
Creating Professional Applications with the LinkedIn APICreating Professional Applications with the LinkedIn API
Creating Professional Applications with the LinkedIn APIKirsten Hunter
 

More from Kirsten Hunter (17)

Polyglot copy
Polyglot copyPolyglot copy
Polyglot copy
 
Designing irresistible apis
Designing irresistible apisDesigning irresistible apis
Designing irresistible apis
 
Api 101
Api 101Api 101
Api 101
 
Designing irresistible apis
Designing irresistible apisDesigning irresistible apis
Designing irresistible apis
 
Api 101
Api 101Api 101
Api 101
 
Designing irresistible APIs
Designing irresistible APIsDesigning irresistible APIs
Designing irresistible APIs
 
API First
API FirstAPI First
API First
 
API 101 Workshop from APIStrat Conference
API 101 Workshop from APIStrat ConferenceAPI 101 Workshop from APIStrat Conference
API 101 Workshop from APIStrat Conference
 
Liberating your data
Liberating your dataLiberating your data
Liberating your data
 
Liberating your data
Liberating your dataLiberating your data
Liberating your data
 
Prototyping in the cloud
Prototyping in the cloudPrototyping in the cloud
Prototyping in the cloud
 
Rest schema design
Rest schema designRest schema design
Rest schema design
 
Successful developers
Successful developersSuccessful developers
Successful developers
 
PHP Architect Virtual Cloud summit
PHP Architect Virtual Cloud summitPHP Architect Virtual Cloud summit
PHP Architect Virtual Cloud summit
 
Social Marketing with LinkedIn
Social Marketing with LinkedInSocial Marketing with LinkedIn
Social Marketing with LinkedIn
 
LinkedIn Everywhere
LinkedIn EverywhereLinkedIn Everywhere
LinkedIn Everywhere
 
Creating Professional Applications with the LinkedIn API
Creating Professional Applications with the LinkedIn APICreating Professional Applications with the LinkedIn API
Creating Professional Applications with the LinkedIn API
 

Recently uploaded

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 

Recently uploaded (20)

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 

Demystifying REST APIs

  • 2. Kirsten Jones - @synedra API Ninja (that’s me!)  Developer Evangelist  Worked at Netflix, LinkedIn  Lots of experience helping developers  Language Polyglot  Where I came from... 2
  • 3. Kirsten Jones - @synedra This talk  HTTP - Quick Overview  REST Web Services  Debugging Tips and Techniques
  • 4. Kirsten Jones - @synedra Want to play along?  HTTPScoop  Macintosh only  Pretty (my favorite)  Doesn’t support SSL  http://www.tuffcode.com  Fiddler  Windows only  Supports SSL  http://fiddler2.com 4
  • 5. Kirsten Jones - @synedra HTTP  HyperText Transfer Protocol  Used for conversations between web clients and servers  Supports verbs for GET, PUT, POST, DELETE  Includes support for query parameters
  • 6. Kirsten Jones - @synedra How does HTTP Work?  Client sends a request  Method  URL  Headers  Parameters  Body  Server replies with a response  Content  Status  Headers
  • 7. Kirsten Jones - @synedra What do you Mean, Status? HTTP response codes for dummies.  50x: we f*cked up.  40x: you f*cked up.  30x: ask that dude over there.  20x: cool. Props to @DanaDanger for that one
  • 8. Kirsten Jones - @synedra An example request  Chrome browser sends a request to Google  Method: GET  URL: http://www.google.com  Headers: ▪ Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/ *;q=0.8 ▪ Accept-Language: en-US,en;q=0.8 ▪ Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 ▪ Connection: keep-alive ▪ User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19 ▪ Accept-Encoding: gzip,deflate,sdch ▪ Cookie: NID=59=EudJ2a15ql8832PCysQA0qchtuvGWMoA7rkp79VpIYAQ8- j42IO17LFudCYNMXm9l6SHcu3YgrGRCdrRCyM468xPZaOek4Pi- AXQ8eARqU1SGYx6y7_9LW-c3HHb-vs2;
  • 9. Kirsten Jones - @synedra Example Response  Google sends a response  Headers: ▪ Content-Length: 24716 ▪ Content-Encoding: gzip ▪ Set-Cookie: NID=59=F48kbwfwOi-qCHJyrnMSUlDBVxK- ZVKZpq5B5jttt_25IRN4lS-0rQcVttq- dnOIlQzafw1i4HPQAO0RpZ7NuC0WCKWta7SYoekx0-- YGf2zIFZ9VXIKS-_UEaOH9iBe; expires=Sat, 10-Nov-2012 21:26:46 GMT; path=/; domain=.google.com; HttpOnly ▪ Expires: -1 ▪ Server: gws ▪ X-XSS-Protection: 1; mode=block ▪ Cache-Control: private, max-age=0 ▪ X-Frame-Options: SAMEORIGIN ▪ Content-Type: text/html; charset=UTF-8 ▪ Date: Fri, 11 May 2012 21:26:46 GMT  Content: A bunch of HTML  Status: 200
  • 10. Kirsten Jones - @synedra Example: HTTPScoop Request
  • 11. Kirsten Jones - @synedra Example: HTTPScoop Headers
  • 12. Kirsten Jones - @synedra Example: HTTPScoop Request/Response
  • 13. Kirsten Jones - @synedra REST APIs Leverage HTTP  Uses URL paths to define resources  Create, Read, Update, Delete  POST, GET, PUT, DELETE  Error Codes  HTTP Status Codes  Request parameters  Query parameters  Response types and configuration  Headers
  • 14. Kirsten Jones - @synedra Example REST Request  Blog Info from Tumblr  GET (read) http://api.tumblr.com/v2/ blog/synedra.tumbler.com/info  Requires api_key sent as parameter
  • 15. Kirsten Jones - @synedra Example Request:
  • 16. Kirsten Jones - @synedra Example Request:  Headers
  • 17. Kirsten Jones - @synedra Example Request:  Request/Response
  • 18. Kirsten Jones - @synedra Example REST Response Status: 200 Content: {"meta": {"status":200,"msg":"OK”}, "response":{ "blog":{"title":"Untitled","posts":0, "name":"synedra", "url":"http://synedra.tumblr.com/", "updated":0, "description":"","ask":false,"likes":0}}}
  • 19. Kirsten Jones - @synedra Troubleshooting API Calls  HTTPScoop to understand your calls  Compare against a known good call  Simplify request (weird chars?)  Try a different (simpler) resource  Ask good questions 19
  • 20. Kirsten Jones - @synedra PreventingPreventableProblems  Use existing libraries/code/examples  Code Defensively  Test Defensively  Test Frequently  Handle Errors Gracefully  Pass back errors/log issues 20
  • 21. Kirsten Jones - @synedra Questions? Information about me:  @synedra on twitter  kirsten@3scale.net  http://www.princesspolymath.com  API Strategy Conference (Oct. 23-25) Thanks to Twilio!!! 21