SlideShare a Scribd company logo
1 of 29
ParisJS Meetup December 3rd, 2016
Follow me on Twitter and/or tweet at me. @tessamero
By Tessa Mero
Understanding REST APIs
in 5 Simple Steps
REST != $this
“It’s a way for two pieces of software to
talk to each other”
Application Programming Interface
STEP 1: Understanding the
Purpose of APIs
Why are APIs so Important?
API Growth from 2000 to 2016
0
5000
10000
15000
20000
25000
30000
35000
2000 2005 2007 2009 2011 2013 2015 2016
API's
API's
Source: 2016 data from nordicapis.com. 2005-2015 data from
rubenverborgh.github.io and 2000-2004 data from blog.cutter.com
An API is like …
An API (Application Programming Interface) is best thought of as a contract
provided by one piece of computer software to another.
APIs help developers create apps that
benefit the end user.
Yelp asks for Map
Data
Google Maps
returns map data
via API
Users sees
list of
restaurants
close to
them
STEP 2: Learn what REST
is
A REST API defines a set of
functions which developers can
perform requests and receive
responses via HTTP protocol
such as GET and POST.
REST is best explained as a way to
talk to other machines through the
server with an HTTP Protocol
Using Verbs (actions) and Nouns
(items)
STEP 3: Know What
Request and Responses are
View a Web Page
13Presentation ID
View a Web Page
14Presentation ID
Request
GET /index.htm HTTP/1.1
Response
HTTP 200 OK
<html>
REST APIs use Request and Response too
Get Data using an API (Spark)
16Presentation ID
Get Data using an API – Response!
17Presentation ID
Request
GET /rooms
Response
HTTP 200 OK
{json data}
API Consumer API Provider
List of Verbs!
STEP 4: Documentation is
Your Dictionary
API Reference for Rooms (Verbs and Nouns)
Request
Parameters for
“MESSAGES”
STEP 5: Learn How to Use
Debug/Test Tools for APIs
Tools to Debug/Test http://tiny.cc/60tools
• Webhook Debugging (RequestBin formerly requestbin.org…)
• Webhook Utilities (Torpio…)
• Local Tunneling (ngrok...)
• API Monitoring (Runscope...)
• Response Mocking (mocky.io...)
• JSON Utilities (JSONFormat...)
• OAUTH Utilities (oauth.io...)
• API Directories (APIS.io, ProgrammableWeb...)
• API Testing (Runscope Radar...)
• Load Testing (loader.io...)
• GUI HTTP Clients (POSTMAN...)
POSTMAN!!!!!
method
url
request
headers
status code
response headers
content-type
response
body
query parameters
Summary:
1. You Understand the Purpose
2. You Know what REST is
3. Request & Response – Makes sense
4. Documentation – Live by it.
5. Debugging&Test Tools – Prevent
headaches
OUI!!!!!!!!
Thank You
@tessamero
tessamero@gmail.com
Understanding REST APIs in 5 Simple Steps

More Related Content

What's hot (8)

Meetup #5 API Testing World
Meetup #5 API Testing WorldMeetup #5 API Testing World
Meetup #5 API Testing World
 
APIs explained for product managers
APIs explained for product managersAPIs explained for product managers
APIs explained for product managers
 
Api Testing
Api TestingApi Testing
Api Testing
 
Api testing
Api testingApi testing
Api testing
 
Android
AndroidAndroid
Android
 
Test api
Test apiTest api
Test api
 
B4USolution_API-Testing
B4USolution_API-TestingB4USolution_API-Testing
B4USolution_API-Testing
 
Automation tech
Automation techAutomation tech
Automation tech
 

Viewers also liked

4 b power point
4 b power point4 b power point
4 b power point
enecorcu
 
Digital transformation vkw (1)
Digital transformation vkw (1)Digital transformation vkw (1)
Digital transformation vkw (1)
ETION
 
709 cepeda diseño de metodologia de enseñanza
709 cepeda diseño de metodologia de enseñanza709 cepeda diseño de metodologia de enseñanza
709 cepeda diseño de metodologia de enseñanza
socorro Juarez
 

Viewers also liked (17)

La revolución mexicana 1
La revolución mexicana 1La revolución mexicana 1
La revolución mexicana 1
 
Rosandry
RosandryRosandry
Rosandry
 
Elearning how tostart-eng
Elearning how tostart-engElearning how tostart-eng
Elearning how tostart-eng
 
Excel 2007. Nivel avanzado
Excel 2007. Nivel avanzado Excel 2007. Nivel avanzado
Excel 2007. Nivel avanzado
 
