3 Months 4 Months
6 Months 9 Months 18 Months 8 Years API growth rateBased on directory of 6,000 web APIs listed at ProgrammableWeb, May 2012
API Billionaires Club 13 billion
API calls / day (May 2011) 5 billion API calls / day (April 2010) 5 billion API calls / day (October 2009) 1.4 billion API calls / day (May 2012) 1.1 billion API calls / day (April 2011) 1 billion API calls / day (May 2012) 1 billion API calls / day (Q1 2012) 1 billion API calls / day (January 2012)
You’ll make many design choicesWhat
protocol(s) will I support? What data format(s) to provide? How will I manage security? Should I use an open source framework?Which design patterns to use? Hmm, are there any? Oh, right, I need to do versioning too…
What’s the price of IBM?POST
/GetStock HTTP/1.1 GET h@p://example.org/stock/IBM Host: www.example.org Content-‐Type: applicaRon/soap+xml <?xml version="1.0"?> <soap:Envelope xmlns:soap="h@p://www.w3.org/2001/12/soap-‐envelope" soap:encodingStyle="h@p://www.w3.org/2001/12/soap-‐encoding"> <soap:Body xmlns:m="h@p://www.example.org/stock"> <m:GetStockPrice> <m:StockName>IBM</m:StockName> </m:GetStockPrice> </soap:Body> </soap:Envelope>
What to manage & measure?
Manage Measure Security Performance Key management Developers and apps Monitoring Quality Reporting Marketing Scaling Revenue Rate limiting Volume Versioning Trends
API versioning in RESTWhere
What Who Example Path segment Date Twilio /2010-‐04-‐01/… Path segment Number Twi@er /1/… Path segment ‘v’ + Number LinkedIn /v1/… Query string Number Google ?v=2 Custom HTTP header Number Google GData-‐Version: 2 HTTP Accept header Number Github applicaRon/vnd.github[.version]
Metrics that matter Traffic Developers
Service Total developers Performance Total calls Active developers Availability Top methods Top developers Error rates Call chains Trending apps Code defects Quota faults RetentionMarketing Support BusinessDev registrations Direct revenue Support tickets Indirect revenueDev portal funnel Response times Market share Traffic sources Community metrics Costs Event metrics
What makes an API supported?
Great developer experience (DX) signup, guides, reference, SDKs, pricing, clear ToS Communication & community forum, blog, social media, email, app gallery Great support / evangelism teams active, engaged, listening, responding, at events
What makes an API supported?
Great developer experience (DX) A nd reference, SDKs, pricing, legal g Signup, guides, ythin er & communityr ev Communication d un de c ereemail, events, clear ToS forum, blog,ov media, social /W teams Great supportHevangelism TF T listening, responding active, engaged,
5 Keys to a Great
API Valuable e e m or A nd on Planned ing … Flexible th Managed Supported
Top 10 API worst practices
10. Poor error handing 9. REST APIs that ignore HTTP rules 8. Exposing your raw underlying data model 7. Security complexity 6. Unexpected & undocumented releases 5. Poor developer experience 4. Expect an MVC framework ‘gives’ you a great API 3. Assume if you build it they will come 2. Inadequate support 1. Poor documentation