SlideShare una empresa de Scribd logo
1 de 40
Adoption-Centered API Design
Marsh Gardiner, @earth2marsh
Brian Mulloy, @landlessness
Integers as a Service

2
Overview

•
•
•
•
•

How did we get here?
Where are we now?
Where are we going?
How are we going to get there?
Questions
3
How did we get here?
In the beginning…

5
SOAP and XML-RPC

6
REST

7
The rise of…

•
•
•
•
•

Software as a Service
Web Mashups
Virtualization
User Experience
Mobile
8
Web vs App

9
Technology unlocks technology…

10
Gehry vs Winnebago

11

photo: uggboy
Where are we now?
Refocusing API design

13
Passion (and controversy)

14
Design for adoption

15
Resource

Addressing:

IP: 173.194.70.102 ➡ google.com
Twitter: 14352786 ➡ @earth2marsh

https://github.com/apigee
16
Verb

17
General philosophy

18
Applying RV patterns
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}
20
Versions

Twilio
/2010-04-01/Accounts/

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

Foursquare
/v2/users
21
Query parameters

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

22
Header parameters

23
Conveniences

Facebook
/me

LinkedIn
/v1/people/~

Foursquare
/v2/checkins/recent
24
Formats

SoundCloud
/users/3207
/users/3207.json

25
Formats

26
Actions

Facebook
/search?q=watermelon&type=post

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

DigitalOcean
/droplets/{droplet_id}/reboot
27
Authentication

28
Dates

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

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

Foursquare
"createdAt": 1320296464
29
Filters

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

30
Pagination

Facebook
offset, limit

Twitter
page, rpp

LinkedIn
start, count
31
Pagination

Facebook
offset, limit

32
HATEOAS and the Hypermedia Constraint

33
Hypermedia

34
Great moments in mishandled error code history

35
Errors

36
SDKs

37
Perfect is the enemy of done

38
Questions

rv@apigee.com, @ResourceVerb
brian@apigee.com, @landlessness

marsh@apigee.com, @earth2marsh
39
Thank you
Marsh Gardiner, @earth2marsh
Brian Mulloy, @landlessness

Más contenido relacionado

La actualidad más candente

warblecamp - twical
warblecamp - twical warblecamp - twical
warblecamp - twical
Angus Fox
 
I Love APIs 2015 API Lab Design-first API Development Using Node and Swagger
I Love APIs 2015 API Lab Design-first API Development Using Node and SwaggerI Love APIs 2015 API Lab Design-first API Development Using Node and Swagger
I Love APIs 2015 API Lab Design-first API Development Using Node and Swagger
Apigee | Google Cloud
 
Automate Everyday Tasks with Functions
Automate Everyday Tasks with FunctionsAutomate Everyday Tasks with Functions
Automate Everyday Tasks with Functions
Sean ODell
 
Google-IO-Presentation
Google-IO-PresentationGoogle-IO-Presentation
Google-IO-Presentation
Leo Chen
 
Unity - Android by Rio
Unity - Android by RioUnity - Android by Rio
Unity - Android by Rio
Agate Studio
 

La actualidad más candente (20)

warblecamp - twical
warblecamp - twical warblecamp - twical
warblecamp - twical
 
I Love APIs 2015 API Lab Design-first API Development Using Node and Swagger
I Love APIs 2015 API Lab Design-first API Development Using Node and SwaggerI Love APIs 2015 API Lab Design-first API Development Using Node and Swagger
I Love APIs 2015 API Lab Design-first API Development Using Node and Swagger
 
Devnest 110802
Devnest 110802Devnest 110802
Devnest 110802
 
Automate Everyday Tasks with Functions
Automate Everyday Tasks with FunctionsAutomate Everyday Tasks with Functions
Automate Everyday Tasks with Functions
 
Developing Mobile Apps - Top 10 Tips
Developing Mobile Apps - Top 10 Tips Developing Mobile Apps - Top 10 Tips
Developing Mobile Apps - Top 10 Tips
 
