SlideShare a Scribd company logo
©2015 Apigee Corp. All Rights Reserved.
©2015 Apigee Corp. All Rights Reserved. 
Intro
• Why care about
this topic?
• Why care about
what we think?
©2015 Apigee Corp. All Rights Reserved. 
Topics
• What is a "REST API"
– Data-oriented versus Service-oriented APIs
– Hypermedia
– JSON representations
– Collections
• Versioning
©2015 Apigee Corp. All Rights Reserved. 
History
Service-oriented
 Data-oriented
RPC
CORBA
SOAP/WSDL
"REST API"
NLS
Xanadu
Databases
World-Wide Web
REST
??
Object-orientation
"REST API"
©2015 Apigee Corp. All Rights Reserved. 
Opposing Perspectives
Service-oriented



Data behind operations
Data-oriented



Operations behind data
©2015 Apigee Corp. All Rights Reserved. 
Opposing Perspectives
Service-oriented
	
  
	
  
	
  
	
  
getPerson(personId)	
  
updatePerson(personId,	
  data)	
  
deletePerson(personId)	
  
Data-oriented

	
  
	
  
	
  
http://primary-­‐key-­‐value	
  
http://example.org/person/12345	
  
©2015 Apigee Corp. All Rights Reserved. 
Why We Like Data-Oriented APIs
• The primary value is the data it exposes
• Data-Oriented is Simpler
– Learn the data vs learn the services + the data
– Don’t design an API at all, just use REST
©2015 Apigee Corp. All Rights Reserved. 
What Is Important?
Are you wasting
time repetitively
documenting the
standard HTTP
REST patterns?
©2015 Apigee Corp. All Rights Reserved. 
What would be better?
9
©2015 Apigee. All Rights Reserved. 
PetTracker
Dog
People
dogs n
people n
1
 1
owner 1
 dogs n
birthDate
 birthDate
hairColor
 furColor
name
 name
REST/HTTP
+
©2015 Apigee Corp. All Rights Reserved. 
Follow the REST/HTTP patterns exactly
• E.g.
– POST means Create. Response status code is 201. URL of
new resource is in the 'Location' header
– PUT means 'replace', not 'update'. PATCH means 'update'
– GET response includes ETag and Content-Location headers
– PUT and PATCH require an 'If-Match' header
– …
10
©2015 Apigee. All Rights Reserved.
©2015 Apigee Corp. All Rights Reserved. 
Gaps in HTTP/REST for programmatic use
•  How do you represent relationships
– Single-valued
•  What is a hyperlink?
– Multi-valued
•  What is a Collection/Cursor?
•  HTML provides some answers for the human-readable web
–  <a ref = "http://example.org/people/98765432">Joe Carraclough</a>
•  What is the equivalent for JSON?
11
©2015 Apigee. All Rights Reserved.
©2015 Apigee Corp. All Rights Reserved. 
Hypermedia — Just Do It
•  Most data is conceptually linked
–  So show the links in the data
•  Myths
–  Hypermedia APIs are controversial (practiced by extremists)
–  Hypermedia APIs are difficult
–  Hypermedia APIs are 100% self-describing
–  Hypermedia APIs are not compatible with languages like
Swagger (or other DLs)
©2015 Apigee Corp. All Rights Reserved. 
Service-Oriented Data-Oriented
http://example.org/people	
  
http://example.org/people/{personID}	
  
http://example.org/people/{personID}/dogs	
  
http://example.org/dogs	
  
http://example.org/dogs/{dogID}	
  
http://example.org/dogs/{dogID}/owner	
  
	
   	
   	
  plus	
  
{"id":	
  "12345678",	
  	
  
	
  "type":	
  "Dog"	
  
	
  "name":	
  "Lassie",	
  	
  
	
  "fur_color":	
  "brown",	
  
	
  "owner":	
  "98765432"}	
  
and	
  
{"id":"98765432",	
  	
  
	
  "type":	
  "Person"	
  
	
  "name":	
  "Joe	
  Carraclough",	
  	
  
	
  "hair_color":	
  "brown"}	
  
	
  
