API 101
WHAT ARE APIS,
AND HOW CAN I USE THEM TO TAKE OVER THE WORLD?
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
TALK OVERVIEW
• Intros and Getting Started
• Dive into APIs
• Business and Technical Cases
• REST Deconstructed
• API and Developer Success
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
INTROS AND GETTING STARTED
• Who are we?
• Who are you?
• Quick API definition
• API Example
• Workshop Participation
WHO IS KIRSTEN?
API NINJA (DEVELOPER EVANGELIST)
PRINCESS POLYMATH
Intros and Getting Started ->
WHO IS KEITH?
DEVELOPER EVANGELIST
TROUBLEMAKER
Intros and Getting Started ->
http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
WHO ARE YOU?
Developers
Designers
Marketing
Management
Intros and Getting Started ->
http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
ELEVATOR PITCH
What is an API?
A predictable way to communicate
with a computer system
Intros and Getting Started ->
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
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
Intros and Getting Started ->
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
ASKING QUESTIONS
Wave your hands around!
Tweet with #api101 and #apistrat
... or @synedra and @caseysoftware
Intros and Getting Started ->
http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
SWITCHBOARDS
AND ICED TEA
Intros and Getting Started ->
http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
QUICK API EXAMPLE
Intros and Getting Started ->
TWITTER -> WORDPRESS
Intros and Getting Started ->
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
HOW DOES THAT WORK?
Wordpress Plugin
Twitter API Wordpress
Uses Authentication
Searches API for #api101
Formats response
Fills in sidebar
Intros and Getting Started ->
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
DIVE INTO APIS
• Quick history of APIs
• What do current APIs make possible?
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
VERY BRIEF HISTORY
• Computer -> Computer
• Databases
• Backups
• Client -> Server
• Email
• Content Management Systems
• Web Client -> API Server
Dive into APIs ->
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
WHAT CAN APIS DO?
Dive into APIs ->
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
QUICK BREAK!
• Don’t forget to tweet or comment your questions or comments!
• Audience questions?
• Aaaaannnnndddd.... over to Keith!
http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101
So you want an API?
D Keith Casey Jr Platform Guy
Austin, TX Op3nvoice
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
Talk Overview
• Intros & Getting Started
• Dive into APIs
• Business/Technical Cases
• REST Deconstructed
• API & Developer Success
Business Cases
Mobile/Market Penetration
Drive Usage
Defensive Strategy
Partner Connectivity
Technical Cases
Abstraction of Complexity
Simplifying Interfaces
Metered Usage
All of the Above
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
Platform as a Strategy
Making Stuff: How can we build more stuff?
Examples: manufacturing, NYT/blogging networks
Optimizing Stuff: How can we better distribute the stuff?
Examples: Walmart, search engines/RSS readers
Redefine Stuff: How can we redefine ‘stuff’ & find new ways to
solve the problem?
Examples: Ebay/Amazon Prime, Twitter
Source: http://platformed.info/platform-thinking/
Architectural Considerations
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
What you can do: 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
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
How you can do it: Hypermedia
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
What it looks like: 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
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
Who can do it: Authentication & Authorization
Authentication - Confirming who are you
Authorization - Granting access to perform certain actions
http://en.wikipedia.org/wiki/Authentication
http://en.wikipedia.org/wiki/Authorization
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
Talk Overview
• Intros & Getting Started
• Dive into APIs
• Business/Technical Cases
• REST Deconstructed
• API & Developer Success
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
TheAPIDesignBook.com
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
TALK OVERVIEW
• Intros and Getting Started
• Dive into APIs
• Business Cases
• REST Deconstructed
• API and Developer Success
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
REST DECONSTRUCTED
• HTTP
• Structure
• Verbs
• REST
• Structure
• Verbs
• Response Formats
• JSON
• XML
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
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?
REST Deconstructed ->
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
HTTP
• HyperText Transfer Protocol
• Main internet protocol
• Browser->web server
• Technically - chatty, inefficient... simple
REST Deconstructed ->
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
HTTP MESSAGES
• Simple resource address - URL (name)
• Request -> Response
• Context in headers
• Substitutions: added to name
REST Deconstructed -> HTTP
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
REST STRUCTURE
• URL -> Name
• Context in headers
• Substitutions and changes
REST Deconstructed -> HTTP
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
HTTP VERBS
• GET
• POST
• PUT
• DELETE
• ... and a few others
REST Deconstructed -> HTTP
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
REST ACTIONS
REST Deconstructed -> HTTP
• GET - Read back order
• POST - Place order
• PUT - Change order
• DELETE - Cancel order
• ... and a few others
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
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
XML
<stuff>
<my_thing>Awesome sauce</my_thing>
</stuff>
• More verbose
• Less human readable
• Good integration with .NET
• Supports better meta-
information with attributes
REST Deconstructed -> Formats
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
TALK OVERVIEW
• Intros and Getting Started
• Dive into APIs
• Business Cases
• REST Deconstructed
• API and Developer Success
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
API AND DEVELOPER
SUCCESS
• API Design
• Marketing your API
• Supporting your Developers
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
API 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?
• API Design and Development
Thursday, 11:20
• Hypermedia APIs
Thursday, 1:50
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
API and Developer Success ->
MARKETING YOUR API
• Clearly communicate API goals and usage
• Lower barrier to entry for developers
• API Marketing & Developer Communities
Friday, 11:45
http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
API 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://apicodex.3scale.net Tweet thoughts to:#apistrat #api101
QUESTIONS?
• Final check for questions on twitter/comments
• Audience questions?
• http://apicodex.3scale.net/content/API101

API 101 Workshop from APIStrat Conference