SlideShare ist ein Scribd-Unternehmen logo
1 von 64
MadisonPHP Conference October 1st, 2016
Consuming Rest APIs
Follow me on Twitter and/or tweet at me. @tessamero
By Tessa Mero
Nom Nom: Consuming
Rest APIs
CONSUME THE REST APIS!
• Who Am I?
• WHAT ARE APIs
• Requests and Responses
• Intro to APIs
• Playing with Spark API
• Playing with Tropo API
• Taking Knowledge Home With You
Overview
@tessamero
• Developer Advocate
• Teacher/Mentor
• Previously Web Developer
• <3 Free & Open Source
• Community Leader for
Joomla and PHP
• Mother of 2
• I love APIs
• Addicted to Twitter
(@tessamero)
Who Am I?
Cisco DevNet? Why Am I Here?
• What is DevNet?
• What is the Purpose?
• Why do we go to programming
conferences?
• Not Selling Anything
• We Like Giving Out Swag
• We Like attention
@ciscodevnet
Why are API’s 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
Okay, What is an API?
Ready for a lot of
examples?
I’ll make it sound easy 
“It’s a way for two pieces of software to
talk to each other”
Application Programming Interface
The API is the User
Interface for software
systems
APIs are sets of
requirements that govern
how one application can talk
to another.
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
Presentation ID
-- Programmable Web
APIs are often referred to as “an engine of
innovation.”
REST API versus Web API
• No difference at all. It doesn’t give a different
output.
• HTTP implements methods.
• A REST interface simply sends request to server
Three Types of Web Services for Providing APIs
Remote Procedure Call (RPC) or XML-RPC
• Single URI
• Response is in a Structured Format
• Lacks Responses
Simple Object Access Protocol (SOAP)
• More powerful, preferred by software
vendors (MSFT,.NET,Java Entprse
Edition, etc)
• SOAP most used tool 2001-2007
Representational State Transfer (REST)
• Most popular web service
• Each unique URL is a representational of some object
• Easy to read results
• Light Weight – Not much XML markup
http://tiny.cc/webservices
Requests and Responses
View a Web Page
19Presentation ID
View a Web Page
20Presentation ID
Request
GET /index.htm HTTP/1.1
Response
HTTP 200 OK
<html>
REST APIs use Request and Response too
• 200 OK
• 301 Moved Permanently
• 302 Found
• 307 Temporary Redirect
• 400 Bad Request
• 403 Forbidden
Common HTTP Status Codes
• 404 Not Found
• 500 Internal Server
Error
• 550 Permission Denied
Using Cisco Spark API as a
Use Case. Of course =P
So how do you interact with
this API?
Get Data using an API
25Presentation ID
Get Data using an API
26Presentation ID
Request
GET /rooms
Response
HTTP 200 OK
{json data}
API Consumer API Provider
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!!!! =)
Test Your REST API Requests = FUN
method
url
request
headers
status code
response headers
content-type
response
body
query parameters
Now What? How Do You
Figure Out How To Use an
API?
One Word: Documentation
1. First, find the documentation page. If you cannot find it,
then that’s a problem.
2. Find the API Reference.
3. Figure out what you want to do.
4. Test your API request via Postman because it’s fun :P
Reviewing the Documentation
The API Reference!
API Reference: Rooms
Room Created!
PHPCruise Room
Created!
Whoa!!!!
You created a room, now
how do you post a message
to it through an API request?
1. Take Note of Key generated when you created a room,
so now your room has an ID.
2. Refer to documentation for Creating a Message
3. Test the API request.
4. Make Magic Happen.
Create Message API Request
Oh yeah, the documentation….
But what about request
parameters?
Oh yeah, the
documentation!
Create your request parameters in the body.
Feelin’ 200 OK
Oh my gosh I can’t see it what does it say?
One important thing to do
when you receive a 200 OK
HTTP Status:
(Please take note of this)
Alright I get it. Now show me
something else that’s cool!
How About…
Applications Interacting With
a Cell Phone?!
Introducing the Tropo API! IT’S SO MUCH FUNZ
What Can You Do With Tropo?
Create an Application:
Register (anyone can, free)
Click on “My Apps”
Click on “Create New App”
1. Create Name
2. Click on “Edit
Script” and give it
a name. This is:
textService.js
3. Add a Phone Number (Free for Dev)
4. Write some JavaScript
call("+14258791911", {
network:"SMS”
});
say("Don't forget your meeting at 2 p.m. on
Wednesday!");
5. LAUNCH IT!
You can put your token URL in the browser to
make a request and fire off your app
https://api.tropo.com/1.0/sessions?action=create&t
oken=6c7a56555271337716e76596b6266456254
566e4e625058657133776456d6d7a504f4b4b4133
7a71624c
Magic!
You can do it too!
• call();
• answer();
• _log();
• say();
• ask();
• record();
• Makes a call
• Answers the call (when called)
• Logs the info about the call
• Says something
• Says something in a question
• Records the call (like
voicemail), with certain
parameters, you can transcribe
caller input too!
Other Functions To Use
Easy? I know…
Spark Innovation Fund?
$1,000,000 x 150….
I like money too, trust me…
https://developer.ciscospark.com/fund/
Also, don’t forget to tweet at me @tessamero
Thank You
Nom Nom: Consuming REST APIs

Weitere ähnliche Inhalte

Was ist angesagt?

ExpressionEngine 2: Total Domination
ExpressionEngine 2: Total DominationExpressionEngine 2: Total Domination
ExpressionEngine 2: Total Dominationguestf9c0bc
 
Understanding REST APIs in 5 Simple Steps
Understanding REST APIs in 5 Simple StepsUnderstanding REST APIs in 5 Simple Steps
Understanding REST APIs in 5 Simple StepsTessa Mero
 
An Introduction To Automated API Testing
An Introduction To Automated API TestingAn Introduction To Automated API Testing
An Introduction To Automated API TestingSauce Labs
 
APIs explained for product managers
APIs explained for product managersAPIs explained for product managers
APIs explained for product managersRichard Holmes
 
Web API Test Automation using Frisby & Node.js
Web API Test Automation using Frisby  & Node.jsWeb API Test Automation using Frisby  & Node.js
Web API Test Automation using Frisby & Node.jsChi Lang Le Vu Tran
 
What Makes a Great Open API?
What Makes a Great Open API?What Makes a Great Open API?
What Makes a Great Open API?John Musser
 
Reasons To Automate API Testing Process
Reasons To Automate API Testing ProcessReasons To Automate API Testing Process
Reasons To Automate API Testing ProcessQASource
 
API Testing: The heart of functional testing" with Bj Rollison
API Testing: The heart of functional testing" with Bj RollisonAPI Testing: The heart of functional testing" with Bj Rollison
API Testing: The heart of functional testing" with Bj RollisonTEST Huddle
 
B4USolution_API-Testing
B4USolution_API-TestingB4USolution_API-Testing
B4USolution_API-Testingb4usolution .
 
Web font services: March 2011
Web font services: March 2011Web font services: March 2011
Web font services: March 2011RZasadzinski
 
API Testing: Answers to Your Top 3 Questions
API Testing: Answers to Your Top 3 QuestionsAPI Testing: Answers to Your Top 3 Questions
API Testing: Answers to Your Top 3 QuestionsQASource
 
Facebook & Twitter API
Facebook & Twitter APIFacebook & Twitter API
Facebook & Twitter APIFabrice Delhoste
 
API 101 - Understanding APIs
API 101 - Understanding APIsAPI 101 - Understanding APIs
API 101 - Understanding APIs3scale
 
Super powered API testing
Super powered API testing Super powered API testing
Super powered API testing postmanclient
 
Postman Introduction
Postman IntroductionPostman Introduction
Postman IntroductionRahul Agarwal
 
Exploring new horizons with Talis Aspire APIs - Tim Hodson | Talis Insight Eu...
Exploring new horizons with Talis Aspire APIs - Tim Hodson | Talis Insight Eu...Exploring new horizons with Talis Aspire APIs - Tim Hodson | Talis Insight Eu...
Exploring new horizons with Talis Aspire APIs - Tim Hodson | Talis Insight Eu...Talis
 

Was ist angesagt? (20)

ExpressionEngine 2: Total Domination
ExpressionEngine 2: Total DominationExpressionEngine 2: Total Domination
ExpressionEngine 2: Total Domination
 
Understanding REST APIs in 5 Simple Steps
Understanding REST APIs in 5 Simple StepsUnderstanding REST APIs in 5 Simple Steps
Understanding REST APIs in 5 Simple Steps
 
An Introduction To Automated API Testing
An Introduction To Automated API TestingAn Introduction To Automated API Testing
An Introduction To Automated API Testing
 
API for Beginners
API for BeginnersAPI for Beginners
API for Beginners
 
APIs explained for product managers
APIs explained for product managersAPIs explained for product managers
APIs explained for product managers
 
Web API Test Automation using Frisby & Node.js
Web API Test Automation using Frisby  & Node.jsWeb API Test Automation using Frisby  & Node.js
Web API Test Automation using Frisby & Node.js
 
What Makes a Great Open API?
What Makes a Great Open API?What Makes a Great Open API?
What Makes a Great Open API?
 
Reasons To Automate API Testing Process
Reasons To Automate API Testing ProcessReasons To Automate API Testing Process
Reasons To Automate API Testing Process
 
API Testing: The heart of functional testing" with Bj Rollison
API Testing: The heart of functional testing" with Bj RollisonAPI Testing: The heart of functional testing" with Bj Rollison
API Testing: The heart of functional testing" with Bj Rollison
 
B4USolution_API-Testing
B4USolution_API-TestingB4USolution_API-Testing
B4USolution_API-Testing
 
Api testing
Api testingApi testing
Api testing
 
Web font services: March 2011
Web font services: March 2011Web font services: March 2011
Web font services: March 2011
 
API Testing: Answers to Your Top 3 Questions
API Testing: Answers to Your Top 3 QuestionsAPI Testing: Answers to Your Top 3 Questions
API Testing: Answers to Your Top 3 Questions
 
Facebook & Twitter API
Facebook & Twitter APIFacebook & Twitter API
Facebook & Twitter API
 
API 101 - Understanding APIs
API 101 - Understanding APIsAPI 101 - Understanding APIs
API 101 - Understanding APIs
 
Ektron
EktronEktron
Ektron
 
What's new in Rails 4.1
What's new in Rails 4.1What's new in Rails 4.1
What's new in Rails 4.1
 
Super powered API testing
Super powered API testing Super powered API testing
Super powered API testing
 
Postman Introduction
Postman IntroductionPostman Introduction
Postman Introduction
 
Exploring new horizons with Talis Aspire APIs - Tim Hodson | Talis Insight Eu...
Exploring new horizons with Talis Aspire APIs - Tim Hodson | Talis Insight Eu...Exploring new horizons with Talis Aspire APIs - Tim Hodson | Talis Insight Eu...
Exploring new horizons with Talis Aspire APIs - Tim Hodson | Talis Insight Eu...
 

Andere mochten auch

Getting started with flexbox
Getting started with flexboxGetting started with flexbox
Getting started with flexboxAdrian Sandu
 
ESSA Overview
ESSA OverviewESSA Overview
ESSA OverviewAccelify
 
How to create discussion topics for your facebook group (Infographic)
How to create discussion topics for your facebook group (Infographic)How to create discussion topics for your facebook group (Infographic)
How to create discussion topics for your facebook group (Infographic)StĂŠphane Baudin
 
Most Profitable Marketing for Your Business - Content Marketing
Most Profitable Marketing for Your Business - Content MarketingMost Profitable Marketing for Your Business - Content Marketing
Most Profitable Marketing for Your Business - Content MarketingNalini Kher
 
CAIS Business Professionals Conference Program
CAIS Business Professionals Conference ProgramCAIS Business Professionals Conference Program
CAIS Business Professionals Conference ProgramJim Parke, CPA, CA
 
The 4th revolution, Luciano Floridi - book review
The 4th revolution, Luciano Floridi - book review  The 4th revolution, Luciano Floridi - book review
The 4th revolution, Luciano Floridi - book review Eddy J. Schuermans
 
Exceptions are inevitable. But does your struggle against them have to be?
Exceptions are inevitable. But does your struggle against them have to be?Exceptions are inevitable. But does your struggle against them have to be?
Exceptions are inevitable. But does your struggle against them have to be?sharedserviceslink.com
 
But what about old browsers?
But what about old browsers?But what about old browsers?
But what about old browsers?Rachel Andrew
 
Het netwerkeffect - ondernemen in tijden van disruptie
Het netwerkeffect - ondernemen in tijden van disruptieHet netwerkeffect - ondernemen in tijden van disruptie
Het netwerkeffect - ondernemen in tijden van disruptieETION
 
Behavior driven development - Deliver Value by Collaboration
Behavior driven development - Deliver Value by CollaborationBehavior driven development - Deliver Value by Collaboration
Behavior driven development - Deliver Value by CollaborationNaveen Kumar Singh
 
Practical Malware Analysis: Ch 5: IDA Pro
Practical Malware Analysis: Ch 5: IDA ProPractical Malware Analysis: Ch 5: IDA Pro
Practical Malware Analysis: Ch 5: IDA ProSam Bowne
 
Ch 8: Desktop and Server OS Vulnerabilites
Ch 8: Desktop and Server OS VulnerabilitesCh 8: Desktop and Server OS Vulnerabilites
Ch 8: Desktop and Server OS VulnerabilitesSam Bowne
 
Actividades u1 arte griego
Actividades u1 arte griegoActividades u1 arte griego
Actividades u1 arte griegoEva Tomlinson
 

Andere mochten auch (15)

Getting started with flexbox
Getting started with flexboxGetting started with flexbox
Getting started with flexbox
 
F y bcom 2
F y bcom 2F y bcom 2
F y bcom 2
 
ESSA Overview
ESSA OverviewESSA Overview
ESSA Overview
 
How to create discussion topics for your facebook group (Infographic)
How to create discussion topics for your facebook group (Infographic)How to create discussion topics for your facebook group (Infographic)
How to create discussion topics for your facebook group (Infographic)
 
Most Profitable Marketing for Your Business - Content Marketing
Most Profitable Marketing for Your Business - Content MarketingMost Profitable Marketing for Your Business - Content Marketing
Most Profitable Marketing for Your Business - Content Marketing
 
PresentaciĂłn redcolsi
PresentaciĂłn redcolsiPresentaciĂłn redcolsi
PresentaciĂłn redcolsi
 
CAIS Business Professionals Conference Program
CAIS Business Professionals Conference ProgramCAIS Business Professionals Conference Program
CAIS Business Professionals Conference Program
 
The 4th revolution, Luciano Floridi - book review
The 4th revolution, Luciano Floridi - book review  The 4th revolution, Luciano Floridi - book review
The 4th revolution, Luciano Floridi - book review
 
Exceptions are inevitable. But does your struggle against them have to be?
Exceptions are inevitable. But does your struggle against them have to be?Exceptions are inevitable. But does your struggle against them have to be?
Exceptions are inevitable. But does your struggle against them have to be?
 
But what about old browsers?
But what about old browsers?But what about old browsers?
But what about old browsers?
 
Het netwerkeffect - ondernemen in tijden van disruptie
Het netwerkeffect - ondernemen in tijden van disruptieHet netwerkeffect - ondernemen in tijden van disruptie
Het netwerkeffect - ondernemen in tijden van disruptie
 
Behavior driven development - Deliver Value by Collaboration
Behavior driven development - Deliver Value by CollaborationBehavior driven development - Deliver Value by Collaboration
Behavior driven development - Deliver Value by Collaboration
 
Practical Malware Analysis: Ch 5: IDA Pro
Practical Malware Analysis: Ch 5: IDA ProPractical Malware Analysis: Ch 5: IDA Pro
Practical Malware Analysis: Ch 5: IDA Pro
 
Ch 8: Desktop and Server OS Vulnerabilites
Ch 8: Desktop and Server OS VulnerabilitesCh 8: Desktop and Server OS Vulnerabilites
Ch 8: Desktop and Server OS Vulnerabilites
 
Actividades u1 arte griego
Actividades u1 arte griegoActividades u1 arte griego
Actividades u1 arte griego
 

Ähnlich wie Nom Nom: Consuming REST APIs

Nom Nom: Consuming REST APIs
Nom Nom: Consuming REST APIsNom Nom: Consuming REST APIs
Nom Nom: Consuming REST APIsTessa Mero
 
Understanding REST APIs in 5 Simple Steps
Understanding REST APIs in 5 Simple StepsUnderstanding REST APIs in 5 Simple Steps
Understanding REST APIs in 5 Simple StepsTessa Mero
 
Building A Great API - Evan Cooke, Cloudstock, December 2010
Building A Great API - Evan Cooke, Cloudstock, December 2010Building A Great API - Evan Cooke, Cloudstock, December 2010
Building A Great API - Evan Cooke, Cloudstock, December 2010Twilio Inc
 
Flickr Services
Flickr ServicesFlickr Services
Flickr Servicesroyans
 
Flickr Services
Flickr ServicesFlickr Services
Flickr Servicesroyans
 
Api fundamentals
Api fundamentalsApi fundamentals
Api fundamentalsAgileDenver
 
Understanding APIs.pptx introduction chk
Understanding APIs.pptx introduction chkUnderstanding APIs.pptx introduction chk
Understanding APIs.pptx introduction chknooreen nayyar syeda
 
Building a Great Web API - Evan Cooke - QCON 2011
Building a Great Web API - Evan Cooke - QCON 2011Building a Great Web API - Evan Cooke - QCON 2011
Building a Great Web API - Evan Cooke - QCON 2011Twilio Inc
 
Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017JoEllen Carter
 
Web APIs: The future of software
Web APIs: The future of softwareWeb APIs: The future of software
Web APIs: The future of softwareReuven Lerner
 
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 APILaunchAny
 
api_slides.pptx
api_slides.pptxapi_slides.pptx
api_slides.pptxadewad
 
Coding 100-session-slides
Coding 100-session-slidesCoding 100-session-slides
Coding 100-session-slidesCisco DevNet
 
Making Hacker’s Life Easier at Hackathons (3scale at Barcelona MusicHackDays)
Making Hacker’s Life Easier at Hackathons (3scale at Barcelona MusicHackDays)Making Hacker’s Life Easier at Hackathons (3scale at Barcelona MusicHackDays)
Making Hacker’s Life Easier at Hackathons (3scale at Barcelona MusicHackDays)3scale
 
API Documentation.pptx
API Documentation.pptxAPI Documentation.pptx
API Documentation.pptxRahulCR31
 
API Documentation.pptx
API Documentation.pptxAPI Documentation.pptx
API Documentation.pptxRahulCR31
 
Building a REST API Interface With FME
Building a REST API Interface With FMEBuilding a REST API Interface With FME
Building a REST API Interface With FMESafe Software
 
Moving into API documentation writing
Moving into API documentation writingMoving into API documentation writing
Moving into API documentation writingEllis Pratt
 
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.pptxBlockchainizator
 

Ähnlich wie Nom Nom: Consuming REST APIs (20)

Nom Nom: Consuming REST APIs
Nom Nom: Consuming REST APIsNom Nom: Consuming REST APIs
Nom Nom: Consuming REST APIs
 
Understanding REST APIs in 5 Simple Steps
Understanding REST APIs in 5 Simple StepsUnderstanding REST APIs in 5 Simple Steps
Understanding REST APIs in 5 Simple Steps
 
Building A Great API - Evan Cooke, Cloudstock, December 2010
Building A Great API - Evan Cooke, Cloudstock, December 2010Building A Great API - Evan Cooke, Cloudstock, December 2010
Building A Great API - Evan Cooke, Cloudstock, December 2010
 
Flickr Services
Flickr ServicesFlickr Services
Flickr Services
 
Flickr Services
Flickr ServicesFlickr Services
Flickr Services
 
Api fundamentals
Api fundamentalsApi fundamentals
Api fundamentals
 
Understanding APIs.pptx
Understanding APIs.pptxUnderstanding APIs.pptx
Understanding APIs.pptx
 
Understanding APIs.pptx introduction chk
Understanding APIs.pptx introduction chkUnderstanding APIs.pptx introduction chk
Understanding APIs.pptx introduction chk
 
Building a Great Web API - Evan Cooke - QCON 2011
Building a Great Web API - Evan Cooke - QCON 2011Building a Great Web API - Evan Cooke - QCON 2011
Building a Great Web API - Evan Cooke - QCON 2011
 
Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017
 
Web APIs: The future of software
Web APIs: The future of softwareWeb APIs: The future of software
Web APIs: The future of software
 
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
 
api_slides.pptx
api_slides.pptxapi_slides.pptx
api_slides.pptx
 
Coding 100-session-slides
Coding 100-session-slidesCoding 100-session-slides
Coding 100-session-slides
 
Making Hacker’s Life Easier at Hackathons (3scale at Barcelona MusicHackDays)
Making Hacker’s Life Easier at Hackathons (3scale at Barcelona MusicHackDays)Making Hacker’s Life Easier at Hackathons (3scale at Barcelona MusicHackDays)
Making Hacker’s Life Easier at Hackathons (3scale at Barcelona MusicHackDays)
 
API Documentation.pptx
API Documentation.pptxAPI Documentation.pptx
API Documentation.pptx
 
API Documentation.pptx
API Documentation.pptxAPI Documentation.pptx
API Documentation.pptx
 
Building a REST API Interface With FME
Building a REST API Interface With FMEBuilding a REST API Interface With FME
Building a REST API Interface With FME
 
Moving into API documentation writing
Moving into API documentation writingMoving into API documentation writing
Moving into API documentation writing
 
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
 

Mehr von Tessa Mero

Developer relations KPIs
Developer relations KPIsDeveloper relations KPIs
Developer relations KPIsTessa Mero
 
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 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 appTessa Mero
 
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?Tessa Mero
 
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 cloudinaryTessa Mero
 
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 careerTessa Mero
 
Finding the Jelly in the JAMstack
Finding the Jelly in the JAMstackFinding the Jelly in the JAMstack
Finding the Jelly in the JAMstackTessa Mero
 
Building APIs the serverless way
Building APIs the serverless wayBuilding APIs the serverless way
Building APIs the serverless wayTessa Mero
 
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 jobTessa Mero
 
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 stackTessa 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 2018Tessa Mero
 
ChatOps Workshop
ChatOps WorkshopChatOps Workshop
ChatOps WorkshopTessa Mero
 
Cisco CMX Location Services
Cisco CMX Location ServicesCisco CMX Location Services
Cisco CMX Location ServicesTessa Mero
 
DeveloperWeek2018 - Let's Build a Chatbot
DeveloperWeek2018 - Let's Build a ChatbotDeveloperWeek2018 - Let's Build a Chatbot
DeveloperWeek2018 - Let's Build a ChatbotTessa Mero
 
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 AdventuresTessa Mero
 
Revolutionize Your Workflow with ChatOps
Revolutionize Your Workflow with ChatOpsRevolutionize Your Workflow with ChatOps
Revolutionize Your Workflow with ChatOpsTessa Mero
 
Let's Build a Chatbot
Let's Build a ChatbotLet's Build a Chatbot
Let's Build a ChatbotTessa Mero
 
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 WorkshopTessa Mero
 
Chatbots
ChatbotsChatbots
ChatbotsTessa Mero
 
Building Chatbots
Building ChatbotsBuilding Chatbots
Building ChatbotsTessa Mero
 

Mehr von 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
 

KĂźrzlich hochgeladen

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
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].pdfOverkill Security
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
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 Takeoffsammart93
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
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...Orbitshub
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
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.pdfsudhanshuwaghmare1
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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.pdfOrbitshub
 

