SlideShare a Scribd company logo
API Design
3rd Edition



Brian Mulloy
@landlessness
Kevin Swiber     Apigee
@kevinswiber    @apigee
groups.google.com/group/api-craft
youtube.com/apigee
slideshare.net/apigee
@landlessness   @kevinswiber
“   The real issue is about design: designing
    things that have the power required for the
    job while maintaining understandability, the
    feeling of control, and the pleasure of
    accomplishment.
                                      -Donald Norman
http://www.flickr.com/photos/mattharvey1/5712604622/
Agenda
•   Recap Previous Edition
•   API Modeling
•   Security
•   Message Design
•   Hypermedia
•   Transactions
http://offers.apigee.com/web-api-design-ebook/
URL Design                                           Versioning
Plural nouns for    /dogs                            Include version in   /v1/dogs
collections                                          URL
ID for entity       /dogs/1234                       Keep one previous    /v1/dogs
                                                     version long         /v2/dogs
Associations        /owners/5678/dogs
                                                     enough for
                    POST GET PUT DELETE
                                                     developers to
4 HTTP
                                                     migrate
Methods
Bias toward         /dogs (not animals)
concrete names                                       Errors
Multiple            /dogs.json                       8 Status Codes       200 201 304 400 401 403 404 500
formats in URL      /dogs.xml
                                                     Verbose messages     {"msg": "verbose, plain language hints"}
Paginate with       ?limit=10&offset=0
limit and offset
Query params        ?color=red&state=running
                                                     Client Considerations
Partial selection   ?fields=name,state
                                                     Client does not      ?suppress_response_codes=true

Use medial          "createdAt": 1320296464          support HTTP
capitalization      myObject.createdAt;              status codes
                    /convert?from=EUR&to=CNY&amoun   Client does not      GET   /dogs?method=post
Use verbs for                                                             GET   /dogs
non-resource        t=100                            support HTTP
                                                                          GET   /dogs?method=put
requests                                             methods
                                                                          GET   /dogs?method=delete
Search              /search?q=happy%2Blabrador       Complement API       1. JavaScript
                                                     with SDK and code    2. …
DNS                 api.foo.com                                           3. …
                    developers.foo.com               libraries
How do we get started with our API?
Build an API Model




     http://www.flickr.com/photos/brent_nashville/2156695472/in/photostream/
Don’t Go Cowboy




 http://www.flickr.com/photos/theory/3364213389/in/photostream/
How do we secure our API?
Twitter Streaming API
Authorization: Basic aWhlYXJ0OmFwaXM=




Amazon Web Services API
Authorization: AWS
AKIAIOSFODNN7EXAMPLE:frJIUNo//yllqDzg=




Google API
Authorization: Bearer 1/fFBGRNJru1FQd44AzqT3Zg
OAuth2
Authorization: Bearer 1/fFBGRNJru1FQd44AzqT3Zg
How do approach message design?
Support multiple formats JSON and XML
Make JSON the default
How do we represent single items?
Twitter                                  Foursquare               Instagram
{                                        {                        {
  "created_at": "Thu Jan 10 08:44:59      "meta": {…},             "meta": {…},
+0000 2013",                              "notifications": […],    "data": {}
  "id": 289291736440791040,               "response": {}          }
  "id_str": "289291736440791040",        }
  "text": "@landlessness here's one
for you: 50-year plan to fix
Detroitnnhttp://t.co/kJ2l1FZv",
  "source": "<a
href="http://twitter.com/download/andr
oid" rel="nofollow">Twitter for
Android</a>",
  "truncated": false,
  "in_reply_to_status_id": null,
  "in_reply_to_status_id_str": null,
  "in_reply_to_user_id": 41020312,
  "in_reply_to_user_id_str":
"41020312",
  "in_reply_to_screen_name":
"landlessness",
  "user": {…},
  "geo": {…},
  "coordinates": {…},
  "place": {…},
  "contributors”:{…},
  "retweet_count": 0,
  "entities": {…},
  "favorited": false,
  "retweeted": false,
  "possibly_sensitive": false
}




                                                                                  21
Twitter                                  Foursquare                              Instagram
{                                        {                                       {
  "created_at": "Thu Jan 10 08:44:59      "meta": {…},                            "meta": {…},
+0000 2013",                              "notifications": […],                   "data": {
  "id": 289291736440791040,               "response": {                             "attribution": {…},
  "id_str": "289291736440791040",           "checkin": {                            "type": "image",
  "text": "@landlessness here's one          "id": "50eeff78e4b0f8e9624ea5f8",      "location": {…},
for you: 50-year plan to fix                 "createdAt": 1357840248,               "comments": {…},
Detroitnnhttp://t.co/kJ2l1FZv",            "type": "checkin",                     "filter": "Sierra",
  "source": "<a                              "shout": "Pharmacy #DRUGS!!!           "created_time": "1357826573",
href="http://twitter.com/download/andr   #ToothPulled :(",                          "link":
oid" rel="nofollow">Twitter for              "timeZone": "America/Detroit",      "http://instagr.am/p/UTk5Xut3gN/",
Android</a>",                                "timeZoneOffset": -300,                "likes": {…},
  "truncated": false,                        "user": {…},                           "images": {…},
  "in_reply_to_status_id": null,             "venue": {…},                          "caption": {…},
  "in_reply_to_status_id_str": null,         "source": {…}                          "user_has_liked": false,
  "in_reply_to_user_id": 41020312,          }                                       "id": "365798266911553549_3573549",
  "in_reply_to_user_id_str":              }                                          "user": {…}
"41020312",                              }                                        }
  "in_reply_to_screen_name":                                                     }
"landlessness",
  "user": {…},
  "geo": {…},
  "coordinates": {…},
  "place": {…},
  "contributors”:{…},
  "retweet_count": 0,
  "entities": {…},
  "favorited": false,
  "retweeted": false,
  "possibly_sensitive": false
}




                                                                                                                 22
Take the best of Foursquare and Instagram
{
 "meta": {…},
 "dog": {…}
 "notifications": […],
}




                                            23
How do we represent collections?
Twitter                                  Foursquare                                Instagram
[                                        {                                         {
 {                                        "meta": {…},                              "meta": {…},
  "created_at": "Thu Jan 10 08:44:59      "notifications": […],                     "data": [
+0000 2013",                              "response": {                               {
  "id": 289291736440791040,                 "recent": [                                "attribution": {…},
  "id_str": "289291736440791040",            {                                         "type": "image",
  "text": "@landlessness here's one            "id": "50eeff78e4b0f8e9624ea5f8",       "location": {…},
for you: 50-year plan to fix                   "createdAt": 1357840248,                "comments": {…},
Detroitnnhttp://t.co/kJ2l1FZv",              "type": "checkin",                      "filter": "Sierra",
  "source": "<a                                "shout": "Pharmacy #DRUGS!!!            "created_time": "1357826573",
href="http://twitter.com/download/andr   #ToothPulled :(",                             "link":
oid" rel="nofollow">Twitter for                "timeZone": "America/Detroit",      "http://instagr.am/p/UTk5Xut3gN/",
Android</a>",                                  "timeZoneOffset": -300,                 "likes": {…},
  "truncated": false,                          "user": {…},                            "images": {…},
  "in_reply_to_status_id": null,               "venue": {…}                            "caption": {…},
  "in_reply_to_status_id_str": null,         },                                        "user_has_liked": false,
  "in_reply_to_user_id": 41020312,           {…},                                      "id": "365798266911553549_3573549",
  "in_reply_to_user_id_str":                 {…},                                       "user": {…}
"41020312",                                 ]                                          },
  "in_reply_to_screen_name":              }                                            {…},
"landlessness",                          }                                             {…}
  "user": {…},                                                                        ]
  "geo": {…},                                                                       }
  "coordinates": {…},                                                              }
  "place": {…},
  "contributors”:{…},
  "retweet_count": 0,
  "entities": {…},
  "favorited": false,
  "retweeted": false,
  "possibly_sensitive": false
 },
 {…},
 {…}
]



                                                                                                                   25
Take the best of Foursquare and Instagram
{
 "meta": {…},
 "dogs": {…} /* include same info as single */
 "notifications": […],
}




                                                 26
How do we represent search results?
“   Selecting results is not the same as searching.
                                          -Facebook API
