(Go: >> BACK << -|- >> HOME <<)

SlideShare a Scribd company logo
ZendCon Conference October 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

More Related Content

What's hot

Firefox OS Workshop @ Serbia & Montenegro - Training
Firefox OS Workshop @ Serbia & Montenegro - TrainingFirefox OS Workshop @ Serbia & Montenegro - Training
Firefox OS Workshop @ Serbia & Montenegro - Training
Jan Jongboom
 
The Works 2018 - Software Track - Development 101: Build Using API and Overvi...
The Works 2018 - Software Track - Development 101: Build Using API and Overvi...The Works 2018 - Software Track - Development 101: Build Using API and Overvi...
The Works 2018 - Software Track - Development 101: Build Using API and Overvi...
David Dourgarian
 
Php Development Stack
Php Development StackPhp Development Stack
Php Development Stack
Bipin Upadhyay
 
Techical Workflow for a Startup
Techical Workflow for a StartupTechical Workflow for a Startup
Techical Workflow for a Startup
Sébastien Saunier
 
Build APIs With Kapow Mashup Server
Build APIs With Kapow Mashup ServerBuild APIs With Kapow Mashup Server
Build APIs With Kapow Mashup Server
Andreas Krohn
 
Publishing API documentation -- Presentation
Publishing API documentation -- PresentationPublishing API documentation -- Presentation
Publishing API documentation -- Presentation
Tom Johnson
 
Building a mini-theme with WordPress REST API
Building a mini-theme with WordPress REST APIBuilding a mini-theme with WordPress REST API
Building a mini-theme with WordPress REST API
Anthony Montalbano
 
LINE developers site the tech behind the docs
LINE developers site the tech behind the docsLINE developers site the tech behind the docs
LINE developers site the tech behind the docs
LINE Corporation
 
[Phpcamp]Shindig An OpenSocial container
[Phpcamp]Shindig An OpenSocial container[Phpcamp]Shindig An OpenSocial container
[Phpcamp]Shindig An OpenSocial container
Bipin Upadhyay
 
Php Camp Open Social
Php Camp  Open SocialPhp Camp  Open Social
Php Camp Open Social
Bipin Upadhyay
 
Documenting REST APIs
Documenting REST APIsDocumenting REST APIs
Documenting REST APIs
Tom Johnson
 
STC Summit 2015: API Documentation, an Example-Based Approach
STC Summit 2015: API Documentation, an Example-Based ApproachSTC Summit 2015: API Documentation, an Example-Based Approach
STC Summit 2015: API Documentation, an Example-Based Approach
Lois Patterson
 
WDI-Poject-4-README
WDI-Poject-4-READMEWDI-Poject-4-README
WDI-Poject-4-README
Benedict Green
 
Lecture 2: ES6 / ES2015 Slide
Lecture 2: ES6 / ES2015 SlideLecture 2: ES6 / ES2015 Slide
Lecture 2: ES6 / ES2015 Slide
Kobkrit Viriyayudhakorn
 
Publishing API documentation -- Workshop
Publishing API documentation -- WorkshopPublishing API documentation -- Workshop
Publishing API documentation -- Workshop
Tom Johnson
 
WordPress Rest API
WordPress Rest APIWordPress Rest API
WordPress Rest API
Brian Layman
 
REST full API Design
REST full API DesignREST full API Design
REST full API Design
Christian Guenther
 
Postman Galaxy Tour - Keynote Presentation
Postman Galaxy Tour - Keynote PresentationPostman Galaxy Tour - Keynote Presentation
Postman Galaxy Tour - Keynote Presentation
Postman
 
How Le Wagon uses Trello
How Le Wagon uses TrelloHow Le Wagon uses Trello
How Le Wagon uses Trello
Sébastien Saunier
 
How to create OpenSocial Apps in 45 minutes
How to create OpenSocial Apps in 45 minutesHow to create OpenSocial Apps in 45 minutes
How to create OpenSocial Apps in 45 minutes
Bastian Hofmann
 

What's hot (20)

Firefox OS Workshop @ Serbia & Montenegro - Training
Firefox OS Workshop @ Serbia & Montenegro - TrainingFirefox OS Workshop @ Serbia & Montenegro - Training
Firefox OS Workshop @ Serbia & Montenegro - Training
 
