SlideShare a Scribd company logo
1 of 24
Download to read offline
API Design Choices: Audience,
Aggregation & beyond
By Jacob Ideskog, Solution Architect
@jacobideskog, @2botech
Copyright © 2013 Twobo Technologies AB. All rights reserved.
Agenda
 History
 Trends
 REST
 Aggregation vs Mashups
Copyright © 2013 Twobo Technologies AB. All rights reserved.
Disruptive trends
Cloud
Computing
Social
Networks
Mobile
Big
Data
Copyright © 2013 Twobo Technologies AB. All rights reserved.
Back in the days
Copyright © 2013 Twobo Technologies AB. All
rights reserved
Web apps have evolved
from CGI to
the cloud
HTTP, HTML, CGI
COM & CORBA
SOAP & SOA
Web 2.0 & REST
The Cloud
Cloud APIs
How to start?
 Design-by-buzzword
Copyright © 2013 Twobo Technologies AB. All
rights reserved
Hypermedia
Node.js
JSON REST
Target Audience
 Who is it for?
 Apps?
 Mobile Apps?
 Internal Apps
 Other Services?
 All of the above?
Copyright © 2013 Twobo Technologies AB. All
rights reserved
Target Architecture
 What are you serving
 Processing services
 Data services
 Communication services
 ?
Copyright © 2013 Twobo Technologies AB. All
rights reserved
The glorious REST
 Representional State Transfer
 Highly Scalable
 Uses URI identifiers
 No state on server side
 Hyperlinked
 No uniform standard
 NOT A PROTOCOL
Copyright © 2013 Twobo Technologies AB. All
rights reserved
Resource or service
Copyright © 2013 Twobo Technologies AB. All
rights reserved http://martinfowler.com/articles/richardsonMaturityModel.html
Level 0: The Swamp of POX
Level 1: Resource
Level 2: HTTP Verbs
Level 3: Hypermedia Controls
Glory of Rest
Level 0 Swamp of POX
Copyright © 2013 Twobo Technologies AB. All
rights reserved
Copyright © 2013 Twobo Technologies AB. All
rights reserved
POST <getBook>
POST <deleteUser>
<book ...
<ok ...
/api
 XML RPC all over again
Level 1 Resources
 Uses URIs
 But still XML messages as operations
Copyright © 2013 Twobo Technologies AB. All
rights reserved
POST <getBook>
POST <deleteUser>
<book ...
<ok ...
/books/2
/users/24
Level 2 HTTP Verbs
 Utilizes the semantics of HTTP
Copyright © 2013 Twobo Technologies AB. All
rights reserved
GET - Read a resource
HEAD – Read metadata about resource
OPTIONS – Read what operations are available
POST – Add a new resource, or run operation
PUT – Replace existing resource completely
DELETE – Remove resource
(PATCH – Update existing resource in place)
GET ?pagesize=A4
DELETE
200 OK <book ...
201 No Content
/books/2
/users/32
Level 3 The Glory of REST
 HATEOAS
 Hypermedia As The Engine Of Application State
 Or simply: Hypermedia
 Let the Media Type tell you what to do
 Hyperlink, hyperlink hyperlink
Copyright © 2013 Twobo Technologies AB. All
rights reserved
Example
Copyright © 2013 Twobo Technologies AB. All
rights reserved
curl –v http://localhost/stuff
<stuff xmlns:tt=http://example.com/rest tt:rel=”/stuff">
<more-stuff tt:rel="/stuff/more-stuff"/>
<other-stuff tt:=”/stuff/other-stuff"/>
<data>
<entry>Interesting 1</entry>
<entry>Interesting 2</entry>
</stuff>
curl –v http://localhost/stuff/more-stuff
<more-stuff xmlns:tt=http://example.com/rest tt:rel=”/stuff/more-stuff">
<things tt:rel="/stuff/more-stuff/things"/>
</more-stuff>
Ring a bell?
Copyright © 2013 Twobo Technologies AB. All
rights reserved
curl –v http://localhost/v2/stuff
<html>
<div id=“stuff”>
<a href=“/stuff/more-stuff”/>
<a href=“/stuff/other-stuff/>
<ol id=“data”>
<li id=“entry1”>Interesting 1</li>
<li id=“entry2”>Interesting 2</li>
</ol>
<form action=“/stuff” >
<input type=“text” name=“value” />
</form>
</div>
</html>
The Real World
 But? My API uses other APIs