4 b power point
4 b power point4 b power point
4 b power point
 
que es Rss, funcionamiento y tipos
que es Rss, funcionamiento y tipos que es Rss, funcionamiento y tipos
que es Rss, funcionamiento y tipos
 
Auguste marie louis nicolas lumière
Auguste marie louis nicolas lumièreAuguste marie louis nicolas lumière
Auguste marie louis nicolas lumière
 
Docker Workbench
Docker WorkbenchDocker Workbench
Docker Workbench
 
Erge
ErgeErge
Erge
 
Digital transformation vkw (1)
Digital transformation vkw (1)Digital transformation vkw (1)
Digital transformation vkw (1)
 
Modular HTML & CSS
Modular HTML & CSSModular HTML & CSS
Modular HTML & CSS
 
709 cepeda diseño de metodologia de enseñanza
709 cepeda diseño de metodologia de enseñanza709 cepeda diseño de metodologia de enseñanza
709 cepeda diseño de metodologia de enseñanza
 
Strategic Communications Planning for NPOs
Strategic Communications Planning for NPOsStrategic Communications Planning for NPOs
Strategic Communications Planning for NPOs
 
Technology and the concepts of technology
Technology and the concepts of technologyTechnology and the concepts of technology
Technology and the concepts of technology
 
Product Development Principles
Product Development PrinciplesProduct Development Principles
Product Development Principles
 
Examen historia
Examen historia Examen historia
Examen historia
 
Changellenge | Cup Kazakhstan 2016 | Leroy Merlin case | 1st place
Changellenge | Cup Kazakhstan 2016 | Leroy Merlin case | 1st placeChangellenge | Cup Kazakhstan 2016 | Leroy Merlin case | 1st place
Changellenge | Cup Kazakhstan 2016 | Leroy Merlin case | 1st place
 

Similar to Understanding REST APIs in 5 Simple Steps

O'Reilly SACon San Jose, CA - 2019 - API design tutorial
O'Reilly SACon San Jose, CA - 2019 - API design tutorialO'Reilly SACon San Jose, CA - 2019 - API design tutorial
O'Reilly SACon San Jose, CA - 2019 - API design tutorial
Tom Hofte
 
api_101
api_101api_101
api_101
samir
 
Applicaton Development using RESTful APIs
Applicaton Development using RESTful APIsApplicaton Development using RESTful APIs
Applicaton Development using RESTful APIs
Sourav Maji
 
Digital Methods Winterschool 2012: API - Interfaces to the Cloud
Digital Methods Winterschool 2012: API - Interfaces to the CloudDigital Methods Winterschool 2012: API - Interfaces to the Cloud
Digital Methods Winterschool 2012: API - Interfaces to the Cloud
Digital Methods Initiative
 
Setup API Introductie
Setup API IntroductieSetup API Introductie
Setup API Introductie
annehelmond
 

Similar to Understanding REST APIs in 5 Simple Steps (20)

Nom Nom: Consuming REST APIs
Nom Nom: Consuming REST APIsNom Nom: Consuming REST APIs
Nom Nom: Consuming REST APIs
 
Introduction to API
Introduction to APIIntroduction to API
Introduction to API
 
Moving into API documentation writing
Moving into API documentation writingMoving into API documentation writing
Moving into API documentation writing
 
Api_testing.pdf
Api_testing.pdfApi_testing.pdf
Api_testing.pdf
 
Apitesting.pptx
Apitesting.pptxApitesting.pptx
Apitesting.pptx
 
Api Testing.pdf
Api Testing.pdfApi Testing.pdf
Api Testing.pdf
 
A_Complete_Guide_to_API_Development.pdf
A_Complete_Guide_to_API_Development.pdfA_Complete_Guide_to_API_Development.pdf
A_Complete_Guide_to_API_Development.pdf
 
Session 8 Android Web Services - Part 1.pdf
Session 8 Android Web Services - Part 1.pdfSession 8 Android Web Services - Part 1.pdf
Session 8 Android Web Services - Part 1.pdf
 
API Documentation.pptx
API Documentation.pptxAPI Documentation.pptx
API Documentation.pptx
 
API Documentation.pptx
API Documentation.pptxAPI Documentation.pptx
API Documentation.pptx
 
Best practices and advantages of REST APIs
Best practices and advantages of REST APIsBest practices and advantages of REST APIs
Best practices and advantages of REST APIs
 
