40
Adoption-Centered API Design Marsh Gardiner, @earth2marsh Brian Mulloy, @landlessness

Adoption-Centered API Design

  • Upload
    apigee

  • View
    116

  • Download
    0

Embed Size (px)

DESCRIPTION

Building upon their prior work in API design, Marsh Gardiner and Brian Mulloy unveil RV, a style of API design that embraces developer adoption as its guiding principle. They explore the constraints and opportunities introduced by RV and discuss RVs place in the context of other design approaches like REST and Hypermedia.

Citation preview

Page 1: Adoption-Centered API Design

Adoption-Centered API DesignMarsh Gardiner, @earth2marsh

Brian Mulloy, @landlessness

Page 2: Adoption-Centered API Design

2

Integers as a Service

Page 3: Adoption-Centered API Design

3

Overview

• How did we get here?• Where are we now?• Where are we going?• How are we going to get there?• Questions

Page 4: Adoption-Centered API Design

How did we get here?

Page 5: Adoption-Centered API Design

5

In the beginning…

Page 6: Adoption-Centered API Design

6

SOAP and XML-RPC

Page 7: Adoption-Centered API Design

7

REST

Page 8: Adoption-Centered API Design

8

The rise of…

• Software as a Service• Web Mashups• Virtualization• User Experience• Mobile

Page 9: Adoption-Centered API Design

9

Web vs App

Page 10: Adoption-Centered API Design

10

Technology unlocks technology…

Page 11: Adoption-Centered API Design

11

Gehry vs Winnebago

photo: uggboy

Page 12: Adoption-Centered API Design

Where are we now?

Page 13: Adoption-Centered API Design

13

Refocusing API design

Page 14: Adoption-Centered API Design

14

Passion (and controversy)

Page 15: Adoption-Centered API Design

15

Design for adoption

Page 16: Adoption-Centered API Design

16

Resource

Addressing:

IP: 173.194.70.102 google.com➡

Twitter: 14352786 @earth2marsh➡

https://github.com/apigee

Page 17: Adoption-Centered API Design

17

Verb

Page 18: Adoption-Centered API Design

18

General philosophy

Page 19: Adoption-Centered API Design

Applying RV patterns

Page 20: Adoption-Centered API Design

20

Collections and entities

https://api.stripe.com/

Summary of Resource URL Patterns/v1/charges/v1/charges/{CHARGE_ID}/v1/coupons/v1/coupons/{COUPON_ID}/v1/customers/v1/customers/{CUSTOMER_ID}

Page 21: Adoption-Centered API Design

21

Versions

/2010-04-01/Accounts/

Twilio

/services/data/v29.0/sobjects/Account

Salesforce

/v2/users

Foursquare

Page 22: Adoption-Centered API Design

22

Query parameters

/1.1/search/tweets.json?q=%23superbowl &result_type=recent

Twitter

Page 23: Adoption-Centered API Design

23

Header parameters

Page 24: Adoption-Centered API Design

24

Conveniences

/me

Facebook

/v1/people/~LinkedIn

/v2/checkins/recentFoursquare

Page 25: Adoption-Centered API Design

25

Formats

/users/3207.json

SoundCloud/users/3207

Page 26: Adoption-Centered API Design

26

Formats

Page 27: Adoption-Centered API Design

27

Actions

/search?q=watermelon&type=post

Facebook

/convert?from=EUR&to=CNY&amount=100

Hypothetical

/droplets/{droplet_id}/reboot

DigitalOcean

Page 28: Adoption-Centered API Design

28

Authentication

Page 29: Adoption-Centered API Design

29

Dates

"created_at": "Thu Nov 03 05:19:38 +0000 2011"

Twitter

"DateTime": "2011-10-29T09:35:00Z"

Bing

"createdAt": 1320296464Foursquare

Page 30: Adoption-Centered API Design

30

Filters

/me?fields=name,birthday,photos.limit(10).fields(id,picture),videos.type(tagged).limit(10).fields(id, source)

Facebook

Page 31: Adoption-Centered API Design

31

Pagination

offset, limit

Facebook

page, rppTwitter

start, countLinkedIn

Page 32: Adoption-Centered API Design

32

Pagination

offset, limit

Facebook

Page 33: Adoption-Centered API Design

33

HATEOAS and the Hypermedia Constraint

Page 34: Adoption-Centered API Design

34

Hypermedia

Page 35: Adoption-Centered API Design

35

Great moments in mishandled error code history

Page 36: Adoption-Centered API Design

36

Errors

Page 37: Adoption-Centered API Design

37

SDKs

Page 38: Adoption-Centered API Design

38

Perfect is the enemy of done

Page 39: Adoption-Centered API Design

39

Questions

[email protected], @ResourceVerb

[email protected], @landlessness

[email protected], @earth2marsh

Page 40: Adoption-Centered API Design

Marsh Gardiner, @earth2marsh

Brian Mulloy, @landlessness

Thank you