Copyright © 2013 Twobo Technologies AB. All
rights reserved
The power of Mashups
 Web mashup is easy
 API mashup is harder
 But the payoff is greater
 API aggregation is really hard
 And believe me, you’ll need to do it anyway…
Copyright © 2013 Twobo Technologies AB. All
rights reserved
Mashups vs. Aggregations
Copyright © 2013 Twobo Technologies AB. All
rights reserved
Mashup Aggregation
Why is it hard
 Different backend states and protocols
 Different authentication methods
 Different lookup schemes
 Backend versioning
Copyright © 2013 Twobo Technologies AB. All
rights reserved
1st Original API
New
‘Aggregated’ API
2ndOriginal API
Operationally
interesting
Aggregators
 Don’t invent the wheel
 Once your API is advanced enough, you’ll have to
mash-up
 But do you need aggregation?
 If so: Identify the “operationally interesting” area
 Focus on that
 Mashup the rest
Copyright © 2013 Twobo Technologies AB. All rights reserved
The Real World
 Ah, the power of API Gateways!
Copyright © 2013 Twobo Technologies AB. All
rights reserved
Summary
 Who is it for?
 What are you selling?
 Hypermedia in REST
 Mash-ups vs. Aggregations
Copyright © 2013 Twobo Technologies AB. All
rights reserved
Questions & thanks
@2botech
www.2botech.com
@jacobideskog
Copyright © 2013 Twobo Technologies AB. All rights reserved
Designing an API

More Related Content

What's hot

Secure your APIs using OAuth 2 and OpenID Connect
Secure your APIs using OAuth 2 and OpenID ConnectSecure your APIs using OAuth 2 and OpenID Connect
Secure your APIs using OAuth 2 and OpenID ConnectNordic APIs
 
Incorporating OAuth: How to integrate OAuth into your mobile app
Incorporating OAuth: How to integrate OAuth into your mobile appIncorporating OAuth: How to integrate OAuth into your mobile app
Incorporating OAuth: How to integrate OAuth into your mobile appNordic APIs
 
OAuth and OpenID Connect for Microservices
OAuth and OpenID Connect for MicroservicesOAuth and OpenID Connect for Microservices
OAuth and OpenID Connect for MicroservicesTwobo Technologies
 
OAuth 2.0 and the Internet of Things (IoT) (Jacob Ideskog)
OAuth 2.0 and the Internet of Things (IoT) (Jacob Ideskog)OAuth 2.0 and the Internet of Things (IoT) (Jacob Ideskog)
OAuth 2.0 and the Internet of Things (IoT) (Jacob Ideskog)Nordic APIs
 
1400 ping madsen-nordicapis-connect-01
1400 ping madsen-nordicapis-connect-011400 ping madsen-nordicapis-connect-01
1400 ping madsen-nordicapis-connect-01Nordic APIs
 
Integrated social solutions, the power and pitfalls of mashups
Integrated social solutions, the power and pitfalls of mashupsIntegrated social solutions, the power and pitfalls of mashups
Integrated social solutions, the power and pitfalls of mashupsNordic APIs
 
Web architecture mechanism and threats
Web architecture   mechanism and threatsWeb architecture   mechanism and threats
Web architecture mechanism and threatsSumedt Jitpukdebodin
 
OAuth Assisted Token Flow for Single Page Applications
OAuth Assisted Token Flow for Single Page ApplicationsOAuth Assisted Token Flow for Single Page Applications
OAuth Assisted Token Flow for Single Page ApplicationsNordic APIs
 