API Product Opportunity Responsibility Nicolas Sierro 2015.pptx
API Product Opportunity Responsibility Nicolas Sierro 2015.pptxAPI Product Opportunity Responsibility Nicolas Sierro 2015.pptx
API Product Opportunity Responsibility Nicolas Sierro 2015.pptx
 
O'Reilly SACon San Jose, CA - 2019 - API design tutorial
O'Reilly SACon San Jose, CA - 2019 - API design tutorialO'Reilly SACon San Jose, CA - 2019 - API design tutorial
O'Reilly SACon San Jose, CA - 2019 - API design tutorial
 
api_101
api_101api_101
api_101
 
How to Design and Build a Great Web API
How to Design and Build a Great Web APIHow to Design and Build a Great Web API
How to Design and Build a Great Web API
 
Applicaton Development using RESTful APIs
Applicaton Development using RESTful APIsApplicaton Development using RESTful APIs
Applicaton Development using RESTful APIs
 
Digital Methods Winterschool 2012: API - Interfaces to the Cloud
Digital Methods Winterschool 2012: API - Interfaces to the CloudDigital Methods Winterschool 2012: API - Interfaces to the Cloud
Digital Methods Winterschool 2012: API - Interfaces to the Cloud
 
apidays LIVE Paris - The Business of APIs by Jed Ng
apidays LIVE Paris - The Business of APIs by Jed Ngapidays LIVE Paris - The Business of APIs by Jed Ng
apidays LIVE Paris - The Business of APIs by Jed Ng
 
Services, Apps and the API Powered Web
Services, Apps and the API Powered WebServices, Apps and the API Powered Web
Services, Apps and the API Powered Web
 
Setup API Introductie
Setup API IntroductieSetup API Introductie
Setup API Introductie
 

More from Tessa Mero

5 ways to simply add media accessibility (m16y) to your jamstack app
5 ways to simply add media accessibility (m16y) to your jamstack app5 ways to simply add media accessibility (m16y) to your jamstack app
5 ways to simply add media accessibility (m16y) to your jamstack app
Tessa Mero
 
Chatbots Workshop SF JS Meetup May 2018
Chatbots Workshop SF JS Meetup May 2018Chatbots Workshop SF JS Meetup May 2018
Chatbots Workshop SF JS Meetup May 2018
Tessa Mero
 

More from Tessa Mero (20)

Developer relations KPIs
Developer relations KPIsDeveloper relations KPIs
Developer relations KPIs
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
5 ways to simply add media accessibility (m16y) to your jamstack app
5 ways to simply add media accessibility (m16y) to your jamstack app5 ways to simply add media accessibility (m16y) to your jamstack app
5 ways to simply add media accessibility (m16y) to your jamstack app
 
I'm Graduating Soon. Help! How Do I Get into the Tech Field?
I'm Graduating Soon. Help! How Do I Get into the Tech Field?I'm Graduating Soon. Help! How Do I Get into the Tech Field?
I'm Graduating Soon. Help! How Do I Get into the Tech Field?
 
Optimize media performance in wordpress with cloudinary
Optimize media performance in wordpress with cloudinaryOptimize media performance in wordpress with cloudinary
Optimize media performance in wordpress with cloudinary
 
Joining a developer experts program to leverage your career
Joining a developer experts program to leverage your careerJoining a developer experts program to leverage your career
Joining a developer experts program to leverage your career
 
Finding the Jelly in the JAMstack
Finding the Jelly in the JAMstackFinding the Jelly in the JAMstack
Finding the Jelly in the JAMstack
 
Building APIs the serverless way
Building APIs the serverless wayBuilding APIs the serverless way
Building APIs the serverless way
 
Don't let FaaS do a BaaS job
Don't let FaaS do a BaaS jobDon't let FaaS do a BaaS job
Don't let FaaS do a BaaS job
 
Finding the jelly in the jam stack
Finding the jelly in the jam stackFinding the jelly in the jam stack
Finding the jelly in the jam stack
 
Chatbots Workshop SF JS Meetup May 2018
Chatbots Workshop SF JS Meetup May 2018Chatbots Workshop SF JS Meetup May 2018
Chatbots Workshop SF JS Meetup May 2018
 
ChatOps Workshop
ChatOps WorkshopChatOps Workshop
ChatOps Workshop
 
Cisco CMX Location Services
Cisco CMX Location ServicesCisco CMX Location Services
Cisco CMX Location Services
 
DeveloperWeek2018 - Let's Build a Chatbot
DeveloperWeek2018 - Let's Build a ChatbotDeveloperWeek2018 - Let's Build a Chatbot
DeveloperWeek2018 - Let's Build a Chatbot
 