The Works 2018 - Software Track - Development 101: Build Using API and Overvi...
The Works 2018 - Software Track - Development 101: Build Using API and Overvi...The Works 2018 - Software Track - Development 101: Build Using API and Overvi...
The Works 2018 - Software Track - Development 101: Build Using API and Overvi...
 
Php Development Stack
Php Development StackPhp Development Stack
Php Development Stack
 
Techical Workflow for a Startup
Techical Workflow for a StartupTechical Workflow for a Startup
Techical Workflow for a Startup
 
Build APIs With Kapow Mashup Server
Build APIs With Kapow Mashup ServerBuild APIs With Kapow Mashup Server
Build APIs With Kapow Mashup Server
 
Publishing API documentation -- Presentation
Publishing API documentation -- PresentationPublishing API documentation -- Presentation
Publishing API documentation -- Presentation
 
Building a mini-theme with WordPress REST API
Building a mini-theme with WordPress REST APIBuilding a mini-theme with WordPress REST API
Building a mini-theme with WordPress REST API
 
LINE developers site the tech behind the docs
LINE developers site the tech behind the docsLINE developers site the tech behind the docs
LINE developers site the tech behind the docs
 
[Phpcamp]Shindig An OpenSocial container
[Phpcamp]Shindig An OpenSocial container[Phpcamp]Shindig An OpenSocial container
[Phpcamp]Shindig An OpenSocial container
 
Php Camp Open Social
Php Camp  Open SocialPhp Camp  Open Social
Php Camp Open Social
 
Documenting REST APIs
Documenting REST APIsDocumenting REST APIs
Documenting REST APIs
 
STC Summit 2015: API Documentation, an Example-Based Approach
STC Summit 2015: API Documentation, an Example-Based ApproachSTC Summit 2015: API Documentation, an Example-Based Approach
STC Summit 2015: API Documentation, an Example-Based Approach
 
WDI-Poject-4-README
WDI-Poject-4-READMEWDI-Poject-4-README
WDI-Poject-4-README
 
Lecture 2: ES6 / ES2015 Slide
Lecture 2: ES6 / ES2015 SlideLecture 2: ES6 / ES2015 Slide
Lecture 2: ES6 / ES2015 Slide
 
Publishing API documentation -- Workshop
Publishing API documentation -- WorkshopPublishing API documentation -- Workshop
Publishing API documentation -- Workshop
 
WordPress Rest API
WordPress Rest APIWordPress Rest API
WordPress Rest API
 
REST full API Design
REST full API DesignREST full API Design
REST full API Design
 
Postman Galaxy Tour - Keynote Presentation
Postman Galaxy Tour - Keynote PresentationPostman Galaxy Tour - Keynote Presentation
Postman Galaxy Tour - Keynote Presentation
 
How Le Wagon uses Trello
How Le Wagon uses TrelloHow Le Wagon uses Trello
How Le Wagon uses Trello
 
How to create OpenSocial Apps in 45 minutes
How to create OpenSocial Apps in 45 minutesHow to create OpenSocial Apps in 45 minutes
How to create OpenSocial Apps in 45 minutes
 

Similar to Nom Nom: Consuming REST APIs

Nom Nom: Consuming REST APIs
Nom Nom: Consuming REST APIsNom Nom: Consuming REST APIs
Nom Nom: Consuming REST APIs
Tessa 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 Steps
Tessa 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 Steps
Tessa 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 2010
Twilio Inc
 
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
Twilio Inc
 
api_slides.pptx
api_slides.pptxapi_slides.pptx
api_slides.pptx
adewad
 
Api fundamentals
Api fundamentalsApi fundamentals
Api fundamentals
AgileDenver
 
Flickr Services
Flickr ServicesFlickr Services
Flickr Services
royans
 
Flickr Services
Flickr ServicesFlickr Services
Flickr Services
royans
 
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
LaunchAny
 
REST APIs, Girls Who Code
REST APIs, Girls Who CodeREST APIs, Girls Who Code
REST APIs, Girls Who Code
Twitter Developers
 
Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017
JoEllen Carter
 
Coding 100-session-slides
Coding 100-session-slidesCoding 100-session-slides
Coding 100-session-slides
Cisco DevNet
 
Создание API, которое полюбят разработчики. Глубокое погружение
Создание API, которое полюбят разработчики. Глубокое погружениеСоздание API, которое полюбят разработчики. Глубокое погружение
Создание API, которое полюбят разработчики. Глубокое погружение
SQALab
 