OAuth & OpenID Connect Deep Dive
OAuth & OpenID Connect Deep DiveOAuth & OpenID Connect Deep Dive
OAuth & OpenID Connect Deep DiveNordic APIs
 
Deploying End to End Website on Azure
Deploying End to End Website on AzureDeploying End to End Website on Azure
Deploying End to End Website on AzureIntellipaat
 
Authentication & Authorization for Connected Mobile & Web Applications using ...
Authentication & Authorization for Connected Mobile & Web Applications using ...Authentication & Authorization for Connected Mobile & Web Applications using ...
Authentication & Authorization for Connected Mobile & Web Applications using ...Amazon Web Services
 
Web Architecture - Mechanism and Threats
Web Architecture - Mechanism and ThreatsWeb Architecture - Mechanism and Threats
Web Architecture - Mechanism and ThreatsSumedt Jitpukdebodin
 
Enterprise Access Control Patterns for Rest and Web APIs
Enterprise Access Control Patterns for Rest and Web APIsEnterprise Access Control Patterns for Rest and Web APIs
Enterprise Access Control Patterns for Rest and Web APIsCA API Management
 

What's hot (14)

Secure your APIs using OAuth 2 and OpenID Connect
Secure your APIs using OAuth 2 and OpenID ConnectSecure your APIs using OAuth 2 and OpenID Connect
Secure your APIs using OAuth 2 and OpenID Connect
 
Incorporating OAuth: How to integrate OAuth into your mobile app
Incorporating OAuth: How to integrate OAuth into your mobile appIncorporating OAuth: How to integrate OAuth into your mobile app
Incorporating OAuth: How to integrate OAuth into your mobile app
 
OAuth and OpenID Connect for Microservices
OAuth and OpenID Connect for MicroservicesOAuth and OpenID Connect for Microservices
OAuth and OpenID Connect for Microservices
 
OAuth 2.0 and the Internet of Things (IoT) (Jacob Ideskog)
OAuth 2.0 and the Internet of Things (IoT) (Jacob Ideskog)OAuth 2.0 and the Internet of Things (IoT) (Jacob Ideskog)
OAuth 2.0 and the Internet of Things (IoT) (Jacob Ideskog)
 
1400 ping madsen-nordicapis-connect-01
1400 ping madsen-nordicapis-connect-011400 ping madsen-nordicapis-connect-01
1400 ping madsen-nordicapis-connect-01
 
Integrated social solutions, the power and pitfalls of mashups
Integrated social solutions, the power and pitfalls of mashupsIntegrated social solutions, the power and pitfalls of mashups
Integrated social solutions, the power and pitfalls of mashups
 
Web architecture mechanism and threats
Web architecture   mechanism and threatsWeb architecture   mechanism and threats
Web architecture mechanism and threats
 
OAuth Assisted Token Flow for Single Page Applications
OAuth Assisted Token Flow for Single Page ApplicationsOAuth Assisted Token Flow for Single Page Applications
OAuth Assisted Token Flow for Single Page Applications
 
OAuth & OpenID Connect Deep Dive
OAuth & OpenID Connect Deep DiveOAuth & OpenID Connect Deep Dive
OAuth & OpenID Connect Deep Dive
 
OpenID Connect Explained
OpenID Connect ExplainedOpenID Connect Explained
OpenID Connect Explained
 
Deploying End to End Website on Azure
Deploying End to End Website on AzureDeploying End to End Website on Azure
Deploying End to End Website on Azure
 
Authentication & Authorization for Connected Mobile & Web Applications using ...
Authentication & Authorization for Connected Mobile & Web Applications using ...Authentication & Authorization for Connected Mobile & Web Applications using ...
Authentication & Authorization for Connected Mobile & Web Applications using ...
 
