KEMBAR78
API 101 - Understanding APIs. | PPT
API 101
What are apis,
and how can I use them to take over the world?
talk overview
• Intros and Getting Started
• Dive into APIs
• Business Cases
• REST Deconstructed
• API and Developer Success
http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
Intros and getting started
• Who are we?
• Who are you?
• Quick API definition
• API Example
• Workshop Participation
http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
tros and Getting Started ->

Who is kirsten?
API Ninja (developer evangelist)
Princess Polymath
tros and Getting Started ->

Who is Keith?
DEVELOPER EVANGELIST
TROUBLEMAKER
tros and Getting Started ->

who are you?
Developers
Designers
Marketing
Management
http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
tros and Getting Started ->

elevator pitch

What is an API?
A predictable way to
communicate with a computer
system

http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
tros and Getting Started ->

it’s a workshop!
We’re here to learn
This is a safe space
There are no stupid questions
Someone else wants to ask too
I’ll give you a treat!
http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
tros and Getting Started ->

asking questions
Wave your hands around!
Tweet with #api101 and #apistrat
... or @synedra and @caseysoftware
Comment on the API 101 Cheatsheet on
http://www.princesspolymath.com

http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
tros and Getting Started ->

quick api example

http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
tros and Getting Started ->

twitter -> wordpress
tros and Getting Started ->

how does that work?
Wordpress Plugin
Twitter API

Uses Authentication

Wordpress

Searches API for #api101
Formats response
Fills in sidebar
http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
dive into apis
• Quick history of APIs
• What do current APIs make possible?

http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
Dive into APIs ->

Very Brief History

• Computer -> Computer
• Databases
• Backups
• Client -> Server
• Email
• Content Management Systems
• Web Client -> API Server
http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
Dive into APIs ->

what can apis do?

http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
quick break!
• Don’t forget to tweet or comment your questions or
comments!
• Let’s check what’s there now... network willing
• Audience questions?
• Aaaaannnnndddd.... over to Keith!

http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
So you want to build an
API?
D Keith Casey Jr
Developer Evangelist, Austin
TALK OVERVIEW
• Intros and Getting Started
• Dive into APIs
• Business Cases
• REST Deconstructed
• API and Developer Success

@CaseySoftware

Tweet thoughts to:#apistrat #api101
Business Cases

@CaseySoftware

Tweet thoughts to:#apistrat #api101
API FIRST!

@CaseySoftware

Tweet thoughts to:#apistrat #api101
@CaseySoftware

Tweet thoughts to:#apistrat #api101
Platform as a strategy

@CaseySoftware

Tweet thoughts to:#apistrat #api101
Something to stand
on
Instead of building everything yourself.. Blackberry/RIM

Build a platform that others can build on to create value.. Apple

@CaseySoftware

Tweet thoughts to:#apistrat #api101
stuff vs optimization
Stuff: How can we build more stuff?
Examples: manufacturing, NYT/blogging networks
Optimization: How can we better distribute the stuff?
Examples: Walmart, search engines/RSS readers
Platform: How can we redefine ‘stuff’ & find new ways to solve the problem?
Examples: Ebay/Amazon Prime, Twitter
Source: http://platformed.info/platform-thinking/

@CaseySoftware

Tweet thoughts to:#apistrat #api101
hope as marketing

@CaseySoftware

Tweet thoughts to:#apistrat #api101
marketing as
marketing
Toolbox
Easy to use & plug into the system
Magnet
Pulls customers (both producers & consumers) into the system
Matchmaker
Accelerate & facilitate connections between producers & consumers
Source: http://blogs.hbr.org/2013/01/three-elements-of-a-successful-platform/

@CaseySoftware

Tweet thoughts to:#apistrat #api101
business
reasons
reasons
@CaseySoftware

Tweet thoughts to:#apistrat #api101
MARKET
PENETRATION:
NETFLIX
@CaseySoftware

Tweet thoughts to:#apistrat #api101
DEFENSIVE
STRATEGY:
PAYPAL
@CaseySoftware

Tweet thoughts to:#apistrat #api101
DRIVE USAGE:
TWITTER/FACEBO
OK
@CaseySoftware

Tweet thoughts to:#apistrat #api101
technical
Reasons
Reasons
@CaseySoftware

Tweet thoughts to:#apistrat #api101
email: Sendgrid
Abstraction
Abstraction
@CaseySoftware

Tweet thoughts to:#apistrat #api101
storage: Dropbox
metered usage
metered usage
@CaseySoftware

Tweet thoughts to:#apistrat #api101
inboxes: Context.io
simplification
simplification
@CaseySoftware