Learn to Code with JavaScript - Choose Your Own Adventures
Learn to Code with JavaScript - Choose Your Own AdventuresLearn to Code with JavaScript - Choose Your Own Adventures
Learn to Code with JavaScript - Choose Your Own Adventures
 
Revolutionize Your Workflow with ChatOps
Revolutionize Your Workflow with ChatOpsRevolutionize Your Workflow with ChatOps
Revolutionize Your Workflow with ChatOps
 
Let's Build a Chatbot
Let's Build a ChatbotLet's Build a Chatbot
Let's Build a Chatbot
 
DevNet 1056 WIT Spark API and Chat Bot Workshop
DevNet 1056 WIT Spark API and Chat Bot WorkshopDevNet 1056 WIT Spark API and Chat Bot Workshop
DevNet 1056 WIT Spark API and Chat Bot Workshop
 
Chatbots
ChatbotsChatbots
Chatbots
 
Building Chatbots
Building ChatbotsBuilding Chatbots
Building Chatbots
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

Understanding REST APIs in 5 Simple Steps

Editor's Notes

  1. I’m here to give you the 5 steps to take with you to understand REST APIs and start building stuff on your own. Before you can work with APIs, one has to understand APIs.
  2. So when I say REST, I don’t mean this…
  3. An API stands for Application Programming Interface It’s a way for two pieces of software to talk to each other.
  4. Okay, so what is an API and why are they important?
  5. Why are API’s so important? Most companies today have several different software’s they need to use, including sales, accounting, CRM, a project management system, etc. Having all their software work together is more important for financial reasons and to make work processes easier They can also create their own tool to enhance their software, making their customers happier.
  6. APIs started out as 1 API in 2000, the Ebay API. Since 2011, it has doubled exponentially. From 2015 to 2016, it has doubled in growth from 15,000 to 30,00.
  7. An API is best thought of as a contract provided by one piece of computer software to another.
  8. REST describes a way of interacting with a HTTP server.
  9. A REST API defines a set of functions which developers can perform requests and receive responses via HTTP protocol such as GET and POST.
  10. REST is best explained as a way to talk to other machines through the server with an HTTP Protocol. It uses Verbs and nouns that I will show you later. So basically it’s a way of http talking to other machines with things and actions for each thing.
  11. When you view a web page, it sends a request to the web server, and sends a response back. So you are making a request and getting a response.
  12. When you send your HTTP request, you are sending a GET request. You get your response as an HTTP response code, where 200 means good, and everything came back okay.
  13. This is exactly what is happening between your app and their app between an API
  14. When you are getting data using an API, you make your request. In this flow chart, you see that your app is asking to make a list of Spark rooms, then the Spark server prepares the data and sends the list of spark rooms back. And you can have it parsed in any parsing format you want, such as JSON. Cisco Spark is a collaborative tool similar to Slack.
  15. So your Application would be the API consumer, the request is GET /rooms and the Cisco Spark API is the API Provider. Then the return result is a HTTP 200 OK.
  16. This is a list of different HTTP routing methods you can use to make a request. Each of these “GET, POST, PUT, DELETE” are Verbs. Each Verb can make an action with a noun. GET --- Can get a list of items, or get an individual item id POST --- Creates an item PUT --- Updates an item DELETE – Delete’s an item
  17. A great API will have great documentation. If people cannot figure out how to use your API, then you will not have as many users as you were hoping for. The most popular API’s out there have very well written documentation. You could have the best API in the world, but if developers cannot figure out how to use it, they will find something else.
  18. As an example, I’m going to use Cisco Spark’s API Reference. So for each section in the API Reference, which are the Nouns, you can do 5 Verbs For People, you can create a person, get person details, update a person, delete a person, and get my own details. For Messages, you can List rooms, Create a Room, Get Room Details, Update a Room, and Delete a Room
  19. How do you know what kind of parameters you can use for each section of the API Reference? What can I do when I’m working with the section “MESSAGES”? This is the list of parameters you can use for the messages
  20. Okay, so what is an API?
  21. There are a lot of different ways you can debug or test your APIs. The one I use the most is POSTMAN, the GUI HTTP Client to test API Calls.
  22. Postman is a free tool to forge API Requests and examine responses. You can install it on a Mac as an app or install the Chrome plugin Postman. For Mozilla or Safari, you can install a plugin called RESTClient
  23. Using the Github API, you add the resource URL in the box next to where you select your method, which is the verb to use. Then you hit SEND and will receive a response http code. The HTML page contents are placed in the Body
  24. So hopefully you are ready to start programming with APIs!
  25. Questions?