Web Architecture - Mechanism and Threats
Web Architecture - Mechanism and ThreatsWeb Architecture - Mechanism and Threats
Web Architecture - Mechanism and Threats
 
Enterprise Access Control Patterns for Rest and Web APIs
Enterprise Access Control Patterns for Rest and Web APIsEnterprise Access Control Patterns for Rest and Web APIs
Enterprise Access Control Patterns for Rest and Web APIs
 

Viewers also liked

The JSON-based Identity Protocol Suite
The JSON-based Identity Protocol SuiteThe JSON-based Identity Protocol Suite
The JSON-based Identity Protocol SuiteTwobo Technologies
 
Importance of APIs in the Internet of Things
Importance of APIs in the Internet of ThingsImportance of APIs in the Internet of Things
Importance of APIs in the Internet of ThingsNordic APIs
 
Introduction to Comoyo
Introduction to ComoyoIntroduction to Comoyo
Introduction to ComoyoNordic APIs
 
SCIM presentation from CIS 2012
SCIM presentation from CIS 2012SCIM presentation from CIS 2012
SCIM presentation from CIS 2012Twobo Technologies
 
Managing Identity by Giving Up Control - Scott Morrison, SVP & Distinguished ...
Managing Identity by Giving Up Control - Scott Morrison, SVP & Distinguished ...Managing Identity by Giving Up Control - Scott Morrison, SVP & Distinguished ...
Managing Identity by Giving Up Control - Scott Morrison, SVP & Distinguished ...CA API Management
 
Nordic APIs - Building a Secure API
Nordic APIs - Building a Secure APINordic APIs - Building a Secure API
Nordic APIs - Building a Secure APITwobo Technologies
 

Viewers also liked (9)

The JSON-based Identity Protocol Suite
The JSON-based Identity Protocol SuiteThe JSON-based Identity Protocol Suite
The JSON-based Identity Protocol Suite
 
Importance of APIs in the Internet of Things
Importance of APIs in the Internet of ThingsImportance of APIs in the Internet of Things
Importance of APIs in the Internet of Things
 
Introduction to Comoyo
Introduction to ComoyoIntroduction to Comoyo
Introduction to Comoyo
 
Beveiliging en REST services
Beveiliging en REST servicesBeveiliging en REST services
Beveiliging en REST services
 
#dd12 OAuth for Domino Developers
#dd12 OAuth for Domino Developers#dd12 OAuth for Domino Developers
#dd12 OAuth for Domino Developers
 
SCIM presentation from CIS 2012
SCIM presentation from CIS 2012SCIM presentation from CIS 2012
SCIM presentation from CIS 2012
 
Introduction to OAuth2.0
Introduction to OAuth2.0Introduction to OAuth2.0
Introduction to OAuth2.0
 
Managing Identity by Giving Up Control - Scott Morrison, SVP & Distinguished ...
Managing Identity by Giving Up Control - Scott Morrison, SVP & Distinguished ...Managing Identity by Giving Up Control - Scott Morrison, SVP & Distinguished ...
Managing Identity by Giving Up Control - Scott Morrison, SVP & Distinguished ...
 
Nordic APIs - Building a Secure API
Nordic APIs - Building a Secure APINordic APIs - Building a Secure API
Nordic APIs - Building a Secure API
 

Similar to Designing an API

Open APIs - Risks and Rewards (Øredev 2013)
Open APIs - Risks and Rewards (Øredev 2013)Open APIs - Risks and Rewards (Øredev 2013)
Open APIs - Risks and Rewards (Øredev 2013)Nordic APIs
 
Web API Design: Crafting Interfaces that Developers Love
Web API Design:  Crafting Interfaces that Developers LoveWeb API Design:  Crafting Interfaces that Developers Love
Web API Design: Crafting Interfaces that Developers LoveJamison K. Bell | OvenPOP 360
 
