Upload
picsoung
View
232
Download
1
Embed Size (px)
Citation preview
8/9/2019 Workshop API Lifecycle Thefamily
1/52
APIs for your Business
+
Stages of the API Lifecycle
API Workshop at TheFamily
Paris, December 5, 2014
Nicolas Greni
Hacker in Residence at 3scale.net
Out-of-the-box API Management
@3scale
8/9/2019 Workshop API Lifecycle Thefamily
2/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Outline1. Four business benefits of APIs
2. The API lifecycle
Plan/Design
Build/Integrate
Operate/Manage Share/Engage
3. Wrap-up and take-aways
8/9/2019 Workshop API Lifecycle Thefamily
3/52
APIApplication Programming Interface
8/9/2019 Workshop API Lifecycle Thefamily
4/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Whats an API?
8/9/2019 Workshop API Lifecycle Thefamily
5/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
APIs for Developers
!Enrich functionality
!Increase attractiveness by new combinations
!Leverage brand strength
!Integrate more easily and quickly
8/9/2019 Workshop API Lifecycle Thefamily
6/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
APIs for Companies/
Organisations
!Create/revive revenue sources
!Deliver wider reach
!Foster (external) innovation
!Increase efficiency
8/9/2019 Workshop API Lifecycle Thefamily
7/52The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Example 1:
Create/revive revenue sources
!25% of revenue growth driven by APIs
!750,000 fundraising pages created using
JustGiving APIs raising 76m
!40% annual user growth
Source: http://www.3scale.net/resources/customer-stories/
http://www.3scale.net/resources/customer-stories/http://www.3scale.net/resources/customer-stories/8/9/2019 Workshop API Lifecycle Thefamily
8/52The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Example 2:
Deliver wider reach
!700 partners created 50,000 third party apps/services
!300m monthly uniques who see the brand on other sites
!The API gave reach and brand awareness which would not have been
possible with traditional marketing.
(Dick Brouwer, TripAdvisor Director of Engineering)Source: http://bit.ly/1uk6Oo7
http://bit.ly/1uk6Oo7http://bit.ly/1uk6Oo78/9/2019 Workshop API Lifecycle Thefamily
9/52The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Example 3:
Foster (external) innovation
!Only 1 app developed by Fitbit in-house
!Third party apps in Fitbits ecosystem accumulated
are worth $1m of development cost
Source: http://www.slideshare.net/faberNovel/why-shouldicareaboutap-is4/53
http://www.slideshare.net/faberNovel/why-shouldicareaboutap-is4/53http://www.slideshare.net/faberNovel/why-shouldicareaboutap-is4/538/9/2019 Workshop API Lifecycle Thefamily
10/52The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Example 4:
Increase eff
iciency
!Wrap every internal service with an API or you are fired
!Better re-usability, quicker integration, spot opportunities, get to market quicker (AWS)
Source: http://apievangelist.com/2012/01/12/the-secret-to-amazons-success-internal-apis/
http://apievangelist.com/2012/01/12/the-secret-to-amazons-success-internal-apis/http://apievangelist.com/2012/01/12/the-secret-to-amazons-success-internal-apis/8/9/2019 Workshop API Lifecycle Thefamily
11/52The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
But what really is thepower of APIs ?
8/9/2019 Workshop API Lifecycle Thefamily
12/52The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
APIs enable the creation of platforms.
Platforms enable 2-sided / n-sided
business models.
(aka Asymmetric Business Models)
See also VisionMobile report on Asymmetric Business Models:
http://www.visionmobile.com/product/asymmetric-business-models/
http://www.visionmobile.com/product/asymmetric-business-models/http://www.visionmobile.com/product/asymmetric-business-models/8/9/2019 Workshop API Lifecycle Thefamily
13/52The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Asymmetric Business Models
Side 1 Side 2..n
Get most of
the servicesPays
8/9/2019 Workshop API Lifecycle Thefamily
14/52The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
APIs enable the creation of
platforms.can serve nvictimized markets !
Aplatform
8/9/2019 Workshop API Lifecycle Thefamily
15/52The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
The API lifecycleand tools
8/9/2019 Workshop API Lifecycle Thefamily
16/52
Plan/
Design
Build/
Inte
grat
e
Op
erate/
Manage
Sha
re/
Engage
The APILifecycle.
8/9/2019 Workshop API Lifecycle Thefamily
17/52
Plan/
Design
Build/
Inte
grat
e
Op
erate/
Manage
Sha
re/
Engage
The APILifecycle.
8/9/2019 Workshop API Lifecycle Thefamily
18/52The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Plan / Design
Why API?
Alignment with overall business strategy
What do we want to achieve?
8/9/2019 Workshop API Lifecycle Thefamily
19/52The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Plan / Design
Resource modeling: Fine- vs coarse grainedNouns and verbs (resources/HTTP)
http://www.thoughtworks.com/insights/blog/rest-api-design-resource-modelingDecouple DBAPIHow to design APIs that last
http://apiux.com/2014/09/05/api-design-sustainability/API-first designhttps://pop.co/blog/why-we-chose-api-first-
development/
https://pop.co/blog/why-we-chose-api-first-development/https://pop.co/blog/why-we-chose-api-first-development/http://apiux.com/2014/09/05/api-design-sustainability/http://apiux.com/2014/09/05/api-design-sustainability/http://www.thoughtworks.com/insights/blog/rest-api-design-resource-modelinghttp://www.thoughtworks.com/insights/blog/rest-api-design-resource-modelinghttp://www.thoughtworks.com/insights/blog/rest-api-design-resource-modeling8/9/2019 Workshop API Lifecycle Thefamily
20/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Plan / Design
Tools!API Blueprint!RAML!Swagger
See also Where APIs and Tooling Unitehttp://www.futureinsights.com/home/where-
apis-and-tooling-unite.html
http://www.futureinsights.com/home/where-apis-and-tooling-unite.htmlhttp://www.futureinsights.com/home/where-apis-and-tooling-unite.html8/9/2019 Workshop API Lifecycle Thefamily
21/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
API Blueprint
8/9/2019 Workshop API Lifecycle Thefamily
22/52
Plan/
Design
Build/
Inte
grat
e
Ope
rate/
Manage
Sha
re/
Engage
The APILifecycle.
8/9/2019 Workshop API Lifecycle Thefamily
23/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Coding toools
Ruby Grape http://www.confreaks.com/videos/475-rubyconf2010-the-grapes-of-rapid Sinatra http://www.sinatrarb.com/
PHP Slim http://coenraets.org/blog/2011/12/restful-services-with-jquery-php-and-the-slim-framework/
Node.js: Express.js, Fortune.js Restify http://mcavage.me/node-restify/
ASP.net
Python: Flask Web framework for Python: http://flask.pocoo.org/ Django for Python: http://www.django-rest-framework.org/
Java: JAX-RS REST.li http://rest.li/index.html
hype:App
Now
http://rest.li/index.htmlhttp://rest.li/index.htmlhttp://www.django-rest-framework.org/http://www.django-rest-framework.org/http://flask.pocoo.org/http://flask.pocoo.org/http://mcavage.me/node-restify/http://mcavage.me/node-restify/http://coenraets.org/blog/2011/12/restful-services-with-jquery-php-and-the-slim-framework/http://coenraets.org/blog/2011/12/restful-services-with-jquery-php-and-the-slim-framework/http://coenraets.org/blog/2011/12/restful-services-with-jquery-php-and-the-slim-framework/http://www.sinatrarb.com/http://www.sinatrarb.com/http://www.sinatrarb.com/http://www.confreaks.com/videos/475-rubyconf2010-the-grapes-of-rapidhttp://www.confreaks.com/videos/475-rubyconf2010-the-grapes-of-rapid8/9/2019 Workshop API Lifecycle Thefamily
24/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
var express = require('express');
//Create new instance of Express object
var app = express();
app.get('/api', function(request,
response) {//Do something to reada resource
});
app.post('/api', function(request,
response) {
//Do something to createa resource
});
app.put('/api', function(request,
response) {
//Do something to updatea resource
});
app.delete('/api', function(request,
response) {//Do something to deletea resource
});
//Start the server
app.listen(3000);
8/9/2019 Workshop API Lifecycle Thefamily
25/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
app.get('/api/account', function(request, response) {
//Set content-type
response.type('application/json');
//Send text response
response.status(200).send({ message: 'Your balance is: '+ balance });
//...
});
app.put('/api/account', function(request, response) {
//Get the change in balance
balance = parseInt(request.body.updatebalance);
//Update the balance...
//Notify client
response.status(200).send(
{ message: 'Your new balance is: ' + balance });
//...
});
//...
8/9/2019 Workshop API Lifecycle Thefamily
26/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
A demo: HealthAPI
https://github.com/3scale/workshop-apistrat2014
Deployed on Heroku:
https://nicolashealthapi.herokuapp.com (UNSECURED!!)
https://nicolashealthapi.herokuapp.com/https://github.com/3scale/workshop-apistrat2014https://github.com/3scale/workshop-apistrat20148/9/2019 Workshop API Lifecycle Thefamily
27/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
A demo: HealthAPI
Test with Postman
http://www.getpostman.com
(test live APIs quickly)
http://www.getpostman.com/http://www.getpostman.com/8/9/2019 Workshop API Lifecycle Thefamily
28/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Unsecured API Whats the problem?
No knowledge about:
Who accesses the API?
What are they doing with the API?
How to block someone?
What traffic occurs when by whom?
8/9/2019 Workshop API Lifecycle Thefamily
29/52
Plan/
Design
Build/
Inte
grat
e
Ope
rate/
Manage
Share/
Engage
The APILifecycle.
8/9/2019 Workshop API Lifecycle Thefamily
30/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Operate / Manage
App /
Website BackendAPI
8/9/2019 Workshop API Lifecycle Thefamily
31/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Operate / Manage
App /
Website
API
Management BackendAPI
http://api.2445581123523.proxy.3scale.net:80
http://manfredhealthapp.herokuapp.com
8/9/2019 Workshop API Lifecycle Thefamily
32/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Demo 1: Securing the API
via API Management
8/9/2019 Workshop API Lifecycle Thefamily
33/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Demo 2: API Analytics
via API Management
8/9/2019 Workshop API Lifecycle Thefamily
34/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Whats left to do ?
Your own deployment of the traffic agent.
8/9/2019 Workshop API Lifecycle Thefamily
35/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Deployment
App /
WebsiteAPI
ManagementBackendAP
I
Plugin
Proxy
OR
infrastructure
8/9/2019 Workshop API Lifecycle Thefamily
36/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Minimum API Operations
Access Control:authentication and authorization to
identify the originator of incoming traffic
and ensure only permitted access.
Rate Limits and Usage Policies:usage quotas and
restrictions on incoming traffic to keep
loads predictable.
Analytics:data capture and analysis of traffic
patterns to learn how the API is being used.
8/9/2019 Workshop API Lifecycle Thefamily
37/52
Plan/
Design
Build/
Inte
grate
Ope
rate/
Manage
Share/
Engag
e
The APILifecycle.
8/9/2019 Workshop API Lifecycle Thefamily
38/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Share / Engage
Image source:
http://dx.jeremiahlee.com/
8/9/2019 Workshop API Lifecycle Thefamily
39/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Developer Portal
Acceleration
Pilots /
Case Studies
Community
Building
Measure
Comms
SocialMedia
Events
Evangelist
8/9/2019 Workshop API Lifecycle Thefamily
40/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Demo 3: API Documentation
via API Management
8/9/2019 Workshop API Lifecycle Thefamily
41/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
API Management
For Developers
www.apitools.com
Out-of-the-box
API Management
For APIProviders
3scale.net
apistrategyconference.com
apicodex.3scale.net
Market Education &
Evolution
APIs.io
8/9/2019 Workshop API Lifecycle Thefamily
42/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
Take-awaysThere can be an enormous benefit in APIs -- shown by many successful
examples.
It needs to be crystal clear what you want to achieve. The API needs to be
aligned with the business strategy.
APIs enable Asymmetric Business Models to tackle many markets.
Carefully consider all four stages in the API lifecycle.
Exposing data or services via APIs alone is not enough. Make sure you
secure, monitor and manage APIs.
8/9/2019 Workshop API Lifecycle Thefamily
43/52
The Family - Paris - Nov. 2014 Nicolas Greni - picsoung
APIs for your Business
+
Stages of the API Lifecycle
Q&A
Manfred Bortenschlager
I work at 3scale.net
Out-of-the-box API Management
@3scale
mailto:[email protected]8/9/2019 Workshop API Lifecycle Thefamily
44/52
APIs for your Business
+
Stages of the API Lifecycle
API Workshop at TheFamily
Paris, December 5, 2014
Nicolas Greni
Hacker in Residence at 3scale.net
Out-of-the-box API Management
@3scale
8/9/2019 Workshop API Lifecycle Thefamily
45/52
The Family - Paris - Nov. 2014 Nicolas Greni -picsoung
www.apitools.com
http://www.apitools.com/8/9/2019 Workshop API Lifecycle Thefamily
46/52
The Family - Paris - Nov. 2014 Nicolas Greni -picsoung
APItools.com
1. Managing & Monitoring APIs
2. Modifying API calls
8/9/2019 Workshop API Lifecycle Thefamily
47/52
The Family - Paris - Nov. 2014 Nicolas Greni -picsoung
How does it work ?
My app APItools
Manage APIs
Test & Debug
Modify API traffic
Analytics
reque
sts
respo
nses
Web APIs
Others
8/9/2019 Workshop API Lifecycle Thefamily
48/52
8/9/2019 Workshop API Lifecycle Thefamily
49/52
8/9/2019 Workshop API Lifecycle Thefamily
50/52
8/9/2019 Workshop API Lifecycle Thefamily
51/52
8/9/2019 Workshop API Lifecycle Thefamily
52/52
Tools for Developers
APItools
https://www.apitools.com/
Postman
http://www.getpostman.com/
http://www.getpostman.com/https://www.apitools.com/