{"self":	
  "http://example.org/",	
  
	
  "type":	
  "PetTracker",	
  
	
  "dogs":	
  "http://example.org/dogs",	
  
	
  "people":	
  "http://example.org/people}	
  
	
  	
   	
  and	
  
{"self":	
  "http://example.org/dogs/12345678",	
  	
  
	
  "type":	
  "Dog",	
  
	
  "name":	
  "Lassie",	
  	
  
	
  "fur_color":	
  "brown",	
  
	
  "owner":	
  "http://example.org/people/98765432"}	
  
and	
  
{"self":	
  "http://example.org/people/98765432",	
  	
  
	
  "type":	
  "Person",	
  
	
  "name":	
  "Joe	
  Carraclough",	
  	
  
	
  "hair_color":	
  "brown",	
  
	
  "dogs":	
  "http://example.org/people/98765432/dogs"}	
  
	
  
©2015 Apigee Corp. All Rights Reserved. 
Cursor/Collection
{	
  
	
  "self":	
  "http://example.org/dogs",	
  
	
  "type":	
  "Collection",	
  
	
  "items":	
  [	
  
{"self":	
  "http://example.org/dogs/12345678",	
  	
  
	
  "type":	
  "Dog",	
  
	
  "name":	
  "Lassie",	
  	
  
	
  "fur_color":	
  "brown",	
  
	
  "owner":	
  "http://example.org/people/98765432"},	
  
{"self":	
  "http://example.org/dogs/12345679",	
  	
  
	
  "type":	
  "Dog",	
  
	
  "name":	
  "Lassie",	
  	
  
	
  "fur_color":	
  "brown",	
  
	
  "owner":	
  "http://example.org/people/98765432"}	
  
]	
  
}	
  
14
©2015 Apigee. All Rights Reserved.
©2015 Apigee Corp. All Rights Reserved. 
Cursor/Collection
{	
  
	
  "self":	
  "http://example.org/dogs?limit=10",	
  
	
  "type":	
  "Page",	
  
	
  "collection":	
  "http://example.org/dogs",	
  
	
  "next":	
  "http://example.org/ZG9ncz87bGFzdD0xMA==",	
  
	
  "previous":	
  "http://example.org/ZG9ncz87Zmlyc3Q9MTA=",	
  
	
  "items":	
  [	
  
{"self":	
  "http://example.org/dogs/12345678",	
  	
  
	
  "type":	
  "Dog",	
  
	
  "name":	
  "Lassie",	
  	
  
	
  "fur_color":	
  "brown",	
  
	
  "owner":	
  "http://example.org/people/98765432"},	
  
{"self":	
  "http://example.org/dogs/12345679",	
  	
  
	
  "type":	
  "Dog",	
  
	
  "name":	
  "Lassie",	
  	
  
	
  "fur_color":	
  "brown",	
  
	
  "owner":	
  "http://example.org/people/98765432"}	
  
]	
  
}	
  
15
©2015 Apigee. All Rights Reserved.
©2015 Apigee Corp. All Rights Reserved. 
A File in Google Drive
{	
  
"kind":	
  "drive#file",	
  
"id":	
  "1cjKSwWlryNfRs-­‐durx_8n0dGTUWE_klBrP8IuEYTUu0",	
  
"etag":	
  "9vYBbk7LzzrwpsohQSOkWalvY6Y/MTQ0Mjc1ODk5NzAwMQ",	
  
"selfLink":	
  "https://www.googleapis.com/drive/v2/files/1cjKSwWlryNfRs-­‐durx_8n0dGTUWE_klBrP8IuEYTUu0",	
  
"alternateLink":	
  "https://docs.google.com/a/apigee.com/document/d/1cjKSwWlryNfRs-­‐durx_8n0dGTUWE_klBrP8IuEYTUu0/edit?usp=drivesdk",	
  
"embedLink":	
  "https://docs.google.com/a/apigee.com/document/d/1cjKSwWlryNfRs-­‐durx_8n0dGTUWE_klBrP8IuEYTUu0/preview",	
  
...	
  
"title":	
  "Web	
  API	
  Design	
  edition	
  2",	
  
"mimeType":	
  "application/vnd.google-­‐apps.document",	
  
...	
  
"createdDate":	
  "2015-­‐07-­‐10T15:26:34.567Z",	
  
"modifiedDate":	
  "2015-­‐09-­‐20T14:23:17.001Z",	
  
"modifiedByMeDate":	
  "2015-­‐09-­‐20T14:23:17.001Z",	
  
"lastViewedByMeDate":	
  "2015-­‐09-­‐30T23:16:08.011Z",	
  
"markedViewedByMeDate":	
  "1970-­‐01-­‐01T00:00:00.000Z",	
  
"version":	
  "41819",	
  
...	
  
	
  
©2015 Apigee Corp. All Rights Reserved. 
A Folder's Children in Google Drive
{	
  
"kind":	
  "drive#childList",	
  
"etag":	
  "9vYBbk7LzzrwpsohQSOkWalvY6Y/73yTWsreOINR667_OZQCurHB09o",	
  
"selfLink":	
  "https://www.googleapis.com/drive/v2/files/0B2Pq-­‐qMI4R2jYVdudkdNMld3Vm8/children",	
  
"items":	
  [	
  
	
  {	
  
	
  	
  "kind":	
  "drive#childReference",	
  
	
  	
  "id":	
  "1BuYLy9FkXpILYmwnRNetnUFCC9D-­‐U35PrJcO_9YsuW0",	
  
	
  	
  "selfLink":	
  "
https://www.googleapis.com/drive/v2/files/0B2Pq-­‐qMI4R2jYVdudkdNMld3Vm8/children/1BuYLy9FkXpILYmwnRNetnUFCC9D-­‐U35PrJcO_9YsuW0",	
  
	
  	
  "childLink":	
  "https://www.googleapis.com/drive/v2/files/1BuYLy9FkXpILYmwnRNetnUFCC9D-­‐U35PrJcO_9YsuW0"	
  
	
  },	
  
	
  {	
  
	
  	
  "kind":	
  "drive#childReference",	
  
	
  	
  "id":	
  "1pfcXbfX9PaUk12Cywqav9H77-­‐DQEWhxjeKHgu1qpAi8",	
  
	
  	
  "selfLink":	
  "
https://www.googleapis.com/drive/v2/files/0B2Pq-­‐qMI4R2jYVdudkdNMld3Vm8/children/1pfcXbfX9PaUk12Cywqav9H77-­‐DQEWhxjeKHgu1qpAi8",	
  
	
  	
  "childLink":	
  "https://www.googleapis.com/drive/v2/files/1pfcXbfX9PaUk12Cywqav9H77-­‐DQEWhxjeKHgu1qpAi8"	
  
	
  }	
  
]	
  
}	
  
©2015 Apigee Corp. All Rights Reserved. 
Principles Illustrated
•  Use JSON
•  Keep your JSON simple and flat
•  Links can be simple properties
•  Collections are resources too
•  Provide a "self" property
•  Provide a "kind" property
©2015 Apigee Corp. All Rights Reserved. 
Perma-links Versus ‘Query URLs’
'Query URLs':
http://example.org/?type=Person&id=personID	
  
http://example.org/people/{personId}	
  
http://example.org/people/{personName}
vs Perma-links
http://example.org/cGVyc29uczt7cGVyc29uX2lkfS9kb2dz	
  	
  
©2015 Apigee Corp. All Rights Reserved. 
API Versioning
©2015 Apigee Corp. All Rights Reserved. 
The Most Complex Form of Versioning
•  Multiple versions of the same resource are available simultaneously
•  Client selects the version it needs
•  Cons:
–  It is expensive to implement
–  It doesn’t always work anyway
•  Pros:
–  Supports frequent versioning
•  Very few people actually do this
©2015 Apigee Corp. All Rights Reserved. 
Why Doesn’t It Always Work?
•  It doesn't work if you make substantial data-model changes
– You won’t be able to update through the old versions
•  It doesn't work for micro-services
– Consider:
•  /v1/orders/123456	
  
•  /v2/accounts/9876765	
  
– Now consider:
•  /v2/recent_changes	
  
– Should it include v1 format of orders, "
or v2 format of orders?
©2015 Apigee Corp. All Rights Reserved. 
Pragmatic Versioning
•  Only one version of each resource available at any one time
–  Make sure clients can tolerate minor changes
•  Version upgrade is infrequent
– Major breaking change
•  Less elegant version:
– https://api.acmecorp.com/orders/v1/123456	
  
– https://api.acmecorp.com/orders/v2/123456	
  
•  Elegant version – the ‘no-versioning’ strategy for versioning
– https://api.acmecorp.com/orders/123456	
  
– https://api2.acmecorp.com/orders/123456	
  
©2015 Apigee Corp. All Rights Reserved. 
Summary
•  Data-oriented APIs
•  Simple, flat JSON
•  Hypermedia
–  Hypermedia links can be simple JSON properties
•  Simple collections that are also resources
•  Simple, ‘no versioning’ versioning strategy
Thank you
Martin Nally
@mpnally
Marsh Gardiner
@earth2marsh

More Related Content

What's hot

OpenACT - Meet1 - Intro to APIs
OpenACT - Meet1 - Intro to APIsOpenACT - Meet1 - Intro to APIs
OpenACT - Meet1 - Intro to APIs
OpenACT
 
How mentoring can help you start contributing to open source
How mentoring can help you start contributing to open sourceHow mentoring can help you start contributing to open source
How mentoring can help you start contributing to open source
Luciano Resende
 
Owning the Lifecycle of a Drupal Digital Project
Owning the Lifecycle of a Drupal Digital ProjectOwning the Lifecycle of a Drupal Digital Project
Owning the Lifecycle of a Drupal Digital Project
Acquia
 
Six Steps To Build A Successful API
Six Steps To Build A Successful APISix Steps To Build A Successful API
Six Steps To Build A Successful API
Chris Haddad
 
Apache Usergrid for JavaScript Developers
Apache Usergrid for JavaScript DevelopersApache Usergrid for JavaScript Developers
Apache Usergrid for JavaScript Developers
David M. Johnson
 
APIs and Linked Data: A match made in Heaven
APIs and Linked Data: A match made in HeavenAPIs and Linked Data: A match made in Heaven
APIs and Linked Data: A match made in Heaven
Michael Petychakis
 
Session at Oredev 2016.
Session at Oredev 2016.Session at Oredev 2016.
Session at Oredev 2016.
Geertjan Wielenga
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
David M. Johnson
 
Coding from Application Container Cloud to Oracle JET
Coding from Application Container Cloud to Oracle JETCoding from Application Container Cloud to Oracle JET
Coding from Application Container Cloud to Oracle JET
Geertjan Wielenga
 
geecon 2016: "What's Oracle Doing with JavaScript?!"
geecon 2016: "What's Oracle Doing with JavaScript?!"geecon 2016: "What's Oracle Doing with JavaScript?!"
geecon 2016: "What's Oracle Doing with JavaScript?!"
Geertjan Wielenga
 
The 7 Deadly Sins of API Design
The 7 Deadly Sins of API DesignThe 7 Deadly Sins of API Design
The 7 Deadly Sins of API Design
luisw19
 
Wrapping and Securing REST APIs with GraphQL
Wrapping and Securing REST APIs with GraphQLWrapping and Securing REST APIs with GraphQL
Wrapping and Securing REST APIs with GraphQL
Roy Derks
 
Open Source Mobile Backend on Cassandra
Open Source Mobile Backend on CassandraOpen Source Mobile Backend on Cassandra
Open Source Mobile Backend on Cassandra
Ed Anuff
 
Design for scale
Design for scaleDesign for scale
Design for scale
Doug Lampe
 
Making Smart Homes Smarter With Javascript
Making Smart Homes Smarter With JavascriptMaking Smart Homes Smarter With Javascript
Making Smart Homes Smarter With Javascript
Joel Lord
 
Apache Unomi presentation and update. By Serge Huber, CTO Jahia
Apache Unomi presentation and update. By Serge Huber, CTO JahiaApache Unomi presentation and update. By Serge Huber, CTO Jahia
Apache Unomi presentation and update. By Serge Huber, CTO Jahia
Jahia Solutions Group
 
Get Some REST: Building Great APIs for Great Apps | Allen Pike, Steamclock So...
Get Some REST: Building Great APIs for Great Apps | Allen Pike, Steamclock So...Get Some REST: Building Great APIs for Great Apps | Allen Pike, Steamclock So...
Get Some REST: Building Great APIs for Great Apps | Allen Pike, Steamclock So...
Dealmaker Media
 
Usergrid Overview
Usergrid OverviewUsergrid Overview
Usergrid Overview
usergrid
 
Apache Rave at The Apache Meetup in NL
Apache Rave at The Apache Meetup in NLApache Rave at The Apache Meetup in NL
Apache Rave at The Apache Meetup in NL
Jasha Joachimsthal
 
Oracle User Group Holland
Oracle User Group HollandOracle User Group Holland
Oracle User Group Holland
Geertjan Wielenga
 

What's hot (20)

OpenACT - Meet1 - Intro to APIs
OpenACT - Meet1 - Intro to APIsOpenACT - Meet1 - Intro to APIs
OpenACT - Meet1 - Intro to APIs
 
How mentoring can help you start contributing to open source
How mentoring can help you start contributing to open sourceHow mentoring can help you start contributing to open source
How mentoring can help you start contributing to open source
 
Owning the Lifecycle of a Drupal Digital Project
Owning the Lifecycle of a Drupal Digital ProjectOwning the Lifecycle of a Drupal Digital Project
Owning the Lifecycle of a Drupal Digital Project
 
Six Steps To Build A Successful API
Six Steps To Build A Successful APISix Steps To Build A Successful API
Six Steps To Build A Successful API
 
Apache Usergrid for JavaScript Developers
Apache Usergrid for JavaScript DevelopersApache Usergrid for JavaScript Developers
Apache Usergrid for JavaScript Developers
 
APIs and Linked Data: A match made in Heaven
APIs and Linked Data: A match made in HeavenAPIs and Linked Data: A match made in Heaven
APIs and Linked Data: A match made in Heaven
 
Session at Oredev 2016.
Session at Oredev 2016.Session at Oredev 2016.
Session at Oredev 2016.
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
 
Coding from Application Container Cloud to Oracle JET
Coding from Application Container Cloud to Oracle JETCoding from Application Container Cloud to Oracle JET
Coding from Application Container Cloud to Oracle JET
 
geecon 2016: "What's Oracle Doing with JavaScript?!"
geecon 2016: "What's Oracle Doing with JavaScript?!"geecon 2016: "What's Oracle Doing with JavaScript?!"
geecon 2016: "What's Oracle Doing with JavaScript?!"
 
The 7 Deadly Sins of API Design
The 7 Deadly Sins of API DesignThe 7 Deadly Sins of API Design
The 7 Deadly Sins of API Design
 
Wrapping and Securing REST APIs with GraphQL
Wrapping and Securing REST APIs with GraphQLWrapping and Securing REST APIs with GraphQL
Wrapping and Securing REST APIs with GraphQL
 
Open Source Mobile Backend on Cassandra
Open Source Mobile Backend on CassandraOpen Source Mobile Backend on Cassandra
Open Source Mobile Backend on Cassandra
 
Design for scale
Design for scaleDesign for scale
Design for scale
 
Making Smart Homes Smarter With Javascript
Making Smart Homes Smarter With JavascriptMaking Smart Homes Smarter With Javascript
Making Smart Homes Smarter With Javascript
 
Apache Unomi presentation and update. By Serge Huber, CTO Jahia
Apache Unomi presentation and update. By Serge Huber, CTO JahiaApache Unomi presentation and update. By Serge Huber, CTO Jahia
Apache Unomi presentation and update. By Serge Huber, CTO Jahia
 
Get Some REST: Building Great APIs for Great Apps | Allen Pike, Steamclock So...
Get Some REST: Building Great APIs for Great Apps | Allen Pike, Steamclock So...Get Some REST: Building Great APIs for Great Apps | Allen Pike, Steamclock So...
Get Some REST: Building Great APIs for Great Apps | Allen Pike, Steamclock So...
 
Usergrid Overview
Usergrid OverviewUsergrid Overview
Usergrid Overview
 
Apache Rave at The Apache Meetup in NL
Apache Rave at The Apache Meetup in NLApache Rave at The Apache Meetup in NL
Apache Rave at The Apache Meetup in NL
 
Oracle User Group Holland
Oracle User Group HollandOracle User Group Holland
Oracle User Group Holland
 

Similar to Webcast: Pragmatic REST: The Next Generation

Pragmatic REST: recent trends in API design
Pragmatic REST: recent trends in API designPragmatic REST: recent trends in API design
Pragmatic REST: recent trends in API design
Marsh Gardiner
 
Rest in practice
Rest in practiceRest in practice
Rest in practice
Ian Brennan
 
SpagoBI 5 Demo Day and Workshop : Technology Applications and Uses
SpagoBI 5 Demo Day and Workshop : Technology Applications and UsesSpagoBI 5 Demo Day and Workshop : Technology Applications and Uses
SpagoBI 5 Demo Day and Workshop : Technology Applications and Uses
SpagoWorld
 
Making Sense of Hypermedia APIs – Hype or Reality?
Making Sense of Hypermedia APIs – Hype or Reality?Making Sense of Hypermedia APIs – Hype or Reality?
Making Sense of Hypermedia APIs – Hype or Reality?
Akana
 
OSMC 2014: Using elasticsearch, logstash & kibana in system administration | ...
OSMC 2014: Using elasticsearch, logstash & kibana in system administration | ...OSMC 2014: Using elasticsearch, logstash & kibana in system administration | ...
OSMC 2014: Using elasticsearch, logstash & kibana in system administration | ...
NETWAYS
 
Hypermedia api (HATEOAS)
Hypermedia api (HATEOAS)Hypermedia api (HATEOAS)
Hypermedia api (HATEOAS)
MitinPavel
 
A Practical Guide to Hypermedia APIs
A Practical Guide to Hypermedia APIsA Practical Guide to Hypermedia APIs
A Practical Guide to Hypermedia APIs
SmartLogic
 
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIs
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIsThe liferay case: lessons learned evolving from RPC to Hypermedia REST APIs
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIs
Jorge Ferrer
 
DataEngConf SF16 - Methods for Content Relevance at LinkedIn
DataEngConf SF16 - Methods for Content Relevance at LinkedInDataEngConf SF16 - Methods for Content Relevance at LinkedIn
DataEngConf SF16 - Methods for Content Relevance at LinkedIn
Hakka Labs
 
Big Data at Oracle - Strata 2015 San Jose
Big Data at Oracle - Strata 2015 San JoseBig Data at Oracle - Strata 2015 San Jose
Big Data at Oracle - Strata 2015 San Jose
Jeffrey T. Pollock
 
Which Freaking Database Should I Use?
Which Freaking Database Should I Use?Which Freaking Database Should I Use?
Which Freaking Database Should I Use?
Great Wide Open
 
James Higginbotham - API Design
James Higginbotham - API DesignJames Higginbotham - API Design
James Higginbotham - API Design
John Zozzaro
 
Architect's Guide to Building an API Program
Architect's Guide to Building an API ProgramArchitect's Guide to Building an API Program
Architect's Guide to Building an API Program
clatimer
 
Great APIs - Future of Your Progress App
Great APIs - Future of Your Progress AppGreat APIs - Future of Your Progress App
Great APIs - Future of Your Progress App
Gabriel Lucaciu
 
NASA SensorWeb Enterprise Services
NASA SensorWeb Enterprise ServicesNASA SensorWeb Enterprise Services
NASA SensorWeb Enterprise Services
Pat Cappelaere
 
A Practical Guide To Hypermedia APIs - Philly.rb
A Practical Guide To Hypermedia APIs - Philly.rbA Practical Guide To Hypermedia APIs - Philly.rb
A Practical Guide To Hypermedia APIs - Philly.rb
SmartLogic
 
Put iOS and Android on the same Wavelength with Serverless Microservices
Put iOS and Android on the same Wavelength with Serverless MicroservicesPut iOS and Android on the same Wavelength with Serverless Microservices
Put iOS and Android on the same Wavelength with Serverless Microservices
Neil Power
 
The Key to Big Data Modeling: Collaboration
The Key to Big Data Modeling: CollaborationThe Key to Big Data Modeling: Collaboration
The Key to Big Data Modeling: Collaboration
Embarcadero Technologies
 
API Design Tour: Digital River
API Design Tour: Digital RiverAPI Design Tour: Digital River
API Design Tour: Digital River
Apigee | Google Cloud
 
API Design Tour with Digital River and Apigee - June 26th, 2012
API Design Tour with Digital River and Apigee - June 26th, 2012API Design Tour with Digital River and Apigee - June 26th, 2012
API Design Tour with Digital River and Apigee - June 26th, 2012
rubes_mn
 

Similar to Webcast: Pragmatic REST: The Next Generation (20)

Pragmatic REST: recent trends in API design
Pragmatic REST: recent trends in API designPragmatic REST: recent trends in API design
Pragmatic REST: recent trends in API design
 
Rest in practice
Rest in practiceRest in practice
Rest in practice
 
SpagoBI 5 Demo Day and Workshop : Technology Applications and Uses
SpagoBI 5 Demo Day and Workshop : Technology Applications and UsesSpagoBI 5 Demo Day and Workshop : Technology Applications and Uses
SpagoBI 5 Demo Day and Workshop : Technology Applications and Uses
 
Making Sense of Hypermedia APIs – Hype or Reality?
Making Sense of Hypermedia APIs – Hype or Reality?Making Sense of Hypermedia APIs – Hype or Reality?
Making Sense of Hypermedia APIs – Hype or Reality?
 
OSMC 2014: Using elasticsearch, logstash & kibana in system administration | ...
OSMC 2014: Using elasticsearch, logstash & kibana in system administration | ...OSMC 2014: Using elasticsearch, logstash & kibana in system administration | ...
OSMC 2014: Using elasticsearch, logstash & kibana in system administration | ...
 
Hypermedia api (HATEOAS)
Hypermedia api (HATEOAS)Hypermedia api (HATEOAS)
Hypermedia api (HATEOAS)
 
A Practical Guide to Hypermedia APIs
A Practical Guide to Hypermedia APIsA Practical Guide to Hypermedia APIs
A Practical Guide to Hypermedia APIs
 
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIs
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIsThe liferay case: lessons learned evolving from RPC to Hypermedia REST APIs
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIs
 
DataEngConf SF16 - Methods for Content Relevance at LinkedIn
DataEngConf SF16 - Methods for Content Relevance at LinkedInDataEngConf SF16 - Methods for Content Relevance at LinkedIn
DataEngConf SF16 - Methods for Content Relevance at LinkedIn
 
Big Data at Oracle - Strata 2015 San Jose
Big Data at Oracle - Strata 2015 San JoseBig Data at Oracle - Strata 2015 San Jose
Big Data at Oracle - Strata 2015 San Jose
 
Which Freaking Database Should I Use?
Which Freaking Database Should I Use?Which Freaking Database Should I Use?
Which Freaking Database Should I Use?
 
James Higginbotham - API Design
James Higginbotham - API DesignJames Higginbotham - API Design
James Higginbotham - API Design
 
Architect's Guide to Building an API Program
Architect's Guide to Building an API ProgramArchitect's Guide to Building an API Program
Architect's Guide to Building an API Program
 
Great APIs - Future of Your Progress App
Great APIs - Future of Your Progress AppGreat APIs - Future of Your Progress App
Great APIs - Future of Your Progress App
 
NASA SensorWeb Enterprise Services
NASA SensorWeb Enterprise ServicesNASA SensorWeb Enterprise Services
NASA SensorWeb Enterprise Services
 
A Practical Guide To Hypermedia APIs - Philly.rb
A Practical Guide To Hypermedia APIs - Philly.rbA Practical Guide To Hypermedia APIs - Philly.rb
A Practical Guide To Hypermedia APIs - Philly.rb
 
Put iOS and Android on the same Wavelength with Serverless Microservices
Put iOS and Android on the same Wavelength with Serverless MicroservicesPut iOS and Android on the same Wavelength with Serverless Microservices
Put iOS and Android on the same Wavelength with Serverless Microservices
 
The Key to Big Data Modeling: Collaboration
The Key to Big Data Modeling: CollaborationThe Key to Big Data Modeling: Collaboration
The Key to Big Data Modeling: Collaboration
 
API Design Tour: Digital River
API Design Tour: Digital RiverAPI Design Tour: Digital River
API Design Tour: Digital River
 
API Design Tour with Digital River and Apigee - June 26th, 2012
API Design Tour with Digital River and Apigee - June 26th, 2012API Design Tour with Digital River and Apigee - June 26th, 2012
API Design Tour with Digital River and Apigee - June 26th, 2012
 

More from Apigee | Google Cloud

How Secure Are Your APIs?
How Secure Are Your APIs?How Secure Are Your APIs?
How Secure Are Your APIs?
Apigee | Google Cloud
 
Magazine Luiza at a glance (1)
Magazine Luiza at a glance (1)Magazine Luiza at a glance (1)
Magazine Luiza at a glance (1)
Apigee | Google Cloud
 
Monetization: Unlock More Value from Your APIs
Monetization: Unlock More Value from Your APIs Monetization: Unlock More Value from Your APIs
Monetization: Unlock More Value from Your APIs
Apigee | Google Cloud
 
Apigee Demo: API Platform Overview
Apigee Demo: API Platform OverviewApigee Demo: API Platform Overview
Apigee Demo: API Platform Overview
Apigee | Google Cloud
 
Ticketmaster at a glance
Ticketmaster at a glanceTicketmaster at a glance
Ticketmaster at a glance
Apigee | Google Cloud
 
AccuWeather: Recasting API Experiences in a Developer-First World
AccuWeather: Recasting API Experiences in a Developer-First WorldAccuWeather: Recasting API Experiences in a Developer-First World
AccuWeather: Recasting API Experiences in a Developer-First World
Apigee | Google Cloud
 
Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?
Apigee | Google Cloud
 
Apigee Product Roadmap Part 2
Apigee Product Roadmap Part 2Apigee Product Roadmap Part 2
Apigee Product Roadmap Part 2
Apigee | Google Cloud
 
The Four Transformative Forces of the API Management Market
The Four Transformative Forces of the API Management MarketThe Four Transformative Forces of the API Management Market
The Four Transformative Forces of the API Management Market
Apigee | Google Cloud
 
Walgreens at a glance
Walgreens at a glanceWalgreens at a glance
Walgreens at a glance
Apigee | Google Cloud
 
Apigee Edge: Intro to Microgateway
Apigee Edge: Intro to MicrogatewayApigee Edge: Intro to Microgateway
Apigee Edge: Intro to Microgateway
Apigee | Google Cloud
 
Managing the Complexity of Microservices Deployments
Managing the Complexity of Microservices DeploymentsManaging the Complexity of Microservices Deployments
Managing the Complexity of Microservices Deployments
Apigee | Google Cloud
 
Pitney Bowes at a glance
Pitney Bowes at a glancePitney Bowes at a glance
Pitney Bowes at a glance
Apigee | Google Cloud
 
Microservices Done Right: Key Ingredients for Microservices Success
Microservices Done Right: Key Ingredients for Microservices SuccessMicroservices Done Right: Key Ingredients for Microservices Success
Microservices Done Right: Key Ingredients for Microservices Success
Apigee | Google Cloud
 
Adapt or Die: Opening Keynote with Chet Kapoor
Adapt or Die: Opening Keynote with Chet KapoorAdapt or Die: Opening Keynote with Chet Kapoor
Adapt or Die: Opening Keynote with Chet Kapoor
Apigee | Google Cloud
 
Adapt or Die: Keynote with Greg Brail
Adapt or Die: Keynote with Greg BrailAdapt or Die: Keynote with Greg Brail
Adapt or Die: Keynote with Greg Brail
Apigee | Google Cloud
 
Adapt or Die: Keynote with Anant Jhingran
Adapt or Die: Keynote with Anant JhingranAdapt or Die: Keynote with Anant Jhingran
Adapt or Die: Keynote with Anant Jhingran
Apigee | Google Cloud
 
London Adapt or Die: Opening Keynot
London Adapt or Die: Opening KeynotLondon Adapt or Die: Opening Keynot
London Adapt or Die: Opening Keynot
Apigee | Google Cloud
 
London Adapt or Die: Lunch keynote
London Adapt or Die: Lunch keynoteLondon Adapt or Die: Lunch keynote
London Adapt or Die: Lunch keynote
Apigee | Google Cloud
 
London Adapt or Die: Closing Keynote — Adapt Now!
London Adapt or Die: Closing Keynote — Adapt Now!London Adapt or Die: Closing Keynote — Adapt Now!
London Adapt or Die: Closing Keynote — Adapt Now!
Apigee | Google Cloud
 

More from Apigee | Google Cloud (20)

How Secure Are Your APIs?
How Secure Are Your APIs?How Secure Are Your APIs?
How Secure Are Your APIs?
 
Magazine Luiza at a glance (1)
Magazine Luiza at a glance (1)Magazine Luiza at a glance (1)
Magazine Luiza at a glance (1)
 
Monetization: Unlock More Value from Your APIs
Monetization: Unlock More Value from Your APIs Monetization: Unlock More Value from Your APIs
Monetization: Unlock More Value from Your APIs
 
Apigee Demo: API Platform Overview
Apigee Demo: API Platform OverviewApigee Demo: API Platform Overview
Apigee Demo: API Platform Overview
 
Ticketmaster at a glance
Ticketmaster at a glanceTicketmaster at a glance
Ticketmaster at a glance
 
AccuWeather: Recasting API Experiences in a Developer-First World
AccuWeather: Recasting API Experiences in a Developer-First WorldAccuWeather: Recasting API Experiences in a Developer-First World
AccuWeather: Recasting API Experiences in a Developer-First World
 
Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?
 
Apigee Product Roadmap Part 2
Apigee Product Roadmap Part 2Apigee Product Roadmap Part 2
Apigee Product Roadmap Part 2
 
The Four Transformative Forces of the API Management Market
The Four Transformative Forces of the API Management MarketThe Four Transformative Forces of the API Management Market
The Four Transformative Forces of the API Management Market
 
Walgreens at a glance
Walgreens at a glanceWalgreens at a glance
Walgreens at a glance
 
Apigee Edge: Intro to Microgateway
Apigee Edge: Intro to MicrogatewayApigee Edge: Intro to Microgateway
Apigee Edge: Intro to Microgateway
 
Managing the Complexity of Microservices Deployments
Managing the Complexity of Microservices DeploymentsManaging the Complexity of Microservices Deployments
Managing the Complexity of Microservices Deployments
 
Pitney Bowes at a glance
Pitney Bowes at a glancePitney Bowes at a glance
Pitney Bowes at a glance
 
Microservices Done Right: Key Ingredients for Microservices Success
Microservices Done Right: Key Ingredients for Microservices SuccessMicroservices Done Right: Key Ingredients for Microservices Success
Microservices Done Right: Key Ingredients for Microservices Success
 
Adapt or Die: Opening Keynote with Chet Kapoor
Adapt or Die: Opening Keynote with Chet KapoorAdapt or Die: Opening Keynote with Chet Kapoor
Adapt or Die: Opening Keynote with Chet Kapoor
 
Adapt or Die: Keynote with Greg Brail
Adapt or Die: Keynote with Greg BrailAdapt or Die: Keynote with Greg Brail
Adapt or Die: Keynote with Greg Brail
 
Adapt or Die: Keynote with Anant Jhingran
Adapt or Die: Keynote with Anant JhingranAdapt or Die: Keynote with Anant Jhingran
Adapt or Die: Keynote with Anant Jhingran
 
London Adapt or Die: Opening Keynot
London Adapt or Die: Opening KeynotLondon Adapt or Die: Opening Keynot
London Adapt or Die: Opening Keynot
 
London Adapt or Die: Lunch keynote
London Adapt or Die: Lunch keynoteLondon Adapt or Die: Lunch keynote
London Adapt or Die: Lunch keynote
 
London Adapt or Die: Closing Keynote — Adapt Now!
London Adapt or Die: Closing Keynote — Adapt Now!London Adapt or Die: Closing Keynote — Adapt Now!
London Adapt or Die: Closing Keynote — Adapt Now!
 

Recently uploaded

Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
marufrahmanstratejm
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
SAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloudSAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloud
maazsz111
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
Data Hops
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Precisely
 

Recently uploaded (20)

Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
SAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloudSAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloud
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3FREE A4 Cyber Security Awareness  Posters-Social Engineering part 3
FREE A4 Cyber Security Awareness Posters-Social Engineering part 3
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
 

Webcast: Pragmatic REST: The Next Generation

  • 1. ©2015 Apigee Corp. All Rights Reserved.
  • 2. ©2015 Apigee Corp. All Rights Reserved. Intro • Why care about this topic? • Why care about what we think?
  • 3. ©2015 Apigee Corp. All Rights Reserved. Topics • What is a "REST API" – Data-oriented versus Service-oriented APIs – Hypermedia – JSON representations – Collections • Versioning
  • 4. ©2015 Apigee Corp. All Rights Reserved. History Service-oriented Data-oriented RPC CORBA SOAP/WSDL "REST API" NLS Xanadu Databases World-Wide Web REST ?? Object-orientation "REST API"
  • 5. ©2015 Apigee Corp. All Rights Reserved. Opposing Perspectives Service-oriented Data behind operations Data-oriented Operations behind data
  • 6. ©2015 Apigee Corp. All Rights Reserved. Opposing Perspectives Service-oriented         getPerson(personId)   updatePerson(personId,  data)   deletePerson(personId)   Data-oriented       http://primary-­‐key-­‐value   http://example.org/person/12345  
  • 7. ©2015 Apigee Corp. All Rights Reserved. Why We Like Data-Oriented APIs • The primary value is the data it exposes • Data-Oriented is Simpler – Learn the data vs learn the services + the data – Don’t design an API at all, just use REST
  • 8. ©2015 Apigee Corp. All Rights Reserved. What Is Important? Are you wasting time repetitively documenting the standard HTTP REST patterns?
  • 9. ©2015 Apigee Corp. All Rights Reserved. What would be better? 9 ©2015 Apigee. All Rights Reserved. PetTracker Dog People dogs n people n 1 1 owner 1 dogs n birthDate birthDate hairColor furColor name name REST/HTTP +
  • 10. ©2015 Apigee Corp. All Rights Reserved. Follow the REST/HTTP patterns exactly • E.g. – POST means Create. Response status code is 201. URL of new resource is in the 'Location' header – PUT means 'replace', not 'update'. PATCH means 'update' – GET response includes ETag and Content-Location headers – PUT and PATCH require an 'If-Match' header – … 10 ©2015 Apigee. All Rights Reserved.
  • 11. ©2015 Apigee Corp. All Rights Reserved. Gaps in HTTP/REST for programmatic use •  How do you represent relationships – Single-valued •  What is a hyperlink? – Multi-valued •  What is a Collection/Cursor? •  HTML provides some answers for the human-readable web –  <a ref = "http://example.org/people/98765432">Joe Carraclough</a> •  What is the equivalent for JSON? 11 ©2015 Apigee. All Rights Reserved.
  • 12. ©2015 Apigee Corp. All Rights Reserved. Hypermedia — Just Do It •  Most data is conceptually linked –  So show the links in the data •  Myths –  Hypermedia APIs are controversial (practiced by extremists) –  Hypermedia APIs are difficult –  Hypermedia APIs are 100% self-describing –  Hypermedia APIs are not compatible with languages like Swagger (or other DLs)
  • 13. ©2015 Apigee Corp. All Rights Reserved. Service-Oriented Data-Oriented http://example.org/people   http://example.org/people/{personID}   http://example.org/people/{personID}/dogs   http://example.org/dogs   http://example.org/dogs/{dogID}   http://example.org/dogs/{dogID}/owner        plus   {"id":  "12345678",      "type":  "Dog"    "name":  "Lassie",      "fur_color":  "brown",    "owner":  "98765432"}   and   {"id":"98765432",      "type":  "Person"    "name":  "Joe  Carraclough",      "hair_color":  "brown"}     {"self":  "http://example.org/",    "type":  "PetTracker",    "dogs":  "http://example.org/dogs",    "people":  "http://example.org/people}        and   {"self":  "http://example.org/dogs/12345678",      "type":  "Dog",    "name":  "Lassie",      "fur_color":  "brown",    "owner":  "http://example.org/people/98765432"}   and   {"self":  "http://example.org/people/98765432",      "type":  "Person",    "name":  "Joe  Carraclough",      "hair_color":  "brown",    "dogs":  "http://example.org/people/98765432/dogs"}    
  • 14. ©2015 Apigee Corp. All Rights Reserved. Cursor/Collection {    "self":  "http://example.org/dogs",    "type":  "Collection",    "items":  [   {"self":  "http://example.org/dogs/12345678",      "type":  "Dog",    "name":  "Lassie",      "fur_color":  "brown",    "owner":  "http://example.org/people/98765432"},   {"self":  "http://example.org/dogs/12345679",      "type":  "Dog",    "name":  "Lassie",      "fur_color":  "brown",    "owner":  "http://example.org/people/98765432"}   ]   }   14 ©2015 Apigee. All Rights Reserved.
  • 15. ©2015 Apigee Corp. All Rights Reserved. Cursor/Collection {    "self":  "http://example.org/dogs?limit=10",    "type":  "Page",    "collection":  "http://example.org/dogs",    "next":  "http://example.org/ZG9ncz87bGFzdD0xMA==",    "previous":  "http://example.org/ZG9ncz87Zmlyc3Q9MTA=",    "items":  [   {"self":  "http://example.org/dogs/12345678",      "type":  "Dog",    "name":  "Lassie",      "fur_color":  "brown",    "owner":  "http://example.org/people/98765432"},   {"self":  "http://example.org/dogs/12345679",      "type":  "Dog",    "name":  "Lassie",      "fur_color":  "brown",    "owner":  "http://example.org/people/98765432"}   ]   }   15 ©2015 Apigee. All Rights Reserved.
  • 16. ©2015 Apigee Corp. All Rights Reserved. A File in Google Drive {   "kind":  "drive#file",   "id":  "1cjKSwWlryNfRs-­‐durx_8n0dGTUWE_klBrP8IuEYTUu0",   "etag":  "9vYBbk7LzzrwpsohQSOkWalvY6Y/MTQ0Mjc1ODk5NzAwMQ",   "selfLink":  "https://www.googleapis.com/drive/v2/files/1cjKSwWlryNfRs-­‐durx_8n0dGTUWE_klBrP8IuEYTUu0",   "alternateLink":  "https://docs.google.com/a/apigee.com/document/d/1cjKSwWlryNfRs-­‐durx_8n0dGTUWE_klBrP8IuEYTUu0/edit?usp=drivesdk",   "embedLink":  "https://docs.google.com/a/apigee.com/document/d/1cjKSwWlryNfRs-­‐durx_8n0dGTUWE_klBrP8IuEYTUu0/preview",   ...   "title":  "Web  API  Design  edition  2",   "mimeType":  "application/vnd.google-­‐apps.document",   ...   "createdDate":  "2015-­‐07-­‐10T15:26:34.567Z",   "modifiedDate":  "2015-­‐09-­‐20T14:23:17.001Z",   "modifiedByMeDate":  "2015-­‐09-­‐20T14:23:17.001Z",   "lastViewedByMeDate":  "2015-­‐09-­‐30T23:16:08.011Z",   "markedViewedByMeDate":  "1970-­‐01-­‐01T00:00:00.000Z",   "version":  "41819",   ...    
  • 17. ©2015 Apigee Corp. All Rights Reserved. A Folder's Children in Google Drive {   "kind":  "drive#childList",   "etag":  "9vYBbk7LzzrwpsohQSOkWalvY6Y/73yTWsreOINR667_OZQCurHB09o",   "selfLink":  "https://www.googleapis.com/drive/v2/files/0B2Pq-­‐qMI4R2jYVdudkdNMld3Vm8/children",   "items":  [    {      "kind":  "drive#childReference",      "id":  "1BuYLy9FkXpILYmwnRNetnUFCC9D-­‐U35PrJcO_9YsuW0",      "selfLink":  " https://www.googleapis.com/drive/v2/files/0B2Pq-­‐qMI4R2jYVdudkdNMld3Vm8/children/1BuYLy9FkXpILYmwnRNetnUFCC9D-­‐U35PrJcO_9YsuW0",      "childLink":  "https://www.googleapis.com/drive/v2/files/1BuYLy9FkXpILYmwnRNetnUFCC9D-­‐U35PrJcO_9YsuW0"    },    {      "kind":  "drive#childReference",      "id":  "1pfcXbfX9PaUk12Cywqav9H77-­‐DQEWhxjeKHgu1qpAi8",      "selfLink":  " https://www.googleapis.com/drive/v2/files/0B2Pq-­‐qMI4R2jYVdudkdNMld3Vm8/children/1pfcXbfX9PaUk12Cywqav9H77-­‐DQEWhxjeKHgu1qpAi8",      "childLink":  "https://www.googleapis.com/drive/v2/files/1pfcXbfX9PaUk12Cywqav9H77-­‐DQEWhxjeKHgu1qpAi8"    }   ]   }  
  • 18. ©2015 Apigee Corp. All Rights Reserved. Principles Illustrated •  Use JSON •  Keep your JSON simple and flat •  Links can be simple properties •  Collections are resources too •  Provide a "self" property •  Provide a "kind" property
  • 19. ©2015 Apigee Corp. All Rights Reserved. Perma-links Versus ‘Query URLs’ 'Query URLs': http://example.org/?type=Person&id=personID   http://example.org/people/{personId}   http://example.org/people/{personName} vs Perma-links http://example.org/cGVyc29uczt7cGVyc29uX2lkfS9kb2dz    
  • 20. ©2015 Apigee Corp. All Rights Reserved. API Versioning
  • 21. ©2015 Apigee Corp. All Rights Reserved. The Most Complex Form of Versioning •  Multiple versions of the same resource are available simultaneously •  Client selects the version it needs •  Cons: –  It is expensive to implement –  It doesn’t always work anyway •  Pros: –  Supports frequent versioning •  Very few people actually do this
  • 22. ©2015 Apigee Corp. All Rights Reserved. Why Doesn’t It Always Work? •  It doesn't work if you make substantial data-model changes – You won’t be able to update through the old versions •  It doesn't work for micro-services – Consider: •  /v1/orders/123456   •  /v2/accounts/9876765   – Now consider: •  /v2/recent_changes   – Should it include v1 format of orders, " or v2 format of orders?
  • 23. ©2015 Apigee Corp. All Rights Reserved. Pragmatic Versioning •  Only one version of each resource available at any one time –  Make sure clients can tolerate minor changes •  Version upgrade is infrequent – Major breaking change •  Less elegant version: – https://api.acmecorp.com/orders/v1/123456   – https://api.acmecorp.com/orders/v2/123456   •  Elegant version – the ‘no-versioning’ strategy for versioning – https://api.acmecorp.com/orders/123456   – https://api2.acmecorp.com/orders/123456  
  • 24. ©2015 Apigee Corp. All Rights Reserved. Summary •  Data-oriented APIs •  Simple, flat JSON •  Hypermedia –  Hypermedia links can be simple JSON properties •  Simple collections that are also resources •  Simple, ‘no versioning’ versioning strategy
  • 25. Thank you Martin Nally @mpnally Marsh Gardiner @earth2marsh