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

Monte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMMonte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMRavindra Nath Shukla
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communicationskarancommunications
 
A305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdfA305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdftbatkhuu1
 
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
 
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
 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfPaul Menig
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst SummitHolger Mueller
 
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...anilsa9823
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesDipal Arora
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataExhibitors Data
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdfRenandantas16
 
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
 
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒anilsa9823
 
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
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...amitlee9823
 
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
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxAndy Lambert
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayNZSG
 

Recently uploaded (20)

Monte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMMonte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSM
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communications
 
A305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdfA305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdf
 
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
 
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
 
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.
 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdf
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst Summit
 
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
 
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...
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors Data
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
 
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
 
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
 
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...
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
 
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...
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptx
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 May
 

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