Web APIs: The future of software
Web APIs: The future of softwareWeb APIs: The future of software
Web APIs: The future of software
Reuven Lerner
 
Understanding APIs.pptx
Understanding APIs.pptxUnderstanding APIs.pptx
Understanding APIs.pptx
Sherif Ali , MBA , ITIL , IBDL
 
Understanding APIs.pptx introduction chk
Understanding APIs.pptx introduction chkUnderstanding APIs.pptx introduction chk
Understanding APIs.pptx introduction chk
nooreen nayyar syeda
 
WooCommerce & Apple TV
WooCommerce & Apple TVWooCommerce & Apple TV
WooCommerce & Apple TV
Marko Heijnen
 
How to Connect to Any REST API (Without Writing Any Code)
How to Connect to Any REST API (Without Writing Any Code)How to Connect to Any REST API (Without Writing Any Code)
How to Connect to Any REST API (Without Writing Any Code)
Safe Software
 
Building a REST API for Longevity
Building a REST API for LongevityBuilding a REST API for Longevity
Building a REST API for Longevity
MuleSoft
 

Similar to 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
 
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
 
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_slides.pptx
api_slides.pptxapi_slides.pptx
api_slides.pptx
 
Api fundamentals
Api fundamentalsApi fundamentals
Api fundamentals
 
Flickr Services
Flickr ServicesFlickr Services
Flickr Services
 
Flickr Services
Flickr ServicesFlickr Services
Flickr Services
 
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
 
REST APIs, Girls Who Code
REST APIs, Girls Who CodeREST APIs, Girls Who Code
REST APIs, Girls Who Code
 
Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017
 
Coding 100-session-slides
Coding 100-session-slidesCoding 100-session-slides
Coding 100-session-slides
 
Создание API, которое полюбят разработчики. Глубокое погружение
Создание API, которое полюбят разработчики. Глубокое погружениеСоздание API, которое полюбят разработчики. Глубокое погружение
Создание API, которое полюбят разработчики. Глубокое погружение
 
Web APIs: The future of software
Web APIs: The future of softwareWeb APIs: The future of software
Web APIs: The future of software
 
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
 
WooCommerce & Apple TV
WooCommerce & Apple TVWooCommerce & Apple TV
WooCommerce & Apple TV
 
How to Connect to Any REST API (Without Writing Any Code)
How to Connect to Any REST API (Without Writing Any Code)How to Connect to Any REST API (Without Writing Any Code)
How to Connect to Any REST API (Without Writing Any Code)
 
Building a REST API for Longevity
Building a REST API for LongevityBuilding a REST API for Longevity
Building a REST API for Longevity
 

More from Tessa Mero

Developer relations KPIs
Developer relations KPIsDeveloper relations KPIs
Developer relations KPIs
Tessa 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 app
Tessa 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 cloudinary
Tessa 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 career
Tessa Mero
 
Finding the Jelly in the JAMstack
Finding the Jelly in the JAMstackFinding the Jelly in the JAMstack
Finding the Jelly in the JAMstack
Tessa Mero
 
Building APIs the serverless way
Building APIs the serverless wayBuilding APIs the serverless way
Building APIs the serverless way
Tessa 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 job
Tessa 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 stack
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
 
ChatOps Workshop
ChatOps WorkshopChatOps Workshop
ChatOps Workshop
Tessa Mero
 
Cisco CMX Location Services
Cisco CMX Location ServicesCisco CMX Location Services
Cisco CMX Location Services
Tessa 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 Adventures
Tessa Mero
 
Revolutionize Your Workflow with ChatOps
Revolutionize Your Workflow with ChatOpsRevolutionize Your Workflow with ChatOps
Revolutionize Your Workflow with ChatOps
Tessa Mero
 
Leading an open source project oscon2016
Leading an open source project oscon2016Leading an open source project oscon2016
Leading an open source project oscon2016
Tessa Mero
 
Leading anopensourceproject oscon2016
Leading anopensourceproject oscon2016Leading anopensourceproject oscon2016
Leading anopensourceproject oscon2016
Tessa Mero
 
State of Joomla January 2016
State of Joomla January 2016State of Joomla January 2016
State of Joomla January 2016
Tessa Mero
 