API as a Growth Tool
API as a Growth ToolAPI as a Growth Tool
API as a Growth Tool
 
Google-IO-Presentation
Google-IO-PresentationGoogle-IO-Presentation
Google-IO-Presentation
 
Mobile Apps Business
Mobile Apps BusinessMobile Apps Business
Mobile Apps Business
 
Pitfall for WioLTE
Pitfall for WioLTEPitfall for WioLTE
Pitfall for WioLTE
 
Hybrid app development
Hybrid app developmentHybrid app development
Hybrid app development
 
How NOT to Suck at App Distribution - Quick Start Guide - Appsocially's Growt...
How NOT to Suck at App Distribution - Quick Start Guide - Appsocially's Growt...How NOT to Suck at App Distribution - Quick Start Guide - Appsocially's Growt...
How NOT to Suck at App Distribution - Quick Start Guide - Appsocially's Growt...
 
ALM with TFS: From the Drawing Board to the Cloud
ALM with TFS: From the Drawing Board to the CloudALM with TFS: From the Drawing Board to the Cloud
ALM with TFS: From the Drawing Board to the Cloud
 
Instant Apps potatotips 41
Instant Apps potatotips 41Instant Apps potatotips 41
Instant Apps potatotips 41
 
DevOps for Hackathons: DevOps without the Ops
DevOps for Hackathons: DevOps without the OpsDevOps for Hackathons: DevOps without the Ops
DevOps for Hackathons: DevOps without the Ops
 
Speed up Continuous Delivery with BigData Analytics
Speed up Continuous Delivery with BigData AnalyticsSpeed up Continuous Delivery with BigData Analytics
Speed up Continuous Delivery with BigData Analytics
 
Gerrit Code Review Analytics
Gerrit Code Review AnalyticsGerrit Code Review Analytics
Gerrit Code Review Analytics
 
Brightspace Ignite Tennessee 2015 - Version Control for Course Content
Brightspace Ignite Tennessee 2015 - Version Control for Course ContentBrightspace Ignite Tennessee 2015 - Version Control for Course Content
Brightspace Ignite Tennessee 2015 - Version Control for Course Content
 
Unity - Android by Rio
Unity - Android by RioUnity - Android by Rio
Unity - Android by Rio
 
Slack's Developer Relations Strategy - CMX Summit West 2016
Slack's Developer Relations Strategy - CMX Summit West 2016Slack's Developer Relations Strategy - CMX Summit West 2016
Slack's Developer Relations Strategy - CMX Summit West 2016
 
Server-side Swift with Swagger
Server-side Swift with SwaggerServer-side Swift with Swagger
Server-side Swift with Swagger
 

Similar a Adoption-Centered API Design

Similar a Adoption-Centered API Design (20)

SharePoint 2016 & Office 365: A Look Ahead To What's Coming - SPS Vancouver
SharePoint 2016 & Office 365: A Look Ahead To What's Coming - SPS VancouverSharePoint 2016 & Office 365: A Look Ahead To What's Coming - SPS Vancouver
SharePoint 2016 & Office 365: A Look Ahead To What's Coming - SPS Vancouver
 
Progressive Web Apps for Education
Progressive Web Apps for EducationProgressive Web Apps for Education
Progressive Web Apps for Education
 
Future of the Web
Future of the WebFuture of the Web
Future of the Web
 
API Design Tour: Digital River
API Design Tour: Digital RiverAPI Design Tour: Digital River
API Design Tour: Digital River
 
API Design Tour with Digital River and Apigee - June 26th, 2012
API Design Tour with Digital River and Apigee - June 26th, 2012API Design Tour with Digital River and Apigee - June 26th, 2012
API Design Tour with Digital River and Apigee - June 26th, 2012
 
The Future of the web
The Future of the webThe Future of the web
The Future of the web
 
Google Cloud Developer Challenge - GDG Belgaum
Google Cloud Developer Challenge - GDG BelgaumGoogle Cloud Developer Challenge - GDG Belgaum
Google Cloud Developer Challenge - GDG Belgaum
 