Tweet thoughts to:#apistrat #api101
telephony: Twilio
All of the above
(abstraction, metered usage, simplification)
(abstraction, metered usage, simplification)
(abstraction, metered usage, simplification)

@CaseySoftware

Tweet thoughts to:#apistrat #api101
Architectural
considerations
@CaseySoftware

Tweet thoughts to:#apistrat #api101
Schema
“An outline or model; organized pattern of thought or behavior”

Source: http://en.wikipedia.org/wiki/Schema_(psychology)
WRT Hypermedia: http://json-schema.org

@CaseySoftware

Tweet thoughts to:#apistrat #api101
Affordances
“An affordance is a quality of an object, or an environment, which
allows a user to perform an action.”

Source: http://en.wikipedia.org/wiki/Affordance
WRT Hypermedia: http://amundsen.com/blog/archives/1109

@CaseySoftware

Tweet thoughts to:#apistrat #api101
Choose your own
Adventure

@CaseySoftware

Tweet thoughts to:#apistrat #api101
Versioning
• Two schools of thought:
• Part of the name
• Keith

vs

Keith Jr

• /v1/name-of-item

vs

/v2/name-of-item

• Part of the conversation (content negotiation)
• Lunch
@CaseySoftware

vs

dinner menu
Tweet thoughts to:#apistrat #api101
Authentication &
Access Control
Access Control
@CaseySoftware

Tweet thoughts to:#apistrat #api101
TALK OVERVIEW
• Intros and Getting Started
• Dive into APIs
• Business Cases
• REST Deconstructed
• API and Developer Success

@CaseySoftware

Tweet thoughts to:#apistrat #api101
talk overview
• Intros and Getting Started
• Dive into APIs
• Business Cases
• REST Deconstructed
• API and Developer Success
http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
REst deconstructed
• HTTP
• Structure
• Verbs
• REST
• Structure
• Verbs
• Response Formats
• JSON
• XML
http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
EST Deconstructed ->

conversations

•

Unique names for things
Iced Tea

•

Create, Read, Update and Delete (CRUD)
Order, Get order back, Change order, Cancel order

•

Substitutions and changes
Unsweetened, Extra Ice

•

Context For here or to go?

http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
EST Deconstructed ->

HTTP
•

HyperText Transfer Protocol

•

Main internet protocol

•

Browser->web server

•

Technically - chatty, inefficient... simple

http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
EST Deconstructed -> HTTP

http messages
•

Simple resource address - URL (name)

•

Request -> Response

•

Context in headers

•

Substitutions: added to name

http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
EST Deconstructed -> HTTP

HTTP verbs
•

GET

•

POST

•

PUT

•

DELETE

•

... and a few others

http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
EST Deconstructed -> HTTP

REST Structure
•

URL -> Name

•

Context in headers

•

Substitutions and changes

http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
EST Deconstructed -> HTTP

REST actions
•

GET - Read back order

•

POST - Place order

•

PUT - Change order

•

DELETE - Cancel order

•

... and a few others

http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
EST Deconstructed -> Formats

response formats
JSON
{
“My thing” : “Awesome sauce”
}

• Smaller / More efficient
• More human readable
• Simpler to use in many
programming languages
• More natural for web
developers
http://www.princesspolymath.com

XML
<stuff>
<my_thing>Awesome sauce</my_thing>
</stuff>

• More verbose
• Less human readable
• Good integration with .NET
• Supports better metainformation with attributes

Tweet thoughts to:#apistrat #api101
TALK OVERVIEW
• Intros and Getting Started
• Dive into APIs
• Business Cases
• REST Deconstructed
• API and Developer Success
http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
API AND DEVELOPER SUCCESS
• API Design
• Marketing your API
• Supporting your Developers

http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
PI and Developer Success ->

API DESIGN

• User Experience - What do you want people to do with your
API?
• System constraints - How do you want them to do it?
• Creation, Design and Documentation of APIs
Thursday, 11:20 (Apiary.io, Swagger, APISpark, Reverb!)
• Hypermedia APIs
Thursday, 1:50 (Elastic Path, NPR, Comcast, Layer7)
http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
PI and Developer Success ->

MARKETING YOUR API

• Clearly communicate API goals and usage
• Lower barrier to entry for developers
• API Marketing and Evangelism
Friday, 11:45 (SendGrid, Challengepost, WSO2,
Hackerleague)
• API Discovery
Thursday, 11:20 (Mashape, Mulesoft, Klout, Parasoft)
http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
PI and Developer Success ->