Leading an Open Source Community
Leading an Open Source CommunityLeading an Open Source Community
Leading an Open Source Community
Tessa Mero
 
Joomla Extensions Directory Session
Joomla Extensions Directory SessionJoomla Extensions Directory Session
Joomla Extensions Directory Session
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
 
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
 
Leading an open source project oscon2016
Leading an open source project oscon2016Leading an open source project oscon2016
Leading an open source project oscon2016
 
Leading anopensourceproject oscon2016
Leading anopensourceproject oscon2016Leading anopensourceproject oscon2016
Leading anopensourceproject oscon2016
 
State of Joomla January 2016
State of Joomla January 2016State of Joomla January 2016
State of Joomla January 2016
 
Leading an Open Source Community
Leading an Open Source CommunityLeading an Open Source Community
Leading an Open Source Community
 
Joomla Extensions Directory Session
Joomla Extensions Directory SessionJoomla Extensions Directory Session
Joomla Extensions Directory Session
 

Recently uploaded

"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
Fwdays
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
zjhamm304
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
LizaNolte
 
What is an RPA CoE? Session 2 – CoE Roles
What is an RPA CoE?  Session 2 – CoE RolesWhat is an RPA CoE?  Session 2 – CoE Roles
What is an RPA CoE? Session 2 – CoE Roles
DianaGray10
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
DanBrown980551
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
Fwdays
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
christinelarrosa
 
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
AlexanderRichford
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Neo4j
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
Mydbops
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
From Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMsFrom Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMs
Sease
 
Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!
Tobias Schneck
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
Fwdays
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 

Recently uploaded (20)

"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
 
What is an RPA CoE? Session 2 – CoE Roles
What is an RPA CoE?  Session 2 – CoE RolesWhat is an RPA CoE?  Session 2 – CoE Roles
What is an RPA CoE? Session 2 – CoE Roles
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
 
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
From Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMsFrom Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMs
 
Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 

Nom Nom: Consuming REST APIs

  • 1. ZendCon Conference October 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

Editor's Notes

  1. 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.
  2. Here is an overview of what I’ll be going over.
  3. 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.
  4. 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!
  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. 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.
  6. 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.
  7. Okay, so what is an API?
  8. Ready for a lot of examples? I’ll make it sound easy 
  9. An API stands for Application Programming Interface It’s a way for two pieces of software to talk to each other.
  10. Which brings me to saying that the API is the User Interface for software systems.
  11. APIs are sets of requirements that govern how one application can talk to another.
  12. An API is best thought of as a contract provided by one piece of computer software to another.
  13. 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.
  14. 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.
  15. 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.
  16. 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.
  17. Next we will go over web pages, requests, responses, and REST APIs
  18. 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.
  19. 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.
  20. This is exactly what is happening between your app and their app between an API
  21. 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.
  22. 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.
  23. So how do you interact with this particular API? Well, there are methods you can make to request data.
  24. 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.
  25. 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.
  26. 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?
  27. 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!
  28. This is where POSTMAN comes in handy.
  29. 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
  30. 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
  31. Now What? How do you figure out how to use an API?
  32. 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.
  33. 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!
  34. I want to first create a room in Spark and test it through POSTMAN.
  35. 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.
  36. In this example, I created a title of a room called “PHPCruise Room”. I knew to use title because of the API documentation.
  37. 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.
  38. You created a room, now how do you post a message to it through an API Request?
  39. 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.
  40. 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.
  41. But what about request parameters?
  42. 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.
  43. 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!
  44. There is one important thing you need to do when you receive a 200 OK HTTP Status. Please take note of this.
  45. You do a dance!
  46. Alright I get it. Now show me something else that’s cool!
  47. How about… applications interacting with a cell phone?
  48. 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.
  49. 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.
  50. 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
  51. 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.
  52. You can select a Country, such as Brazil, and select which Region in the country and click Add.
  53. 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.
  54. 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.
  55. Magic? I know right? The phone number above is my apps phone number that sent my phone a text message.
  56. You can do it too! It’s that easy. And you may experience this with most API’s with great documentation!
  57. 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.
  58. Easy? I know…
  59. 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.
  60. Our budget we were given is 150 Million USD Dollars.
  61. You can learn more about it at developer.ciscospark.com/fund. Also, don’t forget to tweet at me @tessamero
  62. 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!