KĂźrzlich hochgeladen (20)

+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...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
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...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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
 

Nom Nom: Consuming REST APIs

  • 1. MadisonPHP Conference October 1st, 2016 Consuming Rest APIs Follow me on Twitter and/or tweet at me. @tessamero By Tessa Mero Nom Nom: Consuming Rest APIs
  • 3. • Who Am I? • WHAT ARE APIs • Requests and Responses • Intro to APIs • Playing with Spark API • Playing with Tropo API • Taking Knowledge Home With You Overview @tessamero
  • 4. • Developer Advocate • Teacher/Mentor • Previously Web Developer • <3 Free & Open Source • Community Leader for Joomla and PHP • Mother of 2 • I love APIs • Addicted to Twitter (@tessamero) Who Am I?
  • 5. Cisco DevNet? Why Am I Here? • What is DevNet? • What is the Purpose? • Why do we go to programming conferences? • Not Selling Anything • We Like Giving Out Swag • We Like attention @ciscodevnet
  • 6. Why are API’s so important?
  • 7. 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
  • 8. Okay, What is an API?
  • 9. Ready for a lot of examples? I’ll make it sound easy 
  • 10. “It’s a way for two pieces of software to talk to each other” Application Programming Interface
  • 11. The API is the User Interface for software systems
  • 12. APIs are sets of requirements that govern how one application can talk to another.
  • 13. 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.
  • 14. 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
  • 15. Presentation ID -- Programmable Web APIs are often referred to as “an engine of innovation.”
  • 16. REST API versus Web API • No difference at all. It doesn’t give a different output. • HTTP implements methods. • A REST interface simply sends request to server
  • 17. Three Types of Web Services for Providing APIs Remote Procedure Call (RPC) or XML-RPC • Single URI • Response is in a Structured Format • Lacks Responses Simple Object Access Protocol (SOAP) • More powerful, preferred by software vendors (MSFT,.NET,Java Entprse Edition, etc) • SOAP most used tool 2001-2007 Representational State Transfer (REST) • Most popular web service • Each unique URL is a representational of some object • Easy to read results • Light Weight – Not much XML markup http://tiny.cc/webservices
  • 19. View a Web Page 19Presentation ID
  • 20. View a Web Page 20Presentation ID Request GET /index.htm HTTP/1.1 Response HTTP 200 OK <html>
  • 21. REST APIs use Request and Response too
  • 22. • 200 OK • 301 Moved Permanently • 302 Found • 307 Temporary Redirect • 400 Bad Request • 403 Forbidden Common HTTP Status Codes • 404 Not Found • 500 Internal Server Error • 550 Permission Denied
  • 23. Using Cisco Spark API as a Use Case. Of course =P
  • 24. So how do you interact with this API?
  • 25. Get Data using an API 25Presentation ID
  • 26. Get Data using an API 26Presentation ID Request GET /rooms Response HTTP 200 OK {json data} API Consumer API Provider
  • 27.
  • 28. 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...)
  • 30. Test Your REST API Requests = FUN
  • 32. Now What? How Do You Figure Out How To Use an API?
  • 34. 1. First, find the documentation page. If you cannot find it, then that’s a problem. 2. Find the API Reference. 3. Figure out what you want to do. 4. Test your API request via Postman because it’s fun :P Reviewing the Documentation
  • 39. You created a room, now how do you post a message to it through an API request?
  • 40. 1. Take Note of Key generated when you created a room, so now your room has an ID. 2. Refer to documentation for Creating a Message 3. Test the API request. 4. Make Magic Happen. Create Message API Request
  • 41. Oh yeah, the documentation….
  • 42. But what about request parameters?
  • 44. Create your request parameters in the body. Feelin’ 200 OK Oh my gosh I can’t see it what does it say?
  • 45. One important thing to do when you receive a 200 OK HTTP Status: (Please take note of this)
  • 46.
  • 47. Alright I get it. Now show me something else that’s cool!
  • 49. Introducing the Tropo API! IT’S SO MUCH FUNZ
  • 50. What Can You Do With Tropo?
  • 51. Create an Application: Register (anyone can, free) Click on “My Apps” Click on “Create New App”
  • 52. 1. Create Name 2. Click on “Edit Script” and give it a name. This is: textService.js
  • 53. 3. Add a Phone Number (Free for Dev)
  • 54. 4. Write some JavaScript call("+14258791911", { network:"SMS” }); say("Don't forget your meeting at 2 p.m. on Wednesday!");
  • 55. 5. LAUNCH IT! You can put your token URL in the browser to make a request and fire off your app https://api.tropo.com/1.0/sessions?action=create&t oken=6c7a56555271337716e76596b6266456254 566e4e625058657133776456d6d7a504f4b4b4133 7a71624c
  • 57. You can do it too!
  • 58. • call(); • answer(); • _log(); • say(); • ask(); • record(); • Makes a call • Answers the call (when called) • Logs the info about the call • Says something • Says something in a question • Records the call (like voicemail), with certain parameters, you can transcribe caller input too! Other Functions To Use
  • 62. I like money too, trust me… https://developer.ciscospark.com/fund/ Also, don’t forget to tweet at me @tessamero

Hinweis der Redaktion

  1. Hello Everyone! My name is Tessa Mero. I want to give a huge Thank You to the conference organizers for putting together this amazing event and allowing me to have the opportunity to speak to you. I also want to thank the Brazilian JavaScript community for being so welcoming here! You can Tweet at me during the session @tessamero
  2. The act of Consuming a Rest API means to eat it all up, so in context it means to eat it, swallow it up, and digest it leaving any others in the pile exposed. So it basically just means to use an API.
  3. Here is an overview of what I’ll be going over.
  4. I am a Developer Advocate for Cisco DevNet. DevNet is the Developer Department for Cisco. I’ve recently started this job earlier this year and I love it. Developer Advocates reach out to developers and bring awareness to our products, such as our APIs. That’s why I’m always talking about APIs  My previous job was teaching Web Application Development at a College for many years, including JavaScript and PHP courses. I also have a degree in web development as well. I’m always a teacher at heart, so I’ve always made myself available to mentor developers to help them become successful. I am obsessed with Free & Open Source Communities. I’ve been speaking at Joomla and PHP conferences for many years. I also run several developer meetups and a conference in Seattle, which is in the US. I have 2 children. I have a son named Jayden who is 7 years old. I also have a daughter named Emma who is 5 years old. They drive me crazy. I’m kidding, they are the most wonderful kids ever and they are my motivation to do everything that I do today.
  5. What is DevNet? DevNet is a developer program created 2 years ago. Cisco decided it was time to turn the company from a network company to a software and services company. Our purpose is to create APIs and software to help our partners and customers have better products. We go to programming events and all types of conferences to help promote that we are not a network company. I’m not here to sell anything as we focus on selling internally and to partners and customers. We love giving out swag at events. I didn’t feel like bringing an extra suitcase today, so no swag.  We absolutely love getting attention on @CiscoDevNet. A wonderful colleague of mine is amazing at her social media work on all of our DevNet accounts. She gets excited when you tweet at her. Even more excited if you ask for stickers!
  6. 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. To have the software all work together is becoming a more important thing for both synergy and financial reasons and is making tasks much easier for work processes. They can also create their own tool to enhance their software, making their customers happier.
  7. As you can see that the amount of API’s out there started with 1 API in 2000 (Ebay) and has exponentially increased over time. In 2016, there has been more than 50 million API requests made and 30,000 available API’s out there. From 2015 to 2016, it has doubled in growth from 15,000 to 30,000 and only exponentially increasing.
  8. Okay, so what is an API?
  9. Ready for a lot of examples? I’ll make it sound easy 
  10. An API stands for Application Programming Interface It’s a way for two pieces of software to talk to each other.
  11. Which brings me to saying that the API is the User Interface for software systems.
  12. APIs are sets of requirements that govern how one application can talk to another.
  13. An API is best thought of as a contract provided by one piece of computer software to another.
  14. I will use Yelp as an example. Yelp displays nearby restaurants using the Google Map API by “exposing” some of the program’s internal functions to the outside world in a limited fashion. This makes it possible for applications to share data without requiring developers to share all of their code. APIs simplify all of that by limiting outside program access to a specific set of features by allowing them to request data. Think of it as doors or windows, or even levers. APIs make it possible to use a mix and match of APIs, such as Google API, Facebook API, or Twitter API, and make an entire new app and service. The widespread of API’s for major services is what made the modern web experience possible today.
  15. APIs are often referred to as “an engine of innovation” Because of API, there are so many cool applications out there that wouldn’t exist no.
  16. REST API versus Web API, if you’ve heard the two terms before. REST describes a way of interacting with a HTTP server. Not what the server should return in response. HTTP implements methods (which is also known as verbs) other than GET or POST. It also implements HEAD, which is without the response body, and PUT and DELETE, which I’ll go over a little later. A REST interface simply makes use of these additional verbs to convey the meaning of the request to the server.
  17. Web services are set of platform independent exposed APIs(functions) which can be used used from remote server over the Internet. So there are 3 different types of web services for providing APIs. The first one is called Remote Procedure Call (RPC). It uses a single URI and gives the responses in a structured format, but lacks the amount of responses it can give out, especially compared to REST. Simple Object Access Protocol (SOAP) is more powerful and preferred by software vendors like Microsoft,.NET, Java Enterprise Edition, and that sort of thing. SOAP is the most used tool and the preferred tool between 2001-2007. Representational State Transfer (REST) is what I’ll be going over since it is the most popular web service to use. Each unique URL is a representational of some object, hence where the acronym REST came from. The results are human readable, and it’s also much light weight compared to other web services. You can find more in depth information about all 3 on tiny.cc/webservices.
  18. Next we will go over web pages, requests, responses, and REST APIs
  19. 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.
  20. 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.
  21. This is exactly what is happening between your app and their app between an API
  22. Here are some common HTTP status codes that you will get when you request a web page. When you make a request with an API, you also get a response back with a status code. Usually you will be hoping for 200 OK.
  23. Using Cisco Spark API as a use case, of course. To understand a specific API, you must know what the application actually does. Cisco Spark is a collaboration tool, similar to Slack or Glip, that allows you to chat, have meetings, and video chat. Spark is designed to be a very light weight option so developers can customize it to their company needs. We are releasing an app marketplace of free plugins so people can download Spark and install plugins that they will actually use, rather than have a tool that has more features than you actually need.
  24. So how do you interact with this particular API? Well, there are methods you can make to request data.
  25. 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 or XML, which are the 2 most popular. Don’t ask which is better to use, since they both have their pros and cons. It really depends on what you are doing in your application.
  26. 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.
  27. This is a list of different HTTP routing methods you can use to make a request. 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 So how do we test these API requests to check if it works first?
  28. When you are working with APIs, you will commonly have API problems that you need to solve. There are a kazillion tools out there. There’s a website that lists out 60 tools you can use to solve your problems, (note: not mental problems), and you can find it at tiny.cc/60tools Webhook Debugging (RequestBin formerly requestbin.org…) – Inspect requests Webhook Utilities (Torpio…) – Webhook Delivery Platform. BAM! Local Tunneling (ngrok…) – Tunnel to Localhost, weeeeeeeeeeeee API Monitoring (Runscope…) – API monitoring/testing, chained requests/oauth sup. Response Mocking (mocky.io...) – Mock API response, duh! JSON Utilities (JSONFormat...) – Make URL very pretty! OAUTH Utilities (oauth.io...) – Integrate Oauth EZ Peezy! API Directories (APIS.io, ProgrammableWeb...) – Directory of... Ummmm... API Testing (Runscope Radar...) – Test in cloud (not real cloud). Email/Webhook notification for when you’re a failure and suck at APIs Load Testing (loader.io...) – Test with thousands of concurrent connections. Because scaling is important. GUI HTTP Clients (POSTMAN...) – An interface for creating and testing requests and what we are going to go over next!
  29. This is where POSTMAN comes in handy.
  30. I’ll show you how to work with REST API Calls. First, install the Chrome plugin Postman, or you can install it as an individual app on the Mac. It’s a free tool to forge API Requests and examine responses. For Mozilla or Safari, you can install a plugin called RESTClient
  31. Let’s understand how Postman is working with the Github API here. Let’s create an HTTP request to github.com Leave the GET method as is. Enter the URL of the resource. Press the Send button Postman issues the HTTP call on your behalf, and shows the response by the Github API: Here it shows the response is 200 OK towards the bottom right. The HTML page contents are placed in the Body
  32. Now What? How do you figure out how to use an API?
  33. 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.
  34. For Reviewing the Documentation… To start learning a new API, you first find the documentation page. You find the API reference and figure out what you want to do. Then you test your API request via Postman because it is fun!
  35. I want to first create a room in Spark and test it through POSTMAN.
  36. Here’s a closer look at the API reference for Rooms. You can List Rooms, Create a Room, Get Room Details, Update a Room, and Delete a Room.
  37. In this example, I created a title of a room called “PHPCruise Room”. I knew to use title because of the API documentation.
  38. After clicking on Submit, I opened up my Cisco Spark. There is now a new room called ”PHPCruise Room” that I created in POSTMAN from an API Call.
  39. You created a room, now how do you post a message to it through an API Request?
  40. To create a message API request you will need to take note of the key generated for the room you created which is your roomID. Refer to the documentation for creating a message. Test the API Request, which makes magic happen.
  41. So what do we do next? Oh right, we go back to the documentation to find out what HTTP request to make to create a message. Looks like it is the 2nd one here, so we will use the method POST.
  42. But what about request parameters?
  43. Oh right, that documentation stuff again. This is the list of parameters you can use for the messages Let’s use roomId and text as an easy example to demonstrate.
  44. Add the JSON data of the roomId and text to the body. The roomId is what you received when creating a room. The text is the message you want. You click Send and it will now post a message to your room. Go ahead and try it when you get home. It’s very easy!
  45. There is one important thing you need to do when you receive a 200 OK HTTP Status. Please take note of this.
  46. You do a dance!
  47. Alright I get it. Now show me something else that’s cool!
  48. How about… applications interacting with a cell phone?
  49. Tropo is a voice/SMS API that compares to Twilio. It was acquired by Cisco over a year ago. You can find the website at tropo.com.
  50. You can build really cool applications that interact with your phone, or use the Tropo API as an integration to your software. This is my favorite one to show people because developers seem very excited that this could help improve their software.
  51. I’ll quickly go over how you can create your first application and use the Tropo API. It can literally take you less than 5 minutes even without developer experience. First, of course, you’d have to create an account on tropo.com
  52. First you give your App a name. In this one I give it “Tessa’s Texting Service”. Leave it at default for Development as the App Status, so it is free to use. Edit your Script and create a name, such as textService.js.
  53. You can select a Country, such as Brazil, and select which Region in the country and click Add.
  54. Here would be the JavaScript that you would write to send a text message. Replace my phone number with yours of course. To allow SMS to work on your application, you would need to put in a support ticket to get your account activated for it. I could also do it for you on my end and activate your account.
  55. You can launch your app by using a token URL into the browser to make a request and fire off your application. Simply add a question mark after the method call and before putting in the query parameters. Each query parameter is separated by an & sign.
  56. Magic? I know right? The phone number above is my apps phone number that sent my phone a text message.
  57. You can do it too! It’s that easy. And you may experience this with most API’s with great documentation!
  58. Here are the most used functions with the Tropo API. You can make calls, answer, log information about a call, say something, ask a question, and record. You can even do speech to text.
  59. Easy? I know…
  60. The Spark Innovation Fund is a budget that was given to my department where we pay developers to create a startup that we will fund. The startup that you build stays under your name or your business name. We want to market our APIs and drive our developer ecosystem. This will only benefit you.
  61. Our budget we were given is 150 Million USD Dollars.
  62. You can learn more about it at developer.ciscospark.com/fund. Also, don’t forget to tweet at me @tessamero
  63. So, I hope you you feel highly consumed and full from this API talk. If you are new to APIs and need help getting started, or simply want to try out our Cisco APIs, please do not hesitate to contact me. THANK YOU!