DEVELOPER SUPPORT

• Clear, consistent communication
• Fantastic documentation, tutorials, libraries
• Forums, participation
• Provide excellent exploration and development tools
• In short, respect your developers’ time and reduce confusion

http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
Questions?
• Final check for questions on twitter/comments
• Audience questions?

http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101
WIFI?
• PARC55-MEETING
• Password is on ApistratSF2013

http://www.princesspolymath.com

Tweet thoughts to:#apistrat #api101

API 101 - Understanding APIs.

  • 1.
    API 101 What areapis, and how can I use them to take over the world?
  • 2.
    talk overview • Introsand Getting Started • Dive into APIs • Business Cases • REST Deconstructed • API and Developer Success http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 3.
    Intros and gettingstarted • Who are we? • Who are you? • Quick API definition • API Example • Workshop Participation http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 4.
    tros and GettingStarted -> Who is kirsten? API Ninja (developer evangelist) Princess Polymath
  • 5.
    tros and GettingStarted -> Who is Keith? DEVELOPER EVANGELIST TROUBLEMAKER
  • 6.
    tros and GettingStarted -> who are you? Developers Designers Marketing Management http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 7.
    tros and GettingStarted -> elevator pitch What is an API? A predictable way to communicate with a computer system http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 8.
    tros and GettingStarted -> it’s a workshop! We’re here to learn This is a safe space There are no stupid questions Someone else wants to ask too I’ll give you a treat! http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 9.
    tros and GettingStarted -> asking questions Wave your hands around! Tweet with #api101 and #apistrat ... or @synedra and @caseysoftware Comment on the API 101 Cheatsheet on http://www.princesspolymath.com http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 10.
    tros and GettingStarted -> quick api example http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 11.
    tros and GettingStarted -> twitter -> wordpress
  • 12.
    tros and GettingStarted -> how does that work? Wordpress Plugin Twitter API Uses Authentication Wordpress Searches API for #api101 Formats response Fills in sidebar http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 13.
    dive into apis •Quick history of APIs • What do current APIs make possible? http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 14.
    Dive into APIs-> Very Brief History • Computer -> Computer • Databases • Backups • Client -> Server • Email • Content Management Systems • Web Client -> API Server http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 15.
    Dive into APIs-> what can apis do? http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 16.
    quick break! • Don’tforget to tweet or comment your questions or comments! • Let’s check what’s there now... network willing • Audience questions? • Aaaaannnnndddd.... over to Keith! http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 17.
    So you wantto build an API? D Keith Casey Jr Developer Evangelist, Austin
  • 18.
    TALK OVERVIEW • Introsand Getting Started • Dive into APIs • Business Cases • REST Deconstructed • API and Developer Success @CaseySoftware Tweet thoughts to:#apistrat #api101
  • 19.
  • 20.
  • 21.
  • 22.
    Platform as astrategy @CaseySoftware Tweet thoughts to:#apistrat #api101
  • 23.
    Something to stand on Insteadof building everything yourself.. Blackberry/RIM Build a platform that others can build on to create value.. Apple @CaseySoftware Tweet thoughts to:#apistrat #api101
  • 24.
    stuff vs optimization Stuff:How can we build more stuff? Examples: manufacturing, NYT/blogging networks Optimization: How can we better distribute the stuff? Examples: Walmart, search engines/RSS readers Platform: How can we redefine ‘stuff’ & find new ways to solve the problem? Examples: Ebay/Amazon Prime, Twitter Source: http://platformed.info/platform-thinking/ @CaseySoftware Tweet thoughts to:#apistrat #api101
  • 25.
    hope as marketing @CaseySoftware Tweetthoughts to:#apistrat #api101
  • 26.
    marketing as marketing Toolbox Easy touse & plug into the system Magnet Pulls customers (both producers & consumers) into the system Matchmaker Accelerate & facilitate connections between producers & consumers Source: http://blogs.hbr.org/2013/01/three-elements-of-a-successful-platform/ @CaseySoftware Tweet thoughts to:#apistrat #api101
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
    storage: Dropbox metered usage meteredusage @CaseySoftware Tweet thoughts to:#apistrat #api101
  • 34.
  • 35.
    telephony: Twilio All ofthe above (abstraction, metered usage, simplification) (abstraction, metered usage, simplification) (abstraction, metered usage, simplification) @CaseySoftware Tweet thoughts to:#apistrat #api101
  • 36.
  • 37.
    Schema “An outline ormodel; organized pattern of thought or behavior” Source: http://en.wikipedia.org/wiki/Schema_(psychology) WRT Hypermedia: http://json-schema.org @CaseySoftware Tweet thoughts to:#apistrat #api101
  • 38.
    Affordances “An affordance isa quality of an object, or an environment, which allows a user to perform an action.” Source: http://en.wikipedia.org/wiki/Affordance WRT Hypermedia: http://amundsen.com/blog/archives/1109 @CaseySoftware Tweet thoughts to:#apistrat #api101
  • 39.
  • 40.
    Versioning • Two schoolsof thought: • Part of the name • Keith vs Keith Jr • /v1/name-of-item vs /v2/name-of-item • Part of the conversation (content negotiation) • Lunch @CaseySoftware vs dinner menu Tweet thoughts to:#apistrat #api101
  • 41.
    Authentication & Access Control AccessControl @CaseySoftware Tweet thoughts to:#apistrat #api101
  • 42.
    TALK OVERVIEW • Introsand Getting Started • Dive into APIs • Business Cases • REST Deconstructed • API and Developer Success @CaseySoftware Tweet thoughts to:#apistrat #api101
  • 43.
    talk overview • Introsand Getting Started • Dive into APIs • Business Cases • REST Deconstructed • API and Developer Success http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 44.
    REst deconstructed • HTTP •Structure • Verbs • REST • Structure • Verbs • Response Formats • JSON • XML http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 45.
    EST Deconstructed -> conversations • Uniquenames for things Iced Tea • Create, Read, Update and Delete (CRUD) Order, Get order back, Change order, Cancel order • Substitutions and changes Unsweetened, Extra Ice • Context For here or to go? http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 46.
    EST Deconstructed -> HTTP • HyperTextTransfer Protocol • Main internet protocol • Browser->web server • Technically - chatty, inefficient... simple http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 47.
    EST Deconstructed ->HTTP http messages • Simple resource address - URL (name) • Request -> Response • Context in headers • Substitutions: added to name http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 48.
    EST Deconstructed ->HTTP HTTP verbs • GET • POST • PUT • DELETE • ... and a few others http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 49.
    EST Deconstructed ->HTTP REST Structure • URL -> Name • Context in headers • Substitutions and changes http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 50.
    EST Deconstructed ->HTTP REST actions • GET - Read back order • POST - Place order • PUT - Change order • DELETE - Cancel order • ... and a few others http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 51.
    EST Deconstructed ->Formats response formats JSON { “My thing” : “Awesome sauce” } • Smaller / More efficient • More human readable • Simpler to use in many programming languages • More natural for web developers http://www.princesspolymath.com XML <stuff> <my_thing>Awesome sauce</my_thing> </stuff> • More verbose • Less human readable • Good integration with .NET • Supports better metainformation with attributes Tweet thoughts to:#apistrat #api101
  • 52.
    TALK OVERVIEW • Introsand Getting Started • Dive into APIs • Business Cases • REST Deconstructed • API and Developer Success http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 53.
    API AND DEVELOPERSUCCESS • API Design • Marketing your API • Supporting your Developers http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 54.
    PI and DeveloperSuccess -> API DESIGN • User Experience - What do you want people to do with your API? • System constraints - How do you want them to do it? • Creation, Design and Documentation of APIs Thursday, 11:20 (Apiary.io, Swagger, APISpark, Reverb!) • Hypermedia APIs Thursday, 1:50 (Elastic Path, NPR, Comcast, Layer7) http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 55.
    PI and DeveloperSuccess -> MARKETING YOUR API • Clearly communicate API goals and usage • Lower barrier to entry for developers • API Marketing and Evangelism Friday, 11:45 (SendGrid, Challengepost, WSO2, Hackerleague) • API Discovery Thursday, 11:20 (Mashape, Mulesoft, Klout, Parasoft) http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 56.
    PI and DeveloperSuccess -> DEVELOPER SUPPORT • Clear, consistent communication • Fantastic documentation, tutorials, libraries • Forums, participation • Provide excellent exploration and development tools • In short, respect your developers’ time and reduce confusion http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 57.
    Questions? • Final checkfor questions on twitter/comments • Audience questions? http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
  • 58.
    WIFI? • PARC55-MEETING • Passwordis on ApistratSF2013 http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101

Editor's Notes

  • #19 There are three things you should probably know about me.. first, I work for a company called Twilio where our mission is to change the way businesses communicate. [twilio spiel] Grab me after if you’d like to learn more.
  • #31 perceived value
  • #43 There are three things you should probably know about me.. first, I work for a company called Twilio where our mission is to change the way businesses communicate. [twilio spiel] Grab me after if you’d like to learn more.