OpenAPI v.Next - Events, Alternative Schemas & the Road Ahead
OpenAPI v.Next - Events, Alternative Schemas & the Road AheadOpenAPI v.Next - Events, Alternative Schemas & the Road Ahead
OpenAPI v.Next - Events, Alternative Schemas & the Road AheadTed Epstein
 
HTML5 Web Workers-unleashed
HTML5 Web Workers-unleashedHTML5 Web Workers-unleashed
HTML5 Web Workers-unleashedPeter Lubbers
 
Managing Large Flask Applications On Google App Engine (GAE)
Managing Large Flask Applications On Google App Engine (GAE)Managing Large Flask Applications On Google App Engine (GAE)
Managing Large Flask Applications On Google App Engine (GAE)Emmanuel Olowosulu
 
RESTful application with Drupal 8
RESTful application with Drupal 8RESTful application with Drupal 8
RESTful application with Drupal 8Patrick Morin
 
Living On A Cloud, Dr Keith Marlow
Living On A Cloud, Dr Keith MarlowLiving On A Cloud, Dr Keith Marlow
Living On A Cloud, Dr Keith Marlowguesta04b0
 
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...mfrancis
 
Oracle REST Data Services
Oracle REST Data ServicesOracle REST Data Services
Oracle REST Data ServicesChris Muir
 
Microservices in Golang
Microservices in GolangMicroservices in Golang
Microservices in GolangMo'ath Qasim
 
Andrea Baldon, Emanuele Di Saverio - GraphQL for Native Apps: the MyAXA case ...
Andrea Baldon, Emanuele Di Saverio - GraphQL for Native Apps: the MyAXA case ...Andrea Baldon, Emanuele Di Saverio - GraphQL for Native Apps: the MyAXA case ...
Andrea Baldon, Emanuele Di Saverio - GraphQL for Native Apps: the MyAXA case ...Codemotion
 
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!Serdar Basegmez
 
Rapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web ArchitecturesRapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web ArchitecturesKeith Fitzgerald
 
App engine cloud_comp_expo_nyc
App engine cloud_comp_expo_nycApp engine cloud_comp_expo_nyc
App engine cloud_comp_expo_nycChris Schalk
 

Similar to Designing an API (20)

PPT for Seminar.pptx
PPT for Seminar.pptxPPT for Seminar.pptx
PPT for Seminar.pptx
 
Open APIs - Risks and Rewards (Øredev 2013)
Open APIs - Risks and Rewards (Øredev 2013)Open APIs - Risks and Rewards (Øredev 2013)
Open APIs - Risks and Rewards (Øredev 2013)
 
Web API Design
Web API DesignWeb API Design
Web API Design
 
Web API Design: Crafting Interfaces that Developers Love
Web API Design:  Crafting Interfaces that Developers LoveWeb API Design:  Crafting Interfaces that Developers Love
Web API Design: Crafting Interfaces that Developers Love
 
OpenAPI v.Next - Events, Alternative Schemas & the Road Ahead
OpenAPI v.Next - Events, Alternative Schemas & the Road AheadOpenAPI v.Next - Events, Alternative Schemas & the Road Ahead
OpenAPI v.Next - Events, Alternative Schemas & the Road Ahead
 
HTML5 Web Workers-unleashed
HTML5 Web Workers-unleashedHTML5 Web Workers-unleashed
HTML5 Web Workers-unleashed
 
Managing Large Flask Applications On Google App Engine (GAE)
Managing Large Flask Applications On Google App Engine (GAE)Managing Large Flask Applications On Google App Engine (GAE)
Managing Large Flask Applications On Google App Engine (GAE)
 
RESTful application with Drupal 8
RESTful application with Drupal 8RESTful application with Drupal 8
RESTful application with Drupal 8
 
The API Economy
The API EconomyThe API Economy
The API Economy
 
Living On A Cloud, Dr Keith Marlow
Living On A Cloud, Dr Keith MarlowLiving On A Cloud, Dr Keith Marlow
Living On A Cloud, Dr Keith Marlow
 
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...
Creating an all-purpose REST API for Cloud services using OSGi and Sling - C ...
 