Life of a Request by Ana Oprea
Life of a Request by Ana OpreaLife of a Request by Ana Oprea
Life of a Request by Ana Oprea
 
API Design: An Adoption-Centered Approach
API Design: An Adoption-Centered ApproachAPI Design: An Adoption-Centered Approach
API Design: An Adoption-Centered Approach
 
An Introduction to the WP REST API
An Introduction to the WP REST APIAn Introduction to the WP REST API
An Introduction to the WP REST API
 
Engage 2020: Six Polite Ways to Design a RESTful API for Your Application!
Engage 2020: Six Polite Ways to Design a RESTful API for Your Application!Engage 2020: Six Polite Ways to Design a RESTful API for Your Application!
Engage 2020: Six Polite Ways to Design a RESTful API for Your Application!
 
Dharmpal Verma Resume
Dharmpal Verma ResumeDharmpal Verma Resume
Dharmpal Verma Resume
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 
Stapling and patching the web of now - ForwardJS3, San Francisco
Stapling and patching the web of now - ForwardJS3, San FranciscoStapling and patching the web of now - ForwardJS3, San Francisco
Stapling and patching the web of now - ForwardJS3, San Francisco
 
Leading Your Business To Success & The Cloud
Leading Your Business To Success & The CloudLeading Your Business To Success & The Cloud
Leading Your Business To Success & The Cloud
 
The Platform Era - 7 steps to an API
The Platform Era - 7 steps to an APIThe Platform Era - 7 steps to an API
The Platform Era - 7 steps to an API
 
MyATM
MyATMMyATM
MyATM
 
Planning Your Progressive Web App
Planning Your Progressive Web AppPlanning Your Progressive Web App
Planning Your Progressive Web App
 
Microsoft Ignite 2016 In Review
Microsoft Ignite 2016 In ReviewMicrosoft Ignite 2016 In Review
Microsoft Ignite 2016 In Review
 
The Future of SEO #LearnInbound
The Future of SEO #LearnInboundThe Future of SEO #LearnInbound
The Future of SEO #LearnInbound
 

Más de Apigee | Google Cloud

Más de 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
 
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
 
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!
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

Adoption-Centered API Design

