Considerations for an API Strategy
Ronnie Mitra
Principal API Architect - Europe
Layer 7 API Academy
Business Drivers
The Developer Experience
API Architecture
Agenda
Private or Closed APIs
Acme Corp.
API
Acme Corp.
App
Public or Open APIs
Acme Corp.
API
Third Party
App
Priority:
Lower Cost
Priority:
Increased Adoption
why build an API?
Innovation
Consumer Reach
Revenue Source
Marketing
Integration
Light Bulb designed by Jean-Philippe Cabaroc from The Noun Project
Innovation
Consumer Reach
Revenue Source
Marketing
Integration
Light Bulb designed by Jean-Philippe Cabaroc from The Noun Project
Revenue Source
Revenue Source
http://www.flickr.com/photos/inside-south-africa/485356704
£0.10 per API Call
Revenue Source
1000 calls/month
5000 calls/month
Revenue Source
500 calls/month
1000 calls/month
5000 calls/month
Revenue Source
Is your content worth paying for?
Innovation
Consumer Reach
Revenue Source
Marketing
Integration
Light Bulb designed by Jean-Philippe Cabaroc from The Noun Project
Consumer Reach
Consumer Reach
Platforms are not forever!
Innovation
Consumer Reach
Revenue Source
Marketing
Integration
Light Bulb designed by Jean-Philippe Cabaroc from The Noun Project
Marketing
Affiliate Programs
Sometimes you pay the developer.
Marketing
Draw new visitors in.
Marketing
Marketing
Stay above the noise:
New channels
Information-centric marketing
Innovation
Consumer Reach
Revenue Source
Marketing
Integration
Light Bulb designed by Jean-Philippe Cabaroc from The Noun Project
Innovation
Light Bulb designed by Jean-Philippe Cabaroc from The Noun Project
Innovation from within
Innovation
Light Bulb designed by Jean-Philippe Cabaroc from The Noun Project
Innovation outside your borders
Innovation
Light Bulb designed by Jean-Philippe Cabaroc from The Noun Project
When does innovation happen?
Innovation
Consumer Reach
Revenue Source
Marketing
Integration
Light Bulb designed by Jean-Philippe Cabaroc from The Noun Project
Integration
Business driven integration
Regulatory driven integration
Observational Learning:
Five Famous Stories of Public APIs
2000 – ebay
Started with a paid developer program in 2000
Made it free in 2005
Consumer Reach
Marketing
Large developer eco-system
Large app eco-system
25% of eBay listings come from their API!
salesforce
2000 – salesforce
Integration
Revenue Source
API as a cloud enabler
2004 – Flickr
web 2.0 generation
the social evolution
Consumer Reach
Marketing
The rise of self-service
Announced 6 billion photos in August 2011
2006 – Amazon Web Services
Started as an online book shop…
Became a department store…
now?
Jeff Bezos
Connect everything
http://www.flickr.com/photos/zippy/2430495092
2004:
Hey, why don’t we sell this?
Revenue Source
Estimated revenue:
$1.5B in 2012
http://wikibon.org/wiki/v/Cloud_Computing_2013%3A_The_Amazon_Gorilla_Invades_the_Enterprise
Twilio or stripe
2007 - Twillio
Revenue Source
The API is the business
100,000 developer milestone in 2012
Original APIs are still successful
New business models have emerged
Know your drivers – design accordingly
Summary
API Styles
What does a Web API look like?
Web APIs
HTTP
Network Based APIs
HTTP
COAP MQTT
WebSocket?
Architectural Styles
Tunnel Style
URI Style
Hypermedia Style
Event Driven Style
Tunnel Style
Example: SOAP
• transport agnostic
• operation based
• binding documents (WSDL)
Tunnel Style
<RetrieveStudentRecords>
<StudentId>1213</StudentId>
</RetrieveStudentRecords>
Tunnel Style
• lots of tooling
• not restricted to HTTP
• RPC
Advantages
Tunnel Style
• inefficient for HTTP
• increased learning curve
• lack of tooling in mobile
Trade-offs
URI Style
GET
PUT
POST
DELETE
+ URI
URI Style
GET /students/1232
URI Style
• familiar to web developers
• designed for HTTP
• URIs are intuitive
Advantages
URI Style
• limited to four methods
• URI design is not standard
• can be ‘chatty’
Trade-offs
Hypermedia Style
Hypermedia Style
• links
• templated input (forms)
• task based
{
links: [
link {href: ‘…’ rel: ‘list’},
link {href: ‘…’ rel: ‘add’}
]
collection: [
{link: {rel:'complete',href:‘…'},
id:42,
text:‘Record 42'
}
]
}
Hypermedia Style
• designed for HTTP
• long lasting
• no URI construction
Advantages
Hypermedia Style
• leading-edge
• requires ‘smarter’ apps
• less familiar to developers
Trade-offs
Event Driven Style
Example: WebSockets
• event based communication
• server initiated events
• full-duplex (websocket)
Event Driven Style
• less overhead
• better performance
Advantages
Event Driven Style
• not HTTP-based
• resource intensive connections
• inefficient for request-reply
Trade-offs
API Styles Summary
• Web API != standard
• Four popular styles: Tunnel, URI,
Hypermedia, Event
• Choose a style that fits your constraints
and business goals
The Developer Experience
designing APIs can be difficult
http://www.flickr.com/photos/nirufe/3469696707
?
Usability
Reliability
Simplicity
Security
Etc…
Software Qualities
Focus on the developer experience
(dx)
Interaction Design
Bill Moggridge
Usability
Human-Computer-Interaction
User Experience Design
Goal Oriented Design
http://www.flickr.com/photos/58754750@N08/5541472392/
A user-centric view of design.
Well designed products are easier
to use.
Good design matters for Web APIs
too.
Priority:
Lower Cost
Priority:
Increased Adoption
Portal
API
Portal
API
Developer
End User
Administrator
Portal
API
This is obvious right?
Why is this difficult to do in
practice?
Reason #1
We project our own perspective.
Reason #2
We project our own biases.
Never use SOAP?
Why?
Consider keyboards…
http://www.flickr.com/photos/yvettemn/139890573/
http://www.flickr.com/photos/jonathanpberger/7126054997/
http://www.flickr.com/photos/novemberborn/286773981/
OR
It doesn’t matter that you don’t like
SOAP.
What matters is what your developer
base thinks!
(and what your objective is)
Reason #3
We make bad assumptions.
API publishers are also developers.
“I built a mobile app once.”
Reason #4
We lack the time, money or
incentive for good design
“Best practices”, patterns and
standards become shortcuts
Am I RESTfull enough?
So, how can we do better?
Developer-centric design requires
effort and diligence.
Design with the developer in mind.
Ask them.
• Interviews
• Surveys
• Listen (blogs, presentations,
tweets)
+
• Observe
• Prototype
• Historical Data
Consider all aspects of the DX:
Registration
Security
Troubleshooting
Learning
Interface Style
A Good DX = A Good System
Tunnel Style
URI Style
Hypermedia Style
Event Driven Style
Registration
Lazy Registration
Social Integration
Personalization
Development Activity Cycle
1. Learn
2. Code
3. Implement
4. Test
5. Fix
Portal
API
Learn
Code
Test
API
Learn
Test
API explorers and “live
documentation” can shorten the
gap between visibility and
feedback.
Troubleshooting and Feedback
Provide useful information at runtime
Provide useful post-run information
TLS
OAuth 2
Open ID Connect
Security
Security can hurt Usability
But… security can also improve the
overall experience!
We need to think about the system as a
whole
Complexity
• Sometimes complexity is necessary –
that is ok
• Enough features to meet
requirements
• Don’t hurt the DX – use structure
and modularity
Structure and Consistency
Define a consistent Message Structure
{ “Response” : {
“Errors” : {}
}}
Structure and Consistency
Define consistent standards for:
• Naming
• Collection structure
• Content negotiation
• Links
Modularity
Partition APIs into modules or
products
From a DEVELOPER perspective!
“Frictionless” integration
High rates of adoption
Low cost integration
We want:
Behaviour Design
BJ Fogg
Visitor Invested Developer
Visitor Invested Developer
Joy Joy Joy
A Sample DX Based Design Process
1. Identify the problem space
2. Learn about the audience
3. Design Interactions
4. Make API design choices that
are developer-centric
5. Prototype and get feedback
6. Iterate
The Problem Space
Why are we doing this?
Who are we building it for?
Innovation
Consumer Reach
Revenue Source
Marketing
Integration
Light Bulb designed by Jean-Philippe Cabaroc from The Noun Project
Consider:
Platforms
Organizations
Languages
Who is this for?
The Problem Space
What are our:
Assumptions?
Constraints?
Shared terms and jargon?
Data Gathering
How do we learn about our target
audience?
Interaction Model
Define requirements:
What interactions will benefit the
developer?
What information is required to
support the interaction?
Interaction Model
As a ___ I want to …
Map Interactions to an API Design
Which style?
Which formats?
How do we translate interactions?
Prototype
Don’t bind to real data or backend
Use something lightweight and easy
to change
Do this early
Focus on the interactions that take
place, rather than the interfaces
we expose
DX > Software Qualities
Great API design can thrive in a
developer-centric environment
Usability Summary
• Focus on the developer
• Start by thinking in terms of interactions
• Effective for public and private APIs
www.apiacademy.co
Considerations for an API Strategy
Ronnie Mitra
Principal API Architect - Europe
Layer 7 API Academy

Considerations For an API Strategy - Ronnie MItra API Architect Layer 7 London Workshop

Editor's Notes

  • #5 Make a slide with an example
  • #8 Make a slide with an example
  • #13 Why are API publishers opening up their APIs? What are their motives? This will help us choose APIs that have reasonable business modelsNeed a better word for integration (trying to describe b2b scenarios driven by the business)[consider doing separate slides for each]
  • #14 Why are API publishers opening up their APIs? What are their motives? This will help us choose APIs that have reasonable business modelsAlong with some simple examples that I came up with for your own business.
  • #15 Really should be a DIRECT revenue sourceMake money per call Example: .02 per call, settle account at the end of term Tiered model: 50 pounds / month for 1000 calls. 100 pounds / month for 5000 calls. This motivation makes sense if you have a product that is worth buying. Are your data and services compelling enough to justify it? Charging for API usage has a detrimental impact on usage. Some organizations set a limit for free calls and charge for calls after that (rewarding success with a partnership of sorts) – tie this to lowering the barrier
  • #20 Why are API publishers opening up their APIs? What are their motives? This will help us choose APIs that have reasonable business modelsAlong with some simple examples that I came up with for your own business.
  • #21 Talk about taking over new markets.Talk about plethora of devices.Talk about apps as platforms. How do you reach a user who doesn’t know who you are?
  • #22 Talk about taking over new markets.Talk about plethora of devices.Talk about apps as platforms. How do you reach a user who doesn’t know who you are?
  • #24 Why are API publishers opening up their APIs? What are their motives? This will help us choose APIs that have reasonable business modelsAlong with some simple examples that I came up with for your own business.
  • #29 Why are API publishers opening up their APIs? What are their motives? This will help us choose APIs that have reasonable business modelsAlong with some simple examples that I came up with for your own business.
  • #30 Why are API publishers opening up their APIs? What are their motives? This will help us choose APIs that have reasonable business modelsNeed a better word for integration (trying to describe b2b scenarios driven by the business)[consider doing separate slides for each]
  • #31 Why are API publishers opening up their APIs? What are their motives? This will help us choose APIs that have reasonable business modelsNeed a better word for integration (trying to describe b2b scenarios driven by the business)[consider doing separate slides for each]
  • #32 Why are API publishers opening up their APIs? What are their motives? This will help us choose APIs that have reasonable business modelsNeed a better word for integration (trying to describe b2b scenarios driven by the business)[consider doing separate slides for each]
  • #33 Why are API publishers opening up their APIs? What are their motives? This will help us choose APIs that have reasonable business modelsAlong with some simple examples that I came up with for your own business.
  • #34 Why are API publishers opening up their APIs? What are their motives? This will help us choose APIs that have reasonable business modelsNeed a better word for integration (trying to describe b2b scenarios driven by the business)[consider doing separate slides for each]
  • #39 Large amount of business generated through third party appsVery healthy app eco-system for end-users (lots of tooling)
  • #40 Large amount of business generated through third party appsVery healthy app eco-system for end-users (lots of tooling)
  • #45 Explain how this is important for Flickr’s business model (rapid growth?)
  • #56 Developer = end user.
  • #59 Copy and Paste from usability
  • #60 They drive all of the technology that we use in our daily lives.
  • #61 By our definition, a Web API includes SOAP, REST, HTTP, CSV… just about any type of interface deployed over the web.
  • #62 By our definition, a Web API includes SOAP, REST, HTTP, CSV… just about any type of interface deployed over the web.
  • #74 Hypermedia is like building a browser based web for computer programs.You can follow linksYou can provide input based on templatesRather than mapping to a resource + operations you can follow tasks.
  • #75 Hypermedia is like building a browser based web for computer programs.You can follow linksYou can provide input based on templatesRather than mapping to a resource + operations you can follow tasks.
  • #77 Hypermedia is like building a browser based web for computer programs.You can follow linksYou can provide input based on templatesRather than mapping to a resource + operations you can follow tasks.
  • #78 Hypermedia is like building a browser based web for computer programs.You can follow linksYou can provide input based on templatesRather than mapping to a resource + operations you can follow tasks.
  • #79 Hypermedia is like building a browser based web for computer programs.You can follow linksYou can provide input based on templatesRather than mapping to a resource + operations you can follow tasks.
  • #80 Hypermedia is like building a browser based web for computer programs.You can follow linksYou can provide input based on templatesRather than mapping to a resource + operations you can follow tasks.
  • #83 Copy and Paste from usability
  • #86 Coined in the 1980sBut rooted in the design ideas of industrial age products and how users interact with technology
  • #87 Our product is our API and our useris our developer.
  • #88 Coined in the 1980sBut rooted in the design ideas of industrial age products and how users interact with technology
  • #89 Lots of methodologies and terminology
  • #91 We are not simply producing products that perform a funciton, but we consider how people (or users) will interact with the product.
  • #92 They are intuitive, we spend less time understanding them, ultimately they are a pleasure.Conversely, poorly designed products are painful.
  • #93 We talked about this, so highlight again.
  • #96 Different identities
  • #98 APIs are all about connectivity.
  • #99 APIs are all about connectivity.
  • #103 APIs are all about connectivity.
  • #104 APIs are all about connectivity.
  • #110 APIs are all about connectivity.
  • #111 Different social conventions.Another form of this, is the question of RESTfulness.
  • #112 APIs are all about connectivity.
  • #115 APIs are all about connectivity.
  • #116 [there was something else I realized after this pres. for Reason #4. – try to remember]Talk about when API dsigners don’t botyher with usability – selling to enterprises. (or do I leave this till later?)
  • #118 APIs are all about connectivity.
  • #119 APIs are all about connectivity.
  • #120 Designer mental model vs. user mental model
  • #121 Designer mental model vs. user mental model
  • #122 APIs are all about connectivity.
  • #123 APIs are all about connectivity.
  • #124 Moneysupermarket.com example
  • #125 Designer mental model vs. user mental model
  • #126 Box.com example
  • #127 APIs are all about connectivity.
  • #131 There is a delay between
  • #132 There is a delay between
  • #136 There is a delay between
  • #138 There is a delay between
  • #145 Tie good design back to the business value we want
  • #150 APIs are all about connectivity.
  • #152 Why are API publishers opening up their APIs? What are their motives? This will help us choose APIs that have reasonable business modelsNeed a better word for integration (trying to describe b2b scenarios driven by the business)[consider doing separate slides for each]
  • #160 APIs are all about connectivity.
  • #161 APIs are all about connectivity.
  • #162 APIs are all about connectivity.