Oracle REST Data Services
Oracle REST Data ServicesOracle REST Data Services
Oracle REST Data Services
 
Crafting APIs
Crafting APIsCrafting APIs
Crafting APIs
 
Microservices in Golang
Microservices in GolangMicroservices in Golang
Microservices in Golang
 
Sst hackathon express
Sst hackathon expressSst hackathon express
Sst hackathon express
 
Andrea Baldon, Emanuele Di Saverio - GraphQL for Native Apps: the MyAXA case ...
Andrea Baldon, Emanuele Di Saverio - GraphQL for Native Apps: the MyAXA case ...Andrea Baldon, Emanuele Di Saverio - GraphQL for Native Apps: the MyAXA case ...
Andrea Baldon, Emanuele Di Saverio - GraphQL for Native Apps: the MyAXA case ...
 
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!
 
Cqrs api v2
Cqrs api v2Cqrs api v2
Cqrs api v2
 
Rapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web ArchitecturesRapidly Building and Deploying Scalable Web Architectures
Rapidly Building and Deploying Scalable Web Architectures
 
App engine cloud_comp_expo_nyc
App engine cloud_comp_expo_nycApp engine cloud_comp_expo_nyc
App engine cloud_comp_expo_nyc
 

Recently uploaded

Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Delhi Call girls
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Serviceritikaroy0888
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangaloreamitlee9823
 
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfDr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfAdmir Softic
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMANIlamathiKannappan
 
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756dollysharma2066
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Dave Litwiller
 
HONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsHONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsMichael W. Hawkins
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityEric T. Tung
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsP&CO
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.Aaiza Hassan
 
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...Any kyc Account
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Servicediscovermytutordmt
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyEthan lee
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Neil Kimberley
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxWorkforce Group
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageMatteo Carbone
 

Recently uploaded (20)

Forklift Operations: Safety through Cartoons
Forklift Operations: Safety through CartoonsForklift Operations: Safety through Cartoons
Forklift Operations: Safety through Cartoons
 
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Service
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfDr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMAN
 
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabiunwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
 
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
 
HONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsHONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael Hawkins
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League City
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and pains
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.
 
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Service
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptx
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
 

