api 101 workshop from apistrat conference

52
API 101 WHAT ARE APIS, AND HOW CAN I USE THEM TO TAKE OVER THE WORLD?

Upload: kirsten-hunter

Post on 08-May-2015

379 views

Category:

Technology


0 download

DESCRIPTION

This workshop was designed to help people understand what APIs are in the current world, how to plan and build them, and how to avoid common pitfalls. For more information on this topic see http://apicodex.3scale.net/content/API101

TRANSCRIPT

Page 1: API 101 Workshop from APIStrat Conference

API 101

WHAT ARE APIS, AND HOW CAN I USE THEM TO TAKE OVER THE WORLD?

Page 2: API 101 Workshop from APIStrat Conference

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

Page 3: API 101 Workshop from APIStrat Conference

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

Page 4: API 101 Workshop from APIStrat Conference

WHO IS KIRSTEN?

API NINJA (DEVELOPER EVANGELIST)PRINCESS POLYMATH

Intros and Getting Started ->

Page 5: API 101 Workshop from APIStrat Conference

WHO IS KEITH?

DEVELOPER EVANGELISTTROUBLEMAKER

Intros and Getting Started ->

Page 6: API 101 Workshop from APIStrat Conference

http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101

WHO ARE YOU?

Developers

Designers

Marketing

Management

Intros and Getting Started ->

Page 7: API 101 Workshop from APIStrat Conference

http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101

ELEVATOR PITCHWhat is an API?

A predictable way to communicate with a computer system

Intros and Getting Started ->

Page 8: API 101 Workshop from APIStrat Conference

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

Page 9: API 101 Workshop from APIStrat Conference

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

Page 10: API 101 Workshop from APIStrat Conference

http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101

SWITCHBOARDS AND ICED TEA

Intros and Getting Started ->

Page 11: API 101 Workshop from APIStrat Conference

http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101

QUICK API EXAMPLEIntros and Getting Started ->

Page 12: API 101 Workshop from APIStrat Conference

TWITTER -> WORDPRESS

Intros and Getting Started ->

Page 13: API 101 Workshop from APIStrat Conference

http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101

HOW DOES THAT WORK?

Wordpress Plugin

Twitter API WordpressUses Authentication

Searches API for #api101

Formats response

Fills in sidebar

Intros and Getting Started ->

Page 14: API 101 Workshop from APIStrat Conference

http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101

DIVE INTO APIS

• Quick history of APIs

• What do current APIs make possible?

Page 15: API 101 Workshop from APIStrat Conference

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

Page 16: API 101 Workshop from APIStrat Conference

http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101

WHAT CAN APIS DO?

Dive into APIs ->

Page 17: API 101 Workshop from APIStrat Conference

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!

Page 18: API 101 Workshop from APIStrat Conference

http://www.princesspolymath.com Tweet thoughts to:#apistrat #api101

So you want an API?

D Keith Casey Jr Platform GuyAustin, TX Op3nvoice

Page 19: API 101 Workshop from APIStrat Conference

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

Page 20: API 101 Workshop from APIStrat Conference

Business Cases

Page 21: API 101 Workshop from APIStrat Conference

Mobile/Market Penetration

Page 22: API 101 Workshop from APIStrat Conference

Drive Usage

Page 23: API 101 Workshop from APIStrat Conference

Defensive Strategy

Page 24: API 101 Workshop from APIStrat Conference

Partner Connectivity

Page 25: API 101 Workshop from APIStrat Conference

Technical Cases

Page 26: API 101 Workshop from APIStrat Conference

Abstraction of Complexity

Page 27: API 101 Workshop from APIStrat Conference

Simplifying Interfaces

Page 28: API 101 Workshop from APIStrat Conference

Metered Usage

Page 29: API 101 Workshop from APIStrat Conference

All of the Above

Page 30: API 101 Workshop from APIStrat Conference

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/

Page 31: API 101 Workshop from APIStrat Conference

Architectural Considerations

Page 32: API 101 Workshop from APIStrat Conference

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

Page 33: API 101 Workshop from APIStrat Conference

http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101

How you can do it: Hypermedia

Page 34: API 101 Workshop from APIStrat Conference

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

Page 35: API 101 Workshop from APIStrat Conference

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

Page 36: API 101 Workshop from APIStrat Conference

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

Page 37: API 101 Workshop from APIStrat Conference

http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101

TheAPIDesignBook.com

Page 38: API 101 Workshop from APIStrat Conference

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

Page 39: API 101 Workshop from APIStrat Conference

http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101

REST DECONSTRUCTED

• HTTP• Structure• Verbs

• REST• Structure• Verbs

• Response Formats• JSON• XML

Page 40: API 101 Workshop from APIStrat Conference

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 changesUnsweetened, Extra Ice

• Context - For here or to go?

REST Deconstructed ->

Page 41: API 101 Workshop from APIStrat Conference

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

Page 42: API 101 Workshop from APIStrat Conference

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

Page 43: API 101 Workshop from APIStrat Conference

http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101

REST STRUCTURE

• URL -> Name

• Context in headers

• Substitutions and changes

REST Deconstructed -> HTTP

Page 44: API 101 Workshop from APIStrat Conference

http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101

HTTP VERBS

• GET

• POST

• PUT

• DELETE

• ... and a few others

REST Deconstructed -> HTTP

Page 45: API 101 Workshop from APIStrat Conference

http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101

REST ACTIONSREST Deconstructed -> HTTP

• GET - Read back order

• POST - Place order

• PUT - Change order

• DELETE - Cancel order

• ... and a few others

Page 46: API 101 Workshop from APIStrat Conference

http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101

RESPONSE FORMATSJSON { “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

Page 47: API 101 Workshop from APIStrat Conference

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

Page 48: API 101 Workshop from APIStrat Conference

http://apicodex.3scale.net Tweet thoughts to:#apistrat #api101

API AND DEVELOPER SUCCESS

• API Design

• Marketing your API

• Supporting your Developers

Page 49: API 101 Workshop from APIStrat Conference

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 DevelopmentThursday, 11:20

• Hypermedia APIsThursday, 1:50

Page 50: API 101 Workshop from APIStrat Conference

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 CommunitiesFriday, 11:45

Page 51: API 101 Workshop from APIStrat Conference

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

Page 52: API 101 Workshop from APIStrat Conference

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