Notas del editor

  1. S: APIs exist so that applications that aren't under your control can safely access your service. C: Those APIs allow the machinesto talk to each other, those applications are written by people—so as soon as your API has gone into production, you have an adoption problem. I: Therefore, everything you can do to make it easier for people to use your API will accelerate its adoption. P: So as you design your API, always be mindful about how people will approach your API, and find ways to make it easier for them to use it. A: Let's walk through this together, and think about the different ways in which developer-centered design can help with your adoption problemsI love APIs.(hand up) And I have to ask… who here loves APIs?Because, I have to tell you, you’re at a conference called “I love APIs.” And you’re at an API design talk at that conference. So if you don’t love APIs, you’re in the wrong place. Why do you love APIs?If APIs are addictive, and I’m pretty sure they are, Twitter’s API was my gateway drug. Sure, I’d tried some RSS and some web scraping…Digital vs film cameras. It had to be easy to get at it. Feedback loop.
  2. This is one of my favorite APIs. They’re different than you. They don’t have an adoption problem—because these APIs were built as a complicated API joke.All the rest of you, you built your APIs as a way to extend the service of your business to applications beyond your walls. Once you push that API to production for the very first time, you have an adoption problem.http://canalstintegers.com/ http://www.londonintegers.com/http://www.brooklynintegers.com/http://www.missionintegers.com/
  3. A quick overview of what we’ll go through today.
  4. A note on APIs—whenever we mention APIs, assume we mean data being sent between clients and servers rather than device-level APIs. Usually we mean over HTTP.
  5. Source: http://www.w3.org/Protocols/HTTP/AsImplemented.htmlSuper-fast, just so we’re all on the same page…The web was made of hypertext, which was transported over HTTP. We still feel the influence of the www an APIs today.Way back then, there was no separation of content and presentation layers… except for one important example: a server could tell the client how to send data back with a form and a POST. URLs were addresses and we had two main verbs—GET and POST, which separated read from write so that server state changes didn’t happen by accident.
  6. 1998/99 saw the rise of XML-RPC and SOAP, the dawn of Service-Oriented Architecture. These were the first real web APIs in terms of serializing data for machines. They only really used one verb and one resource, and all the message complexity was hidden “underneath the surface” in the envelope and body of the message.More info: RPC: http://xmlrpc.scripting.com/spec.htmlSOAP: https://tools.ietf.org/html/draft-box-http-soap-00History: http://www.xml.com/pub/a/ws/2001/04/04/soap.html
  7. And then in 2000, Roy Fielding wrote his now famous dissertation. There is plenty of genius in REST—leveraging the strengths of HTTP. Thinking about how to address the problem of brittleness and contracts.But remember this was 2000. Before all the things that we take for granted now even existed. Is Representational State Transfer, using Hypermedia As The Engine Of Application State really that important?More info:Feilding’s dissertation: http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm2007 intro: http://www.infoq.com/articles/rest-introduction
  8. Since 2000, these are some of the big things that have happened…
  9. We’ve moved beyond “web apis.”Source: http://www.google.com/trends/explore?q=web#q=web%2C%20app&cmpt=qWhat fit for the web,doesn’t necessarily fit for mobile.
  10. Now we’re deep into the dual revolutions of virtualization and mobile. They don’t show any signs of slowing down. If technology history is any guide, we should expect 10x growth over the previous generation.And what’s coming next? Technologies unlock other technologies, just like in the game Civilization where you have to invent the wheel before you can invent a chariot.http://www.civfanatics.com/images/civ2/poster/civ2chart.jpg
  11. REST is an architectural style.We’ve been focusing on the architecture, how do we build these great structures, without thinking about the people who have to live in them. How do we make APIs a more pleasant place to be?http://www.flickr.com/photos/45713725@N00/8573651373/in/photolist-e4CcRp-biQQKX-7YZVKshttp://kevinwarnock.com/2010/02/
  12. Take all the things we’ve talked about around API design.
  13. We as in Apigee.
  14. API craft controversy. REST is overloaded. As much as anything, what we have is a crisis of naming. It’s not SOAP, but is it REST? Is it XML-RPC? JSON-RPC? One True Media Typehttps://groups.google.com/forum/#!searchin/api-craft/one$20true$20media$20type/api-craft/W7697igIhOs/-OEVHoIUYtoJHATEOAS -> Level 3 RESThttps://groups.google.com/forum/#!searchin/api-craft/hateoas$20level$203/api-craft/alOJYQ5h-wM/XV5vCwg8cWMJRESTful URI Design Questionhttps://groups.google.com/forum/#!searchin/api-craft/RESTful$20URI$20Design$20Question/api-craft/2pYslqSicL8/bPfXL-gH-9wJ
  15. Adoption matters, whether you're planning an internal, partner, or open API. Everything you do to make it easier for developers is good. Move hard things away from the client and onto server.Whenever you are deciding between two patterns, pick the one that is easier for a developer to grok.
  16. URIs are interfacesObviousnessEvery thing gets a resource, an address. This is the naming of things. We have a long history of mapping people-friendly names onto machine ids.There are only two hard things in Computer Science: cache invalidation and naming things. -- Phil Karlton
  17. So we have things. Things are nouns. Things have a state. Now we need to be able to take primitive actions on those things. Things are stored somewhere. Our basic palette of verbs gives us CRUD.http://en.wikipedia.org/wiki/Create,_read,_update_and_delete
  18. There has been a lot of thought about this. We’ll be adding these patterns to resourceverb.com as we build it out over the next few weeks.
  19. Being pragmatic, let’s spend some time to apply some of them directly.
  20. Similar things belong in groupsCase sensitivityAvoid hierarchieshttps://stripe.com/docs/api
  21. When the structure of a representation changes, clients will break. Give clients solid ground and don't shift it on them. This is the beginning of versioning.A version indicator is the replacement for what we used to call contracts. Think of it more like a warranty. We promise not to change the response in ways that will break your client. Think of it as a generation of your API, and you'll commit to always support one version back during a transition.simplein urlnot dates/i/Not quite like Twitter. Definitely not like Salesforce. More like Foursquare or GitHubhttp://www.lexicalscope.com/blog/2012/03/12/how-are-rest-apis-versioned/
  22. Query is for simple name/value pairs that enable fine-tuning the controls. The thing to be careful of is that the query string is part of the resource. This can affect your caching strategy. Query parameters are a great way
  23. Information about the request itself, controlling compression, sending the authentication, this stuff is perfect for the header. Won’t change the code that you have to parse it. Doesn’t change the resource.Body is for complex objects.If you can’t fit it in the query or the header, put it in the body.
  24. /me, /users/me are good conveniences for developers (prefer FB to LI). Conveniences are fine time to break the collection/entities pattern.Facebook: https://developers.facebook.com/docs/reference/api/user/LinkedIn: http://developer.linkedin.com/documents/profile-apiFoursquare: https://developer.foursquare.com/docs/checkins/recent
  25. Formats can benefit from obviousness. Be json-only if you can..json (default) or .xmlXML for legacy. SoundCloud is old enough that they have xml as the default. Today they’d use JSON as the default and might not use XML at allhttp://developers.soundcloud.com/docs/api/reference#
  26. Other non-resourcey stuffLong running processes. Reboot…Avoid it. But don’t kill yourself. How many euros is 12 dollars?Slippery slope toward RPChttps://developers.facebook.com/docs/reference/api/search/https://developers.digitalocean.com/
  27. OAuth is awesome for production grade apps. There is nothing better. But if I want to write a quick script to access my data, OAuth is a big barrier to cross before I can start playing with an API. Why not do what GitHub does and let the developer choose what works for him/her? Consider adding rate limits to discourage abuse and/or an X-Not-Production-Grade response header.Flexibility / usability tradeoff.
  28. ISO-8601More info: http://en.wikipedia.org/wiki/ISO_8601
  29. https://developers.facebook.com/docs/reference/api/field_expansion/
  30. Limit & offset
  31. Anyone who has queried a database understands this naming.
  32. Having to start at the root and crawl the graph every time? HATEOAS is the right problem to solve if the biggest problem is clients that are breaking. But since the biggest problem is adoption, don’t get distracted by HATEOAS. (FWIW, RV and REST are compatible, RV just places the adoption constraint above the Hypermedia As The Engine Of Application State constraint.)More info: http://martinfowler.com/articles/richardsonMaturityModel.html
  33. Hypermedia has a place.Pagination. Next / previous. Facebook style. Metadata=trueRelationshipsBusiness processMore info: https://developers.facebook.com/docs/reference/api/introspection/
  34. Problem: 200 can be cached!Source: http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectCOPY.htmlMore info: http://tech.blog.box.com/2013/04/get-developer-hugs-with-rich-error-handling-in-your-api/
  35. When there are errors, people will need to understand how to fix them. Provide error information for people (not just machines). Look to Box, who did a very thoughtful redesign of their errors.Moreinfo: http://tech.blog.box.com/2013/04/get-developer-hugs-with-rich-error-handling-in-your-api/Also: http://www.mnot.net/blog/2013/05/15/http_problem
  36. In the view-source world of the web + OAuth, providing a JavaScript SDK is a nice-to-have. If you’re focused on mobile, there is a higher expectation that you will offer an Android/ iOS SDK.Just don’t use an SDK to mask the messiness of your API design. Because with SDKs, you have additional burdens of documentation, support, and testing.
  37. You won’t get meaningful feedback from users until you get it out into the world. You have all the mechanisms you need to start learning. Versioning can help you.http://www.flickr.com/photos/joshuarothhaas/3327763912/sizes/l/
  38. Considerthe developer adoption perspective when wrestling with API design problems.Check out resourceverb.com for more background and patterns, and get in touch with us through the channels you find there.… and start making better APIs.