Designing an API

  • 1. API Design Choices: Audience, Aggregation & beyond By Jacob Ideskog, Solution Architect @jacobideskog, @2botech Copyright © 2013 Twobo Technologies AB. All rights reserved.
  • 2. Agenda  History  Trends  REST  Aggregation vs Mashups Copyright © 2013 Twobo Technologies AB. All rights reserved.
  • 4. Back in the days Copyright © 2013 Twobo Technologies AB. All rights reserved Web apps have evolved from CGI to the cloud HTTP, HTML, CGI COM & CORBA SOAP & SOA Web 2.0 & REST The Cloud Cloud APIs
  • 5. How to start?  Design-by-buzzword Copyright © 2013 Twobo Technologies AB. All rights reserved Hypermedia Node.js JSON REST
  • 6. Target Audience  Who is it for?  Apps?  Mobile Apps?  Internal Apps  Other Services?  All of the above? Copyright © 2013 Twobo Technologies AB. All rights reserved
  • 7. Target Architecture  What are you serving  Processing services  Data services  Communication services  ? Copyright © 2013 Twobo Technologies AB. All rights reserved
  • 8. The glorious REST  Representional State Transfer  Highly Scalable  Uses URI identifiers  No state on server side  Hyperlinked  No uniform standard  NOT A PROTOCOL Copyright © 2013 Twobo Technologies AB. All rights reserved
  • 9. Resource or service Copyright © 2013 Twobo Technologies AB. All rights reserved http://martinfowler.com/articles/richardsonMaturityModel.html Level 0: The Swamp of POX Level 1: Resource Level 2: HTTP Verbs Level 3: Hypermedia Controls Glory of Rest
  • 10. Level 0 Swamp of POX Copyright © 2013 Twobo Technologies AB. All rights reserved Copyright © 2013 Twobo Technologies AB. All rights reserved POST <getBook> POST <deleteUser> <book ... <ok ... /api  XML RPC all over again
  • 11. Level 1 Resources  Uses URIs  But still XML messages as operations Copyright © 2013 Twobo Technologies AB. All rights reserved POST <getBook> POST <deleteUser> <book ... <ok ... /books/2 /users/24
  • 12. Level 2 HTTP Verbs  Utilizes the semantics of HTTP Copyright © 2013 Twobo Technologies AB. All rights reserved GET - Read a resource HEAD – Read metadata about resource OPTIONS – Read what operations are available POST – Add a new resource, or run operation PUT – Replace existing resource completely DELETE – Remove resource (PATCH – Update existing resource in place) GET ?pagesize=A4 DELETE 200 OK <book ... 201 No Content /books/2 /users/32
  • 13. Level 3 The Glory of REST  HATEOAS  Hypermedia As The Engine Of Application State  Or simply: Hypermedia  Let the Media Type tell you what to do  Hyperlink, hyperlink hyperlink Copyright © 2013 Twobo Technologies AB. All rights reserved
  • 14. Example Copyright © 2013 Twobo Technologies AB. All rights reserved curl –v http://localhost/stuff <stuff xmlns:tt=http://example.com/rest tt:rel=”/stuff"> <more-stuff tt:rel="/stuff/more-stuff"/> <other-stuff tt:=”/stuff/other-stuff"/> <data> <entry>Interesting 1</entry> <entry>Interesting 2</entry> </stuff> curl –v http://localhost/stuff/more-stuff <more-stuff xmlns:tt=http://example.com/rest tt:rel=”/stuff/more-stuff"> <things tt:rel="/stuff/more-stuff/things"/> </more-stuff>
  • 15. Ring a bell? Copyright © 2013 Twobo Technologies AB. All rights reserved curl –v http://localhost/v2/stuff <html> <div id=“stuff”> <a href=“/stuff/more-stuff”/> <a href=“/stuff/other-stuff/> <ol id=“data”> <li id=“entry1”>Interesting 1</li> <li id=“entry2”>Interesting 2</li> </ol> <form action=“/stuff” > <input type=“text” name=“value” /> </form> </div> </html>
  • 16. The Real World  But? My API uses other APIs Copyright © 2013 Twobo Technologies AB. All rights reserved
  • 17. The power of Mashups  Web mashup is easy  API mashup is harder  But the payoff is greater  API aggregation is really hard  And believe me, you’ll need to do it anyway… Copyright © 2013 Twobo Technologies AB. All rights reserved
  • 18. Mashups vs. Aggregations Copyright © 2013 Twobo Technologies AB. All rights reserved Mashup Aggregation
  • 19. Why is it hard  Different backend states and protocols  Different authentication methods  Different lookup schemes  Backend versioning Copyright © 2013 Twobo Technologies AB. All rights reserved 1st Original API New ‘Aggregated’ API 2ndOriginal API Operationally interesting
  • 20. Aggregators  Don’t invent the wheel  Once your API is advanced enough, you’ll have to mash-up  But do you need aggregation?  If so: Identify the “operationally interesting” area  Focus on that  Mashup the rest Copyright © 2013 Twobo Technologies AB. All rights reserved
  • 21. The Real World  Ah, the power of API Gateways! Copyright © 2013 Twobo Technologies AB. All rights reserved
  • 22. Summary  Who is it for?  What are you selling?  Hypermedia in REST  Mash-ups vs. Aggregations Copyright © 2013 Twobo Technologies AB. All rights reserved
  • 23. Questions & thanks @2botech www.2botech.com @jacobideskog Copyright © 2013 Twobo Technologies AB. All rights reserved