Bing Search                                        Google Custom Search                               Reddit Search
{                                                  {                                                  {
 "SearchResponse": {                                "kind": "customsearch#search",                    "kind": "Listing",
   "Version": "2.2",                                "url": {                                          "data": {
    "Query": {                                       "type": "application/json",                       "after": "t3_qy342",
    "SearchTerms": "sushi"                           "template":                                       "before": null,
   },                                              "https://www.googleapis.com/customsearch/v1?q={s    "children": [
   "Web": {                                        earchTerms}…},                                        {
    "Total": 95200000,                              "queries": {                                          "data": {
    "Offset": 0,                                     "request": [                                           "id": "f605o",
    "Results": [                                      {                                                     "num_comments": 943,
      {                                                 "title": "Google Custom Search - sushi",            "score": 1146,
       "Title": "The Sushi FAQ - The ultimate           "totalResults": "15000000",                         "ups": 3110,
guide to sushi and sashimi and how to ...",             "searchTerms": "sushi",                             "downs": 1964,
       "Description": "What is sushi?..",               "count": 10,                                        "created": 1295553753.0,
       "Url": "http://www.sushifaq.com/",               "startIndex": 1,                                    "url":
       "CacheUrl":                                    }                                               "http://www.reddit.com/r/AskReddit/comments/f605
"http://cc.bingj.com/cache.aspx?q=sushi&d=485519     ]                                                o/this_is_a_long_shot_any_sushi_chefs_need_a_job
0808495712&w=yU8fJS-YPT-f4svREMW2xSa75OoBUAZR",     },                                                _in/",
       "DisplayUrl": "www.sushifaq.com",            "context": {                                            "author": "jining",
       "DateTime": "2013-01-08T15:12:00Z"            "title": "Custom Search"                             }
      },                                            },                                                   },
      {                                             "searchInformation": {                               {
       "Title": "What Is Sushi? - Sushi Guide -      "searchTime": 0.314942,                              "data": {
Eatsushi.com",                                       "formattedSearchTime": "0.31",                         "id": "c9eng”,
       "Description": "Eatsushi.com...",             "totalResults": "15000000",                            "num_comments": 308,
       "Url":                                        "formattedTotalResults": "15,000,000"                  "score": 59,
"http://www.eatsushi.com/whatsushi.asp",            },                                                      "ups": 128,
       "CacheUrl":                                  "items": [                                              "downs": 69,
"http://cc.bingj.com/cache.aspx?q=sushi&d=501324     {                                                      "created": 1275155900.0,
9854931333&w=ihBzI9k9WbrnwxKcV3n8mOoV97M89K-b",       "kind": "customsearch#result",                        "url":
       "DisplayUrl":                                  "title": "Standardized Usage Statistics         "http://www.reddit.com/r/IAmA/comments/c9eng/i_a
"www.eatsushi.com/whatsushi.asp",                  Harvesting Initiative (SUSHI ... - NISO",          m_a_sushi_man_ama/",
       "DateTime": "2013-01-07T13:51:00Z"             "htmlTitle": "u003cbu003eStandardized Usage   "saved": false, "is_self": true, "permalink":
      }                                            Statistics Harvesting Initiativeu003c/bu003e     "/r/IAmA/comments/c9eng/i_am_a_sushi_man_ama/",
    ]                                              (u003cbu003eSUSHIu003c/bu003e                        "author": "IAmASushiMan”
   }                                               u003cbu003e...u003c/bu003e - NISO",                  }
 }                                                    "link":                                             }
}                                                  "http://www.niso.org/workrooms/sushi",                ]
                                                      "displayLink": "www.niso.org",                   }
                                                      "snippet": "The Standardized Usage Statistics   }
                                                   Harvesting Initiative (SUSHI) Protocol
                                                   standard (ANSI/NISO Z39.93-2007) defines an
                                                   automated request and response    model ...”,




                                                                                                                                             29
(Mostly) Follow Google Custom Search
{
 "meta": {
    "limit": 1,
    "offset": 10,
    "totalResults": 15000000,
    "query": "sushi",
    "searchTime": 0.314942
 },
 "results": [
   {},
   {},
   {}
 ]
}



                                       30
How do we represent links?
Netflix API
<link
  href=“http://api-public.netflix.com/catalog/people/100637”
  rel=“http://schemas.netflix.com/catalog/person.actor”
  title="Elijah Wood”
></link>



GitHub API

"organization": {
  "login": "octocat",
  "id": 1,
  "url": "https://api.github.com/users/octocat",
  "type": "Organization”
}
Follow Netflix and the Web Linking spec
<link
  href=“http://api-public.netflix.com/catalog/people/100637”
  rel=“http://schemas.netflix.com/catalog/person.actor”
  title="Elijah Wood”
></link>
How do we represent actions?
GitHub




Form-based API
”actions": [{
  “name”: “edit-repo”,
  “method”: “PATCH”,
  “href”: “https://api.github.com/repos/kevinswiber/siren”,
  ”fields”: [ { “name”: “name”, “type”: “text” },
    { “name”: “description”, “type”: “text” }
}]
Form-based API
"actions": [{
  "name": "edit-repo",
  “method”: “PATCH”,
  “href”: “https://api.github.com/repos/kevinswiber/siren”,
  ”fields”: [ { “name”: “name”, “type”: “text” },
    { “name”: “description”, “type”: “text” }
}]
How do we represent metadata?
Flickr API (inline)
<item
  type="photo”
  id="10289”
  server="2”
  views="47”
  faves="0”
  more="0">


Dropbox API (/metadata)
{
    "size": "225.4KB”,
    "rev": "35e97029684fe”,
    "bytes": 230783,
    "modified": "Tue, 19 Jul 2011 21:55:38 +0000”,
    "path": "/Getting_Started.pdf”,
    "is_dir": false,
    "icon": "page_white_acrobat”,
    "root": "dropbox”,
    "mime_type": "application/pdf”,
    "revision": 220823
}
Include a metadata in responses and consider a dedicated
/meta resource
{
 "meta": {
   "size": "225.4KB”,
   "rev": "35e97029684fe”,
   "bytes": 230783,
   "modified": "Tue, 19 Jul 2011 21:55:38 +0000”,
   "path": "/Getting_Started.pdf”,
   "is_dir": false,
   "icon": "page_white_acrobat”,
   "root": "dropbox”,
   "mime_type": "application/pdf”,
   "revision": 220823
 }
}

                                                           39
What can we learn from hypermedia types?
Atom/AtomPub
<?xml version="1.0"?>
<entry xmlns="http://www.w3.org/2005/Atom">
  <title>My New Collection</title>
  <id>urn:uuid:de46e3a1-e489-41a6-88a6-21e7f0e8e2d8</id>
  <updated>2009-06-12T12:13:46Z</updated>
  <author>
    <name>Daffy</name>
  </author>
  <summary type="text" />
  <content type="application/atom+xml;type=feed"
    src="http://example.org/my-new-collection"/>
  <link rel="edit”
    href="http://example.org/my-new-collection.atom" />
</entry>
XHTML
<ul class=“search user-list”>
  <li class=“user”>
    <div class="avatar">
      <a href="/users/@kevin">
        <img class=”user-image" src=”/img/avatar.png" />
      </a>
    </div>
    <div>
      <a href=“/users/@kevin” rel=“user messages”>
        <span class=“user-name”>@kevin</span>
        (<span class="user-text">@kevin</span>)
      </a>
    </div>
  </li>
</ul>
HAL

{
    “currentlyProcessing”: 14
    “shippedToday”: 20,
    “_links”: {
      “self”: { “href”: “/orders?page=2” },
      “next”: { “href”: “/orders?page=3” },
      “prev”: { “href”: “/orders?page=1” }
    }
}
Collection+JSON
{ “collection”:
  {
    “version”: “1.0”,
    “href”: “http://example.org/friends”,
    “items”: [
       “href”: “http://example.org/friends/kevin”,
       “data”: [
         {“name”: “full-name”, “value”: “Kevin Swiber” }
       ]
    ],
    “queries”: [
       {“rel”: “search”, “href”: “./search”, “data”: [
         {“name”: “search”, “value”: “” }
    ]
  }
}
Siren
{
    “class”: [“owner”, “vip”],
    “properties”: {
       “name”: “Kevin”
    },
    “entities”: [
       {
         “rel”: [“https://rels.x.io/dog”],
         “href”: “https://api.x.io/dogs/1”
       }
    ],
    “actions”: [
       {
          “name”: “adopt”,
          “method”: “POST”,
          “href”: “https://api.x.io/owners/1/dogs”,
          “fields”: [ { “name”: “dog-name”, “type”: “text” } ]
       }
    ],
    “links”: [
       { “rel”: [“self”], “href”: “https://api.x.io/owners/1” }
    ]
}
How do we accept binary data?
multipart/form-data
Content-Type: multipart/form-data; boundary=AaB03x

--AaB03x
Content-Disposition: form-data; name=“caption”

Cool picture of my cat.
--AaB03x
Content-Disposition: form-data; name=“photo”; filename=“catpajamas.jpg”
Content-Type: image/jpeg
Content-Transfer-Encoding: binary

…contents of catpajamas.jpg…
--AaB03x
Inline Base64 Encoding
POST /photos
{
  “caption”: “Cool picture of my cat.”
  “photo”: “RHVkZSwgbXkgY2F0IGhhcyB0aGUgYmVzdCBwYWphbWFzLg==”
}
2-Step Process
POST /photos
{
  “caption”: “Cool picture of my cat.”
}


PUT /photos/1234/data
Content-Type: image/jpeg
Content-Length: 240
Content-Transfer-Encoding: binary

…binary content…
Opt for multipart/form-data.
Be consistent.
How do we support caching?
Expiration

200 OK
Cache-Control: private, max-age=2592000
ETags


GET /dogs/1
ETag: “a7D92kda94aisdfG”


GET /dogs/1
If-None-Match: “a7D92kda94aisdfG”
Last-Modified


GET /dogs/1
Last-Modified: Thu, 10 Jan 2013 19:43:31 GMT


GET /dogs/1
If-Modified-Since: Thu, 10 Jan 2013 19:43:31 GMT
Think about the client.
Do we need a JavaScript API?
Yes. Follow LinkedIn’s lead.
What about posting data?
application/x-www-form-urlencoded



 breed=Dachshund&name=Hotdog&age=2
application/xml


<dog>
 <breed>Dachshund</breed>
 <name>Hotdog</name>
 <age>2</age>
</dog>
application/json


 {
     “breed”: “Dachshund”,
     “name”: “Hotdog”,
     “age”: 2
 }
Favor application/x-www-form-urlencoded data.
How do we handle transactions?
Create a Transaction
POST /carts
…
201 Created
Location: /carts/1
Add Items
POST /carts/1/items/
{ “productId”: “mittens123”, “quantity”: 1 }
…
201 Created
Location: /cartItems/1234
Commit the Transaction
POST /carts/1
{ “message”: “checkout” }
…
200 OK
Summary
•   Checkout previous editions for URI design
•   Start with API modeling
•   Use OAuth for security
•   Good message design is for developers
•   Learn from hypermedia specs
•   More on transactions later
Questions?
THANK YOU
Subscribe to API webinars at:
youtube.com/apigee
THANK YOU
Questions and ideas to:
groups.google.com/group/api-craft
THANK YOU
Contact us at:

@landlessness
brian@apigee.com

@kevinswiber
kswiber@apigee.com

@apigee

More Related Content

What's hot

Full Text Search In PostgreSQL
Full Text Search In PostgreSQLFull Text Search In PostgreSQL
Full Text Search In PostgreSQL
Karwin Software Solutions LLC
 
RESTful services on IBM Domino/XWork
RESTful services on IBM Domino/XWorkRESTful services on IBM Domino/XWork
RESTful services on IBM Domino/XWorkJohn Dalsgaard
 
XPages Workshop: Concepts And Exercises
XPages Workshop:   Concepts And ExercisesXPages Workshop:   Concepts And Exercises
XPages Workshop: Concepts And Exercises
ddrschiw
 
Greenplum 6 Changes
Greenplum 6 ChangesGreenplum 6 Changes
Greenplum 6 Changes
VMware Tanzu
 
OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate ...
OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate ...OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate ...
OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate ...
Christopher Frohoff
 
Grafana optimization for Prometheus
Grafana optimization for PrometheusGrafana optimization for Prometheus
Grafana optimization for Prometheus
Mitsuhiro Tanda
 
Etsy Activity Feeds Architecture
Etsy Activity Feeds ArchitectureEtsy Activity Feeds Architecture
Etsy Activity Feeds ArchitectureDan McKinley
 
Yaml
YamlYaml
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to RedisDvir Volk
 
Redis + Structured Streaming—A Perfect Combination to Scale-Out Your Continuo...
Redis + Structured Streaming—A Perfect Combination to Scale-Out Your Continuo...Redis + Structured Streaming—A Perfect Combination to Scale-Out Your Continuo...
Redis + Structured Streaming—A Perfect Combination to Scale-Out Your Continuo...
Databricks
 
Automate DBA Tasks With Ansible
Automate DBA Tasks With AnsibleAutomate DBA Tasks With Ansible
Automate DBA Tasks With Ansible
Ivica Arsov
 
ORC 2015
ORC 2015ORC 2015
ORC 2015
t3rmin4t0r
 
MySQL Monitoring using Prometheus & Grafana
MySQL Monitoring using Prometheus & GrafanaMySQL Monitoring using Prometheus & Grafana
MySQL Monitoring using Prometheus & Grafana
YoungHeon (Roy) Kim
 
Pinot: Enabling Real-time Analytics Applications @ LinkedIn's Scale
Pinot: Enabling Real-time Analytics Applications @ LinkedIn's ScalePinot: Enabling Real-time Analytics Applications @ LinkedIn's Scale
Pinot: Enabling Real-time Analytics Applications @ LinkedIn's Scale
Seunghyun Lee
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcached
Jurriaan Persyn
 
TypeScript Best Practices
TypeScript Best PracticesTypeScript Best Practices
TypeScript Best Practices
felixbillon
 
Redis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
Redis + Apache Spark = Swiss Army Knife Meets Kitchen SinkRedis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
Redis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
Databricks
 
Apache Arrow: Open Source Standard Becomes an Enterprise Necessity
Apache Arrow: Open Source Standard Becomes an Enterprise NecessityApache Arrow: Open Source Standard Becomes an Enterprise Necessity
Apache Arrow: Open Source Standard Becomes an Enterprise Necessity
Wes McKinney
 
Java 8-streams-collectors-patterns
Java 8-streams-collectors-patternsJava 8-streams-collectors-patterns
Java 8-streams-collectors-patterns
José Paumard
 
HBase and HDFS: Understanding FileSystem Usage in HBase
HBase and HDFS: Understanding FileSystem Usage in HBaseHBase and HDFS: Understanding FileSystem Usage in HBase
HBase and HDFS: Understanding FileSystem Usage in HBaseenissoz
 

What's hot (20)

Full Text Search In PostgreSQL
Full Text Search In PostgreSQLFull Text Search In PostgreSQL
Full Text Search In PostgreSQL
 
RESTful services on IBM Domino/XWork
RESTful services on IBM Domino/XWorkRESTful services on IBM Domino/XWork
RESTful services on IBM Domino/XWork
 
XPages Workshop: Concepts And Exercises
XPages Workshop:   Concepts And ExercisesXPages Workshop:   Concepts And Exercises
XPages Workshop: Concepts And Exercises
 
Greenplum 6 Changes
Greenplum 6 ChangesGreenplum 6 Changes
Greenplum 6 Changes
 
OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate ...
OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate ...OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate ...
OWASP SD: Deserialize My Shorts: Or How I Learned To Start Worrying and Hate ...
 
Grafana optimization for Prometheus
Grafana optimization for PrometheusGrafana optimization for Prometheus
Grafana optimization for Prometheus
 
Etsy Activity Feeds Architecture
Etsy Activity Feeds ArchitectureEtsy Activity Feeds Architecture
Etsy Activity Feeds Architecture
 
Yaml
YamlYaml
Yaml
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
Redis + Structured Streaming—A Perfect Combination to Scale-Out Your Continuo...
Redis + Structured Streaming—A Perfect Combination to Scale-Out Your Continuo...Redis + Structured Streaming—A Perfect Combination to Scale-Out Your Continuo...
Redis + Structured Streaming—A Perfect Combination to Scale-Out Your Continuo...
 
Automate DBA Tasks With Ansible
Automate DBA Tasks With AnsibleAutomate DBA Tasks With Ansible
Automate DBA Tasks With Ansible
 
ORC 2015
ORC 2015ORC 2015
ORC 2015
 
MySQL Monitoring using Prometheus & Grafana
MySQL Monitoring using Prometheus & GrafanaMySQL Monitoring using Prometheus & Grafana
MySQL Monitoring using Prometheus & Grafana
 
Pinot: Enabling Real-time Analytics Applications @ LinkedIn's Scale
Pinot: Enabling Real-time Analytics Applications @ LinkedIn's ScalePinot: Enabling Real-time Analytics Applications @ LinkedIn's Scale
Pinot: Enabling Real-time Analytics Applications @ LinkedIn's Scale
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcached
 
TypeScript Best Practices
TypeScript Best PracticesTypeScript Best Practices
TypeScript Best Practices
 
Redis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
Redis + Apache Spark = Swiss Army Knife Meets Kitchen SinkRedis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
Redis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
 
Apache Arrow: Open Source Standard Becomes an Enterprise Necessity
Apache Arrow: Open Source Standard Becomes an Enterprise NecessityApache Arrow: Open Source Standard Becomes an Enterprise Necessity
Apache Arrow: Open Source Standard Becomes an Enterprise Necessity
 
Java 8-streams-collectors-patterns
Java 8-streams-collectors-patternsJava 8-streams-collectors-patterns
Java 8-streams-collectors-patterns
 
HBase and HDFS: Understanding FileSystem Usage in HBase
HBase and HDFS: Understanding FileSystem Usage in HBaseHBase and HDFS: Understanding FileSystem Usage in HBase
HBase and HDFS: Understanding FileSystem Usage in HBase
 

Viewers also liked

Microservices Done Right: Key Ingredients for Microservices Success
Microservices Done Right: Key Ingredients for Microservices SuccessMicroservices Done Right: Key Ingredients for Microservices Success
Microservices Done Right: Key Ingredients for Microservices Success
Apigee | Google Cloud
 
Pump api 675 presentation
Pump api 675 presentationPump api 675 presentation
Pump api 675 presentation
Vothanh Trung
 
Apache Mahout 맛보기 - 30분만에 추천시스템 만들기 for 네이버 TV 서비스
Apache Mahout 맛보기 - 30분만에 추천시스템 만들기 for 네이버 TV 서비스Apache Mahout 맛보기 - 30분만에 추천시스템 만들기 for 네이버 TV 서비스
Apache Mahout 맛보기 - 30분만에 추천시스템 만들기 for 네이버 TV 서비스
Minkyu Cho
 
What Makes a Great Open API?
What Makes a Great Open API?What Makes a Great Open API?
What Makes a Great Open API?
John Musser
 
Golden Rules of API Design
Golden Rules of API DesignGolden Rules of API Design
Golden Rules of API Design
David Koelle
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabricandymccurdy
 
logback 세미나 발표자료
logback 세미나 발표자료logback 세미나 발표자료
logback 세미나 발표자료
JungGeun Lee
 
APIs Inside Enterprise - SOA Displacement?
APIs Inside Enterprise - SOA Displacement?APIs Inside Enterprise - SOA Displacement?
APIs Inside Enterprise - SOA Displacement?Apigee | Google Cloud
 
Economic Models for Reinventing Telco - Innovation with APIs
Economic Models for Reinventing Telco - Innovation with APIsEconomic Models for Reinventing Telco - Innovation with APIs
Economic Models for Reinventing Telco - Innovation with APIsApigee | Google Cloud
 
API Management for Software Defined Network (SDN)
API Management for Software Defined Network (SDN)API Management for Software Defined Network (SDN)
API Management for Software Defined Network (SDN)Apigee | Google Cloud
 
API Product Management - Driving Success through the Value Chain
API Product Management - Driving Success through the Value ChainAPI Product Management - Driving Success through the Value Chain
API Product Management - Driving Success through the Value Chain
Apigee | Google Cloud
 
How To Design A Good A P I And Why It Matters G O O G L E
How To Design A Good  A P I And Why It Matters    G O O G L EHow To Design A Good  A P I And Why It Matters    G O O G L E
How To Design A Good A P I And Why It Matters G O O G L Eguestbe92f4
 
Design Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIsDesign Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIs
Stormpath
 
Skeuomorphs, Databases, and Mobile Performance
Skeuomorphs, Databases, and Mobile PerformanceSkeuomorphs, Databases, and Mobile Performance
Skeuomorphs, Databases, and Mobile PerformanceApigee | Google Cloud
 
Visbility at the Edge - Deep Insights from Your API
 Visbility at the Edge - Deep Insights from Your API Visbility at the Edge - Deep Insights from Your API
Visbility at the Edge - Deep Insights from Your API
Apigee | Google Cloud
 
HTML5: The Apps, the Frameworks, the Controversy
HTML5: The Apps, the Frameworks, the Controversy HTML5: The Apps, the Frameworks, the Controversy
HTML5: The Apps, the Frameworks, the Controversy Apigee | Google Cloud
 
The Anatomy of Apps - How iPhone, Android & Facebook Apps Consume APIs
The Anatomy of Apps - How iPhone, Android & Facebook Apps Consume APIsThe Anatomy of Apps - How iPhone, Android & Facebook Apps Consume APIs
The Anatomy of Apps - How iPhone, Android & Facebook Apps Consume APIs
Apigee | Google Cloud
 
The API Facade Pattern: People - Episode 4
The API Facade Pattern: People - Episode 4The API Facade Pattern: People - Episode 4
The API Facade Pattern: People - Episode 4
Apigee | Google Cloud
 
Crafting APIs for Mobile Apps - Everything You Need to Know
Crafting APIs for Mobile Apps - Everything You Need to KnowCrafting APIs for Mobile Apps - Everything You Need to Know
Crafting APIs for Mobile Apps - Everything You Need to KnowApigee | Google Cloud
 
Essential API Facade Patterns: One Phase to Two Phase Conversion (Episode 3)
Essential API Facade Patterns: One Phase to Two Phase Conversion (Episode 3)Essential API Facade Patterns: One Phase to Two Phase Conversion (Episode 3)
Essential API Facade Patterns: One Phase to Two Phase Conversion (Episode 3)Apigee | Google Cloud
 

Viewers also liked (20)

Microservices Done Right: Key Ingredients for Microservices Success
Microservices Done Right: Key Ingredients for Microservices SuccessMicroservices Done Right: Key Ingredients for Microservices Success
Microservices Done Right: Key Ingredients for Microservices Success
 
Pump api 675 presentation
Pump api 675 presentationPump api 675 presentation
Pump api 675 presentation
 
Apache Mahout 맛보기 - 30분만에 추천시스템 만들기 for 네이버 TV 서비스
Apache Mahout 맛보기 - 30분만에 추천시스템 만들기 for 네이버 TV 서비스Apache Mahout 맛보기 - 30분만에 추천시스템 만들기 for 네이버 TV 서비스
Apache Mahout 맛보기 - 30분만에 추천시스템 만들기 for 네이버 TV 서비스
 
What Makes a Great Open API?
What Makes a Great Open API?What Makes a Great Open API?
What Makes a Great Open API?
 
Golden Rules of API Design
Golden Rules of API DesignGolden Rules of API Design
Golden Rules of API Design
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabric
 
logback 세미나 발표자료
logback 세미나 발표자료logback 세미나 발표자료
logback 세미나 발표자료
 
APIs Inside Enterprise - SOA Displacement?
APIs Inside Enterprise - SOA Displacement?APIs Inside Enterprise - SOA Displacement?
APIs Inside Enterprise - SOA Displacement?
 
Economic Models for Reinventing Telco - Innovation with APIs
Economic Models for Reinventing Telco - Innovation with APIsEconomic Models for Reinventing Telco - Innovation with APIs
Economic Models for Reinventing Telco - Innovation with APIs
 
API Management for Software Defined Network (SDN)
API Management for Software Defined Network (SDN)API Management for Software Defined Network (SDN)
API Management for Software Defined Network (SDN)
 
API Product Management - Driving Success through the Value Chain
API Product Management - Driving Success through the Value ChainAPI Product Management - Driving Success through the Value Chain
API Product Management - Driving Success through the Value Chain
 
How To Design A Good A P I And Why It Matters G O O G L E
How To Design A Good  A P I And Why It Matters    G O O G L EHow To Design A Good  A P I And Why It Matters    G O O G L E
How To Design A Good A P I And Why It Matters G O O G L E
 
Design Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIsDesign Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIs
 
Skeuomorphs, Databases, and Mobile Performance
Skeuomorphs, Databases, and Mobile PerformanceSkeuomorphs, Databases, and Mobile Performance
Skeuomorphs, Databases, and Mobile Performance
 
Visbility at the Edge - Deep Insights from Your API
 Visbility at the Edge - Deep Insights from Your API Visbility at the Edge - Deep Insights from Your API
Visbility at the Edge - Deep Insights from Your API
 
HTML5: The Apps, the Frameworks, the Controversy
HTML5: The Apps, the Frameworks, the Controversy HTML5: The Apps, the Frameworks, the Controversy
HTML5: The Apps, the Frameworks, the Controversy
 
The Anatomy of Apps - How iPhone, Android & Facebook Apps Consume APIs
The Anatomy of Apps - How iPhone, Android & Facebook Apps Consume APIsThe Anatomy of Apps - How iPhone, Android & Facebook Apps Consume APIs
The Anatomy of Apps - How iPhone, Android & Facebook Apps Consume APIs
 
The API Facade Pattern: People - Episode 4
The API Facade Pattern: People - Episode 4The API Facade Pattern: People - Episode 4
The API Facade Pattern: People - Episode 4
 
Crafting APIs for Mobile Apps - Everything You Need to Know
Crafting APIs for Mobile Apps - Everything You Need to KnowCrafting APIs for Mobile Apps - Everything You Need to Know
Crafting APIs for Mobile Apps - Everything You Need to Know
 
Essential API Facade Patterns: One Phase to Two Phase Conversion (Episode 3)
Essential API Facade Patterns: One Phase to Two Phase Conversion (Episode 3)Essential API Facade Patterns: One Phase to Two Phase Conversion (Episode 3)
Essential API Facade Patterns: One Phase to Two Phase Conversion (Episode 3)
 

Similar to API Design - 3rd Edition

HackMIT Presentation
HackMIT PresentationHackMIT Presentation
HackMIT Presentation
Matt Harris
 
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
South Tyrol Free Software Conference
 
Social media mashup website's
Social media mashup website'sSocial media mashup website's
Social media mashup website's
Mathias Vissers
 
Practical MongoDB
Practical MongoDBPractical MongoDB
Practical MongoDB
Will Button
 
Montreal Elasticsearch Meetup
Montreal Elasticsearch MeetupMontreal Elasticsearch Meetup
Montreal Elasticsearch Meetup
Loïc Bertron
 
Automatic discovery of Web API Specifications: an example-driven approach
Automatic discovery of Web API Specifications: an example-driven approachAutomatic discovery of Web API Specifications: an example-driven approach
Automatic discovery of Web API Specifications: an example-driven approach
Jordi Cabot
 
Example-driven Web API Specification Discovery
Example-driven Web API Specification DiscoveryExample-driven Web API Specification Discovery
Example-driven Web API Specification Discovery
Javier Canovas
 
Api
ApiApi
The Flash Facebook Cookbook - FlashMidlands
The Flash Facebook Cookbook - FlashMidlandsThe Flash Facebook Cookbook - FlashMidlands
The Flash Facebook Cookbook - FlashMidlandsJames Ford
 
HackMIT Lightning Talk
HackMIT Lightning TalkHackMIT Lightning Talk
HackMIT Lightning Talk
Matt Harris
 
Big data. Opportunità e rischi
Big data. Opportunità e rischiBig data. Opportunità e rischi
Intro to developing for @twitterapi (updated)
Intro to developing for @twitterapi (updated)Intro to developing for @twitterapi (updated)
Intro to developing for @twitterapi (updated)
Raffi Krikorian
 
ELK Stack - Turn boring logfiles into sexy dashboard
ELK Stack - Turn boring logfiles into sexy dashboardELK Stack - Turn boring logfiles into sexy dashboard
ELK Stack - Turn boring logfiles into sexy dashboard
Georg Sorst
 
Elasticmeetup curiosity 20141113
Elasticmeetup curiosity 20141113Elasticmeetup curiosity 20141113
Elasticmeetup curiosity 20141113Erwan Pigneul
 
The Rise of NoSQL
The Rise of NoSQLThe Rise of NoSQL
The Rise of NoSQL
Arnd Kleinbeck
 
Curiosity, outil de recherche open source par PagesJaunes
Curiosity, outil de recherche open source par PagesJaunesCuriosity, outil de recherche open source par PagesJaunes
Curiosity, outil de recherche open source par PagesJaunes
PagesJaunes
 
NoSQL & MongoDB
NoSQL & MongoDBNoSQL & MongoDB
NoSQL & MongoDB
Shuai Liu
 
Beautiful REST+JSON APIs with Ion
Beautiful REST+JSON APIs with IonBeautiful REST+JSON APIs with Ion
Beautiful REST+JSON APIs with Ion
Stormpath
 
Unleashing Twitter Data for Fun and Insight
Unleashing Twitter Data for Fun and InsightUnleashing Twitter Data for Fun and Insight
Unleashing Twitter Data for Fun and Insight
Matthew Russell
 

Similar to API Design - 3rd Edition (20)

HackMIT Presentation
HackMIT PresentationHackMIT Presentation
HackMIT Presentation
 
Data exchange formats
Data exchange formatsData exchange formats
Data exchange formats
 
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
 
Social media mashup website's
Social media mashup website'sSocial media mashup website's
Social media mashup website's
 
Practical MongoDB
Practical MongoDBPractical MongoDB
Practical MongoDB
 
Montreal Elasticsearch Meetup
Montreal Elasticsearch MeetupMontreal Elasticsearch Meetup
Montreal Elasticsearch Meetup
 
Automatic discovery of Web API Specifications: an example-driven approach
Automatic discovery of Web API Specifications: an example-driven approachAutomatic discovery of Web API Specifications: an example-driven approach
Automatic discovery of Web API Specifications: an example-driven approach
 
Example-driven Web API Specification Discovery
Example-driven Web API Specification DiscoveryExample-driven Web API Specification Discovery
Example-driven Web API Specification Discovery
 
Api
ApiApi
Api
 
The Flash Facebook Cookbook - FlashMidlands
The Flash Facebook Cookbook - FlashMidlandsThe Flash Facebook Cookbook - FlashMidlands
The Flash Facebook Cookbook - FlashMidlands
 
HackMIT Lightning Talk
HackMIT Lightning TalkHackMIT Lightning Talk
HackMIT Lightning Talk
 
Big data. Opportunità e rischi
Big data. Opportunità e rischiBig data. Opportunità e rischi
Big data. Opportunità e rischi
 
Intro to developing for @twitterapi (updated)
Intro to developing for @twitterapi (updated)Intro to developing for @twitterapi (updated)
Intro to developing for @twitterapi (updated)
 
ELK Stack - Turn boring logfiles into sexy dashboard
ELK Stack - Turn boring logfiles into sexy dashboardELK Stack - Turn boring logfiles into sexy dashboard
ELK Stack - Turn boring logfiles into sexy dashboard
 
Elasticmeetup curiosity 20141113
Elasticmeetup curiosity 20141113Elasticmeetup curiosity 20141113
Elasticmeetup curiosity 20141113
 
The Rise of NoSQL
The Rise of NoSQLThe Rise of NoSQL
The Rise of NoSQL
 
Curiosity, outil de recherche open source par PagesJaunes
Curiosity, outil de recherche open source par PagesJaunesCuriosity, outil de recherche open source par PagesJaunes
Curiosity, outil de recherche open source par PagesJaunes
 
NoSQL & MongoDB
NoSQL & MongoDBNoSQL & MongoDB
NoSQL & MongoDB
 
Beautiful REST+JSON APIs with Ion
Beautiful REST+JSON APIs with IonBeautiful REST+JSON APIs with Ion
Beautiful REST+JSON APIs with Ion
 
Unleashing Twitter Data for Fun and Insight
Unleashing Twitter Data for Fun and InsightUnleashing Twitter Data for Fun and Insight
Unleashing Twitter Data for Fun and Insight
 

More from Apigee | Google Cloud

How Secure Are Your APIs?
How Secure Are Your APIs?How Secure Are Your APIs?
How Secure Are Your APIs?
Apigee | Google Cloud
 
Magazine Luiza at a glance (1)
Magazine Luiza at a glance (1)Magazine Luiza at a glance (1)
Magazine Luiza at a glance (1)
Apigee | Google Cloud
 
Monetization: Unlock More Value from Your APIs
Monetization: Unlock More Value from Your APIs Monetization: Unlock More Value from Your APIs
Monetization: Unlock More Value from Your APIs
Apigee | Google Cloud
 
Apigee Demo: API Platform Overview
Apigee Demo: API Platform OverviewApigee Demo: API Platform Overview
Apigee Demo: API Platform Overview
Apigee | Google Cloud
 
Ticketmaster at a glance
Ticketmaster at a glanceTicketmaster at a glance
Ticketmaster at a glance
Apigee | Google Cloud
 
AccuWeather: Recasting API Experiences in a Developer-First World
AccuWeather: Recasting API Experiences in a Developer-First WorldAccuWeather: Recasting API Experiences in a Developer-First World
AccuWeather: Recasting API Experiences in a Developer-First World
Apigee | Google Cloud
 
Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?
Apigee | Google Cloud
 
Apigee Product Roadmap Part 2
Apigee Product Roadmap Part 2Apigee Product Roadmap Part 2
Apigee Product Roadmap Part 2
Apigee | Google Cloud
 
The Four Transformative Forces of the API Management Market
The Four Transformative Forces of the API Management MarketThe Four Transformative Forces of the API Management Market
The Four Transformative Forces of the API Management Market
Apigee | Google Cloud
 
Walgreens at a glance
Walgreens at a glanceWalgreens at a glance
Walgreens at a glance
Apigee | Google Cloud
 
Apigee Edge: Intro to Microgateway
Apigee Edge: Intro to MicrogatewayApigee Edge: Intro to Microgateway
Apigee Edge: Intro to Microgateway
Apigee | Google Cloud
 
Managing the Complexity of Microservices Deployments
Managing the Complexity of Microservices DeploymentsManaging the Complexity of Microservices Deployments
Managing the Complexity of Microservices Deployments
Apigee | Google Cloud
 
Pitney Bowes at a glance
Pitney Bowes at a glancePitney Bowes at a glance
Pitney Bowes at a glance
Apigee | Google Cloud
 
Adapt or Die: Opening Keynote with Chet Kapoor
Adapt or Die: Opening Keynote with Chet KapoorAdapt or Die: Opening Keynote with Chet Kapoor
Adapt or Die: Opening Keynote with Chet Kapoor
Apigee | Google Cloud
 
Adapt or Die: Keynote with Greg Brail
Adapt or Die: Keynote with Greg BrailAdapt or Die: Keynote with Greg Brail
Adapt or Die: Keynote with Greg Brail
Apigee | Google Cloud
 
Adapt or Die: Keynote with Anant Jhingran
Adapt or Die: Keynote with Anant JhingranAdapt or Die: Keynote with Anant Jhingran
Adapt or Die: Keynote with Anant Jhingran
Apigee | Google Cloud
 
London Adapt or Die: Opening Keynot
London Adapt or Die: Opening KeynotLondon Adapt or Die: Opening Keynot
London Adapt or Die: Opening Keynot
Apigee | Google Cloud
 
London Adapt or Die: Lunch keynote
London Adapt or Die: Lunch keynoteLondon Adapt or Die: Lunch keynote
London Adapt or Die: Lunch keynote
Apigee | Google Cloud
 
London Adapt or Die: Closing Keynote — Adapt Now!
London Adapt or Die: Closing Keynote — Adapt Now!London Adapt or Die: Closing Keynote — Adapt Now!
London Adapt or Die: Closing Keynote — Adapt Now!
Apigee | Google Cloud
 
London adapt or-die opening keynote chet kapoor
London adapt or-die opening keynote chet kapoorLondon adapt or-die opening keynote chet kapoor
London adapt or-die opening keynote chet kapoor
Apigee | Google Cloud
 

More from Apigee | Google Cloud (20)

How Secure Are Your APIs?
How Secure Are Your APIs?How Secure Are Your APIs?
How Secure Are Your APIs?
 
Magazine Luiza at a glance (1)
Magazine Luiza at a glance (1)Magazine Luiza at a glance (1)
Magazine Luiza at a glance (1)
 
Monetization: Unlock More Value from Your APIs
Monetization: Unlock More Value from Your APIs Monetization: Unlock More Value from Your APIs
Monetization: Unlock More Value from Your APIs
 
Apigee Demo: API Platform Overview
Apigee Demo: API Platform OverviewApigee Demo: API Platform Overview
Apigee Demo: API Platform Overview
 
Ticketmaster at a glance
Ticketmaster at a glanceTicketmaster at a glance
Ticketmaster at a glance
 
AccuWeather: Recasting API Experiences in a Developer-First World
AccuWeather: Recasting API Experiences in a Developer-First WorldAccuWeather: Recasting API Experiences in a Developer-First World
AccuWeather: Recasting API Experiences in a Developer-First World
 
Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?
 
Apigee Product Roadmap Part 2
Apigee Product Roadmap Part 2Apigee Product Roadmap Part 2
Apigee Product Roadmap Part 2
 
The Four Transformative Forces of the API Management Market
The Four Transformative Forces of the API Management MarketThe Four Transformative Forces of the API Management Market
The Four Transformative Forces of the API Management Market
 
Walgreens at a glance
Walgreens at a glanceWalgreens at a glance
Walgreens at a glance
 
Apigee Edge: Intro to Microgateway
Apigee Edge: Intro to MicrogatewayApigee Edge: Intro to Microgateway
Apigee Edge: Intro to Microgateway
 
Managing the Complexity of Microservices Deployments
Managing the Complexity of Microservices DeploymentsManaging the Complexity of Microservices Deployments
Managing the Complexity of Microservices Deployments
 
Pitney Bowes at a glance
Pitney Bowes at a glancePitney Bowes at a glance
Pitney Bowes at a glance
 
Adapt or Die: Opening Keynote with Chet Kapoor
Adapt or Die: Opening Keynote with Chet KapoorAdapt or Die: Opening Keynote with Chet Kapoor
Adapt or Die: Opening Keynote with Chet Kapoor
 
Adapt or Die: Keynote with Greg Brail
Adapt or Die: Keynote with Greg BrailAdapt or Die: Keynote with Greg Brail
Adapt or Die: Keynote with Greg Brail
 
Adapt or Die: Keynote with Anant Jhingran
Adapt or Die: Keynote with Anant JhingranAdapt or Die: Keynote with Anant Jhingran
Adapt or Die: Keynote with Anant Jhingran
 
London Adapt or Die: Opening Keynot
London Adapt or Die: Opening KeynotLondon Adapt or Die: Opening Keynot
London Adapt or Die: Opening Keynot
 
London Adapt or Die: Lunch keynote
London Adapt or Die: Lunch keynoteLondon Adapt or Die: Lunch keynote
London Adapt or Die: Lunch keynote
 
London Adapt or Die: Closing Keynote — Adapt Now!
London Adapt or Die: Closing Keynote — Adapt Now!London Adapt or Die: Closing Keynote — Adapt Now!
London Adapt or Die: Closing Keynote — Adapt Now!
 
London adapt or-die opening keynote chet kapoor
London adapt or-die opening keynote chet kapoorLondon adapt or-die opening keynote chet kapoor
London adapt or-die opening keynote chet kapoor
 

Recently uploaded

Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 

Recently uploaded (20)

Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 

API Design - 3rd Edition

  • 1. API Design 3rd Edition Brian Mulloy @landlessness Kevin Swiber Apigee @kevinswiber @apigee
  • 5. @landlessness @kevinswiber
  • 6. The real issue is about design: designing things that have the power required for the job while maintaining understandability, the feeling of control, and the pleasure of accomplishment. -Donald Norman
  • 8. Agenda • Recap Previous Edition • API Modeling • Security • Message Design • Hypermedia • Transactions
  • 10. URL Design Versioning Plural nouns for /dogs Include version in /v1/dogs collections URL ID for entity /dogs/1234 Keep one previous /v1/dogs version long /v2/dogs Associations /owners/5678/dogs enough for POST GET PUT DELETE developers to 4 HTTP migrate Methods Bias toward /dogs (not animals) concrete names Errors Multiple /dogs.json 8 Status Codes 200 201 304 400 401 403 404 500 formats in URL /dogs.xml Verbose messages {"msg": "verbose, plain language hints"} Paginate with ?limit=10&offset=0 limit and offset Query params ?color=red&state=running Client Considerations Partial selection ?fields=name,state Client does not ?suppress_response_codes=true Use medial "createdAt": 1320296464 support HTTP capitalization myObject.createdAt; status codes /convert?from=EUR&to=CNY&amoun Client does not GET /dogs?method=post Use verbs for GET /dogs non-resource t=100 support HTTP GET /dogs?method=put requests methods GET /dogs?method=delete Search /search?q=happy%2Blabrador Complement API 1. JavaScript with SDK and code 2. … DNS api.foo.com 3. … developers.foo.com libraries
  • 11. How do we get started with our API?
  • 12. Build an API Model http://www.flickr.com/photos/brent_nashville/2156695472/in/photostream/
  • 13. Don’t Go Cowboy http://www.flickr.com/photos/theory/3364213389/in/photostream/
  • 14. How do we secure our API?
  • 15. Twitter Streaming API Authorization: Basic aWhlYXJ0OmFwaXM= Amazon Web Services API Authorization: AWS AKIAIOSFODNN7EXAMPLE:frJIUNo//yllqDzg= Google API Authorization: Bearer 1/fFBGRNJru1FQd44AzqT3Zg
  • 17. How do approach message design?
  • 18. Support multiple formats JSON and XML
  • 19. Make JSON the default
  • 20. How do we represent single items?
  • 21. Twitter Foursquare Instagram { { { "created_at": "Thu Jan 10 08:44:59 "meta": {…}, "meta": {…}, +0000 2013", "notifications": […], "data": {} "id": 289291736440791040, "response": {} } "id_str": "289291736440791040", } "text": "@landlessness here's one for you: 50-year plan to fix Detroitnnhttp://t.co/kJ2l1FZv", "source": "<a href="http://twitter.com/download/andr oid" rel="nofollow">Twitter for Android</a>", "truncated": false, "in_reply_to_status_id": null, "in_reply_to_status_id_str": null, "in_reply_to_user_id": 41020312, "in_reply_to_user_id_str": "41020312", "in_reply_to_screen_name": "landlessness", "user": {…}, "geo": {…}, "coordinates": {…}, "place": {…}, "contributors”:{…}, "retweet_count": 0, "entities": {…}, "favorited": false, "retweeted": false, "possibly_sensitive": false } 21
  • 22. Twitter Foursquare Instagram { { { "created_at": "Thu Jan 10 08:44:59 "meta": {…}, "meta": {…}, +0000 2013", "notifications": […], "data": { "id": 289291736440791040, "response": { "attribution": {…}, "id_str": "289291736440791040", "checkin": { "type": "image", "text": "@landlessness here's one "id": "50eeff78e4b0f8e9624ea5f8", "location": {…}, for you: 50-year plan to fix "createdAt": 1357840248, "comments": {…}, Detroitnnhttp://t.co/kJ2l1FZv", "type": "checkin", "filter": "Sierra", "source": "<a "shout": "Pharmacy #DRUGS!!! "created_time": "1357826573", href="http://twitter.com/download/andr #ToothPulled :(", "link": oid" rel="nofollow">Twitter for "timeZone": "America/Detroit", "http://instagr.am/p/UTk5Xut3gN/", Android</a>", "timeZoneOffset": -300, "likes": {…}, "truncated": false, "user": {…}, "images": {…}, "in_reply_to_status_id": null, "venue": {…}, "caption": {…}, "in_reply_to_status_id_str": null, "source": {…} "user_has_liked": false, "in_reply_to_user_id": 41020312, } "id": "365798266911553549_3573549", "in_reply_to_user_id_str": } "user": {…} "41020312", } } "in_reply_to_screen_name": } "landlessness", "user": {…}, "geo": {…}, "coordinates": {…}, "place": {…}, "contributors”:{…}, "retweet_count": 0, "entities": {…}, "favorited": false, "retweeted": false, "possibly_sensitive": false } 22
  • 23. Take the best of Foursquare and Instagram { "meta": {…}, "dog": {…} "notifications": […], } 23
  • 24. How do we represent collections?
  • 25. Twitter Foursquare Instagram [ { { { "meta": {…}, "meta": {…}, "created_at": "Thu Jan 10 08:44:59 "notifications": […], "data": [ +0000 2013", "response": { { "id": 289291736440791040, "recent": [ "attribution": {…}, "id_str": "289291736440791040", { "type": "image", "text": "@landlessness here's one "id": "50eeff78e4b0f8e9624ea5f8", "location": {…}, for you: 50-year plan to fix "createdAt": 1357840248, "comments": {…}, Detroitnnhttp://t.co/kJ2l1FZv", "type": "checkin", "filter": "Sierra", "source": "<a "shout": "Pharmacy #DRUGS!!! "created_time": "1357826573", href="http://twitter.com/download/andr #ToothPulled :(", "link": oid" rel="nofollow">Twitter for "timeZone": "America/Detroit", "http://instagr.am/p/UTk5Xut3gN/", Android</a>", "timeZoneOffset": -300, "likes": {…}, "truncated": false, "user": {…}, "images": {…}, "in_reply_to_status_id": null, "venue": {…} "caption": {…}, "in_reply_to_status_id_str": null, }, "user_has_liked": false, "in_reply_to_user_id": 41020312, {…}, "id": "365798266911553549_3573549", "in_reply_to_user_id_str": {…}, "user": {…} "41020312", ] }, "in_reply_to_screen_name": } {…}, "landlessness", } {…} "user": {…}, ] "geo": {…}, } "coordinates": {…}, } "place": {…}, "contributors”:{…}, "retweet_count": 0, "entities": {…}, "favorited": false, "retweeted": false, "possibly_sensitive": false }, {…}, {…} ] 25
  • 26. Take the best of Foursquare and Instagram { "meta": {…}, "dogs": {…} /* include same info as single */ "notifications": […], } 26
  • 27. How do we represent search results?
  • 28. Selecting results is not the same as searching. -Facebook API
  • 29. Bing Search Google Custom Search Reddit Search { { { "SearchResponse": { "kind": "customsearch#search", "kind": "Listing", "Version": "2.2", "url": { "data": { "Query": { "type": "application/json", "after": "t3_qy342", "SearchTerms": "sushi" "template": "before": null, }, "https://www.googleapis.com/customsearch/v1?q={s "children": [ "Web": { earchTerms}…}, { "Total": 95200000, "queries": { "data": { "Offset": 0, "request": [ "id": "f605o", "Results": [ { "num_comments": 943, { "title": "Google Custom Search - sushi", "score": 1146, "Title": "The Sushi FAQ - The ultimate "totalResults": "15000000", "ups": 3110, guide to sushi and sashimi and how to ...", "searchTerms": "sushi", "downs": 1964, "Description": "What is sushi?..", "count": 10, "created": 1295553753.0, "Url": "http://www.sushifaq.com/", "startIndex": 1, "url": "CacheUrl": } "http://www.reddit.com/r/AskReddit/comments/f605 "http://cc.bingj.com/cache.aspx?q=sushi&d=485519 ] o/this_is_a_long_shot_any_sushi_chefs_need_a_job 0808495712&w=yU8fJS-YPT-f4svREMW2xSa75OoBUAZR", }, _in/", "DisplayUrl": "www.sushifaq.com", "context": { "author": "jining", "DateTime": "2013-01-08T15:12:00Z" "title": "Custom Search" } }, }, }, { "searchInformation": { { "Title": "What Is Sushi? - Sushi Guide - "searchTime": 0.314942, "data": { Eatsushi.com", "formattedSearchTime": "0.31", "id": "c9eng”, "Description": "Eatsushi.com...", "totalResults": "15000000", "num_comments": 308, "Url": "formattedTotalResults": "15,000,000" "score": 59, "http://www.eatsushi.com/whatsushi.asp", }, "ups": 128, "CacheUrl": "items": [ "downs": 69, "http://cc.bingj.com/cache.aspx?q=sushi&d=501324 { "created": 1275155900.0, 9854931333&w=ihBzI9k9WbrnwxKcV3n8mOoV97M89K-b", "kind": "customsearch#result", "url": "DisplayUrl": "title": "Standardized Usage Statistics "http://www.reddit.com/r/IAmA/comments/c9eng/i_a "www.eatsushi.com/whatsushi.asp", Harvesting Initiative (SUSHI ... - NISO", m_a_sushi_man_ama/", "DateTime": "2013-01-07T13:51:00Z" "htmlTitle": "u003cbu003eStandardized Usage "saved": false, "is_self": true, "permalink": } Statistics Harvesting Initiativeu003c/bu003e "/r/IAmA/comments/c9eng/i_am_a_sushi_man_ama/", ] (u003cbu003eSUSHIu003c/bu003e "author": "IAmASushiMan” } u003cbu003e...u003c/bu003e - NISO", } } "link": } } "http://www.niso.org/workrooms/sushi", ] "displayLink": "www.niso.org", } "snippet": "The Standardized Usage Statistics } Harvesting Initiative (SUSHI) Protocol standard (ANSI/NISO Z39.93-2007) defines an automated request and response model ...”, 29
  • 30. (Mostly) Follow Google Custom Search { "meta": { "limit": 1, "offset": 10, "totalResults": 15000000, "query": "sushi", "searchTime": 0.314942 }, "results": [ {}, {}, {} ] } 30
  • 31. How do we represent links?
  • 32. Netflix API <link href=“http://api-public.netflix.com/catalog/people/100637” rel=“http://schemas.netflix.com/catalog/person.actor” title="Elijah Wood” ></link> GitHub API "organization": { "login": "octocat", "id": 1, "url": "https://api.github.com/users/octocat", "type": "Organization” }
  • 33. Follow Netflix and the Web Linking spec <link href=“http://api-public.netflix.com/catalog/people/100637” rel=“http://schemas.netflix.com/catalog/person.actor” title="Elijah Wood” ></link>
  • 34. How do we represent actions?
  • 35. GitHub Form-based API ”actions": [{ “name”: “edit-repo”, “method”: “PATCH”, “href”: “https://api.github.com/repos/kevinswiber/siren”, ”fields”: [ { “name”: “name”, “type”: “text” }, { “name”: “description”, “type”: “text” } }]
  • 36. Form-based API "actions": [{ "name": "edit-repo", “method”: “PATCH”, “href”: “https://api.github.com/repos/kevinswiber/siren”, ”fields”: [ { “name”: “name”, “type”: “text” }, { “name”: “description”, “type”: “text” } }]
  • 37. How do we represent metadata?
  • 38. Flickr API (inline) <item type="photo” id="10289” server="2” views="47” faves="0” more="0"> Dropbox API (/metadata) { "size": "225.4KB”, "rev": "35e97029684fe”, "bytes": 230783, "modified": "Tue, 19 Jul 2011 21:55:38 +0000”, "path": "/Getting_Started.pdf”, "is_dir": false, "icon": "page_white_acrobat”, "root": "dropbox”, "mime_type": "application/pdf”, "revision": 220823 }
  • 39. Include a metadata in responses and consider a dedicated /meta resource { "meta": { "size": "225.4KB”, "rev": "35e97029684fe”, "bytes": 230783, "modified": "Tue, 19 Jul 2011 21:55:38 +0000”, "path": "/Getting_Started.pdf”, "is_dir": false, "icon": "page_white_acrobat”, "root": "dropbox”, "mime_type": "application/pdf”, "revision": 220823 } } 39
  • 40. What can we learn from hypermedia types?
  • 41. Atom/AtomPub <?xml version="1.0"?> <entry xmlns="http://www.w3.org/2005/Atom"> <title>My New Collection</title> <id>urn:uuid:de46e3a1-e489-41a6-88a6-21e7f0e8e2d8</id> <updated>2009-06-12T12:13:46Z</updated> <author> <name>Daffy</name> </author> <summary type="text" /> <content type="application/atom+xml;type=feed" src="http://example.org/my-new-collection"/> <link rel="edit” href="http://example.org/my-new-collection.atom" /> </entry>
  • 42. XHTML <ul class=“search user-list”> <li class=“user”> <div class="avatar"> <a href="/users/@kevin"> <img class=”user-image" src=”/img/avatar.png" /> </a> </div> <div> <a href=“/users/@kevin” rel=“user messages”> <span class=“user-name”>@kevin</span> (<span class="user-text">@kevin</span>) </a> </div> </li> </ul>
  • 43. HAL { “currentlyProcessing”: 14 “shippedToday”: 20, “_links”: { “self”: { “href”: “/orders?page=2” }, “next”: { “href”: “/orders?page=3” }, “prev”: { “href”: “/orders?page=1” } } }
  • 44. Collection+JSON { “collection”: { “version”: “1.0”, “href”: “http://example.org/friends”, “items”: [ “href”: “http://example.org/friends/kevin”, “data”: [ {“name”: “full-name”, “value”: “Kevin Swiber” } ] ], “queries”: [ {“rel”: “search”, “href”: “./search”, “data”: [ {“name”: “search”, “value”: “” } ] } }
  • 45. Siren { “class”: [“owner”, “vip”], “properties”: { “name”: “Kevin” }, “entities”: [ { “rel”: [“https://rels.x.io/dog”], “href”: “https://api.x.io/dogs/1” } ], “actions”: [ { “name”: “adopt”, “method”: “POST”, “href”: “https://api.x.io/owners/1/dogs”, “fields”: [ { “name”: “dog-name”, “type”: “text” } ] } ], “links”: [ { “rel”: [“self”], “href”: “https://api.x.io/owners/1” } ] }
  • 46. How do we accept binary data?
  • 47. multipart/form-data Content-Type: multipart/form-data; boundary=AaB03x --AaB03x Content-Disposition: form-data; name=“caption” Cool picture of my cat. --AaB03x Content-Disposition: form-data; name=“photo”; filename=“catpajamas.jpg” Content-Type: image/jpeg Content-Transfer-Encoding: binary …contents of catpajamas.jpg… --AaB03x
  • 48. Inline Base64 Encoding POST /photos { “caption”: “Cool picture of my cat.” “photo”: “RHVkZSwgbXkgY2F0IGhhcyB0aGUgYmVzdCBwYWphbWFzLg==” }
  • 49. 2-Step Process POST /photos { “caption”: “Cool picture of my cat.” } PUT /photos/1234/data Content-Type: image/jpeg Content-Length: 240 Content-Transfer-Encoding: binary …binary content…
  • 51. How do we support caching?
  • 53. ETags GET /dogs/1 ETag: “a7D92kda94aisdfG” GET /dogs/1 If-None-Match: “a7D92kda94aisdfG”
  • 54. Last-Modified GET /dogs/1 Last-Modified: Thu, 10 Jan 2013 19:43:31 GMT GET /dogs/1 If-Modified-Since: Thu, 10 Jan 2013 19:43:31 GMT
  • 55. Think about the client.
  • 56. Do we need a JavaScript API?
  • 61. application/json { “breed”: “Dachshund”, “name”: “Hotdog”, “age”: 2 }
  • 63. How do we handle transactions?
  • 64. Create a Transaction POST /carts … 201 Created Location: /carts/1
  • 65. Add Items POST /carts/1/items/ { “productId”: “mittens123”, “quantity”: 1 } … 201 Created Location: /cartItems/1234
  • 66. Commit the Transaction POST /carts/1 { “message”: “checkout” } … 200 OK
  • 67. Summary • Checkout previous editions for URI design • Start with API modeling • Use OAuth for security • Good message design is for developers • Learn from hypermedia specs • More on transactions later
  • 69. THANK YOU Subscribe to API webinars at: youtube.com/apigee
  • 70. THANK YOU Questions and ideas to: groups.google.com/group/api-craft
  • 71. THANK YOU Contact us at: @landlessness brian@apigee.com @kevinswiber kswiber@apigee.com @apigee

Editor's Notes

  1. Creative Commons Attribution-Share Alike 3.0 United States License
  2. “The argument is not between adding features and simplicity, between adding capability and usability. The real issue is about design: designing things that have the power required for the job while maintaining understandability, the feeling of control, and the pleasure of accomplishment.” – Donald Norman, “Simplicity Is Not The Answer”, ACM Interactions, volume 15, issue 5. “We are faced with an apparent paradox, but don&apos;t worry: good design will see us through. People want the extra power that increased features bring to a product, but they intensely dislike the complexity that results. Is this a paradox? Not necessarily. Complexity can be managed. “ – Donald Norman, “Simplicity Is Not the Answer”, ACM Interactions, volume 15, issue 5.
  3. http://www.flickr.com/photos/mattharvey1/5712604622/We’re building a cathedral. Though it is complex, it must be beautiful.
  4. What security measures can we put around our API?
  5. http://www.flickr.com/photos/brent_nashville/2156695472/in/photostream/Collaborate with all stakeholders: marketing, business analysts, software engineers, key business people, etc. This will be your API team.Develop a ubiquitous language, a glossary of terms that will appear in your API. This keeps everyone on the same page.Document a mental model of your API. (How you do this is up to you. See: UML)Iterate.
  6. http://www.flickr.com/photos/theory/3364213389/in/photostream/Freedom is fantastic until you hit the wall of reality. Your API represents your organization. Make sure your organization is present on key decisions.
  7. What security measures can we put around our API?
  8. Twitter uses HTTP Basic authentication. It has been around for a long time.Amazon Web Services chose to roll their own. This may have pre-dated the OAuth 1.0 specification.Google is using Bearer tokens with the OAuth 2.0 Framework specification.
  9. We like OAuth2. It’s a standard, which means anyone can read how it’s done. There are also good libraries out there to help build this for your API.OAuth2 allows developers to build clients that take advantage of user resources located on other services, such as Facebook, Google, and GitHub.A good alternative is using OAuth 1.0a. LinkedIn uses OAuth 1.0a for authorizing clients in their API, and it works very well.Keep an eye on stronger access token algorithms. OAuth2 MAC token support is still an Internet-Draft.
  10. What security measures can we put around our API?
  11. What security measures can we put around our API?
  12. What security measures can we put around our API?
  13. What security measures can we put around our API?
  14. What security measures can we put around our API?
  15. What security measures can we put around our API?
  16. What security measures can we put around our API?
  17. What security measures can we put around our API?
  18. What security measures can we put around our API?
  19. What security measures can we put around our API?
  20. What security measures can we put around our API?
  21. What security measures can we put around our API?
  22. What security measures can we put around our API?
  23. What security measures can we put around our API?
  24. Netflix uses Web Linking (RFC5899). Links have a relation value that may contain standard or custom relation types. An href is included as a link to follow based on that rel value.GitHub repos contain an organization object that has a URL one can follow. Note: GitHub does follow the Web Linking spec for certain links. They include a Link header with prev and next links.
  25. We prefer the Web Linking style, which can be expressed in both XML and JSON styles. It adheres to a standard that anyone can follow. Also, we can utilize the standard link relations where appropriate.
  26. GitHub’s API prefers an out-of-band approach. The alternative is based on HTML forms. Here’s a snippet of the Siren format using actions.
  27. Inline form-style actions provide greater insight to developers exploring the API via HTTP. It allows the server to maintain control of the preferred method, href, and fields. This approach allows for easier inclusion of hidden field values the server deems necessary. Note: This is still emerging and is not yet widespread.
  28. Flickr includes metadata such as number of views, server, and favorites inline with the data representation. Dropbox has a separate metadata resource that returns its metadata.
  29. Actually, we think both these options are good. If the amount of metadata is relatively small, including it inline makes a lot of sense, as it’s less overhead than creating a brand new resource.If metadata happens to be very large, as may be the case for Dropbox, adding a separate resource may make sense. At this point, the metadata itself may be important enough to your API consumers to warrant a new resource. This is a good topic for discussion during an API modeling exercise.Metadata can also include response times, pagination counts, etc.
  30. Simultaneous presentation of information and controls such that the information becomes the affordance through which the user obtains choices and selects actions.Not a linear progression, more of a directed acyclic graph.Offers choices for users to select actions.Offers links to related representations.
  31. ALPS example from rstat.us.
  32. ALPS example from rstat.us.
  33. Links, Queries, Write Templates
  34. Properties, Entities, Actions, Links
  35. Benefits: Only one HTTP call. Binary files can be sent in binary format—more compact than base64. HTTP tools to handle this.
  36. Benefits: Quick to implement. Good for small files.
  37. Benefits: Good for larger binary files.
  38. Just choose one method of submitting binary data in your API. Think about the options, how big your binary data will be, and where you want to go in the future. Even though there are trade-offs to each approach, they’re all capable.
  39. 30 Days
  40. Yes, it’s important to not beat up your API server with requests. It’s also important to let client knows if they can save a round-trip to your server.