SlideShare a Scribd company logo
1 of 22
YOUR API SPEC ISN’T WORTH THE PAPER IT’S WRITTEN ON
@NORDICAPIS 2019 AUSTIN #AUSTINAPISUMMIT
GARETH JONES
PRINCIPAL API ARCHITECT
@GARETHJ_MSFT
This Photo by Unknown Author is licensed under CC BY-SA
YOU ARE AN API OWNER.
YOU ARE FEELING SMUG.
Open API 3.0
description
Generated
SDKs
Automated
tests
Pervasive
monitoring
This Photo by Unknown Author is licensed under CC BY-SA-NC
YOU DEPLOY A NEW BUILD
This Photo by Unknown Author is licensed under CC BY-NC
This Photo by Unknown Author is licensed under CC BY-SA-NC
CONSUMER/PRODUCER CONTRACT
This Photo by Unknown Author is licensed under CC BY-SA
UNDERSPECIFIED CONTRACT
This Photo by Unknown Author is licensed under CC BY
BREAKING CHANGES
This Photo by Unknown Author is licensed under CC BY-NC-ND
DESIGN YOUR BREAKING CHANGE BAR
@garethj_msft
HYRUM’S LAW
With a sufficient number of users of an API,
it does not matter what you promise in the
contract:
all observable behaviors of your system
will be depended on by somebody.
NUMBER OF THINGS
GROWS
• Array size grows from 0 to 1
• Array size grows from 1 to n
• Array size grows from < 1 page
to > 1 page
SIZES OF
THINGS GROW
Image sizes get big
Overall packet sizes get too big
Example: major
retailer 10mb packet
Android device can’t
handle it with some
json stacks
PERFORMANCE,
UP DOWN
Lower or
higher
latency
New race conditions
Higher
latency
Unresponsive UI
Batch exceeds acceptable timeframe
This Photo by Unknown Author is licensed under CC BY
DREADED AUTH CHANGES
This Photo by Unknown Author is licensed under CC BY-SA
WEBHOOK
DENSITY
CHANGES
This Photo by Unknown Author is licensed under CC BY-SA
HYPERMEDIA
DOMAIN CHANGES
This Photo by Unknown Author is licensed under CC BY-SA-NC
QUERY PARAMETER COMBO MOVES
This Photo by Unknown Author is licensed under CC BY-SA
HOW CAN WE PROTECT
OURSELVES?
PROVIDE A
CHAOS MOCK
ENDPOINT
STRETCH EVERY BOUNDARY CASE
This Photo by Unknown Author is licensed under CC BY
RANDOMLY DISOBEY CONSUMER
PREFERENCES
This Photo by Unknown Author is licensed under CC BY
WATCH THOSE LOGS AFTER A
DEPLOYMENT
This Photo by Unknown Author is licensed under CC BY
CONSIDER THESE CASES AS BREAKING
CHANGES
This Photo by Unknown Author is licensed under CC BY-NC-ND
Oh, one last thing…
21
THANK YOU @garethj_msft

More Related Content

Similar to Your API spec isn't worth the paper it's written on

YugaByte DB—A Planet-Scale Database for Low Latency Transactional Apps
YugaByte DB—A Planet-Scale Database for Low Latency Transactional AppsYugaByte DB—A Planet-Scale Database for Low Latency Transactional Apps
YugaByte DB—A Planet-Scale Database for Low Latency Transactional AppsVMware Tanzu
 
Advanced networking on AWS | AWS Floor28
Advanced networking on AWS | AWS Floor28Advanced networking on AWS | AWS Floor28
Advanced networking on AWS | AWS Floor28Amazon Web Services
 
Mobile apps & Server Apis, the weak link? par Emanuele Pecorari
Mobile apps & Server Apis, the weak link? par Emanuele PecorariMobile apps & Server Apis, the weak link? par Emanuele Pecorari
Mobile apps & Server Apis, the weak link? par Emanuele PecorariOlivier DASINI
 
Appboy: Operating in the Cloud for 850 Million Monthly Active Users, FutureSt...
Appboy: Operating in the Cloud for 850 Million Monthly Active Users, FutureSt...Appboy: Operating in the Cloud for 850 Million Monthly Active Users, FutureSt...
Appboy: Operating in the Cloud for 850 Million Monthly Active Users, FutureSt...New Relic
 
APIdays Paris 2018 - Autonomous APIs, Zdenek Nemec, Founder, Good API
APIdays Paris 2018 - Autonomous APIs, Zdenek Nemec, Founder, Good APIAPIdays Paris 2018 - Autonomous APIs, Zdenek Nemec, Founder, Good API
APIdays Paris 2018 - Autonomous APIs, Zdenek Nemec, Founder, Good APIapidays
 
Spring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan BaxterSpring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan BaxterVMware Tanzu
 
Contract testing and Pact
Contract testing and PactContract testing and Pact
Contract testing and PactSeb Rose
 
DevOps for a Mobile World: Building an iOS or Android Mobile App in the Cloud...
DevOps for a Mobile World: Building an iOS or Android Mobile App in the Cloud...DevOps for a Mobile World: Building an iOS or Android Mobile App in the Cloud...
DevOps for a Mobile World: Building an iOS or Android Mobile App in the Cloud...Amazon Web Services
 
José M. Pérez Pérez | Better performance for component-based web apps | Codem...
José M. Pérez Pérez | Better performance for component-based web apps | Codem...José M. Pérez Pérez | Better performance for component-based web apps | Codem...
José M. Pérez Pérez | Better performance for component-based web apps | Codem...Codemotion
 
Reactive Applications on Apache Tomcat and Servlet 3.1 containers
Reactive Applications on Apache Tomcat and Servlet 3.1 containersReactive Applications on Apache Tomcat and Servlet 3.1 containers
Reactive Applications on Apache Tomcat and Servlet 3.1 containersVMware Tanzu
 
Tools to Slay the Fire Breathing Monoliths in Your Enterprise
Tools to Slay the Fire Breathing Monoliths in Your EnterpriseTools to Slay the Fire Breathing Monoliths in Your Enterprise
Tools to Slay the Fire Breathing Monoliths in Your EnterpriseVMware Tanzu
 
All you need to know to deploy applications on Kubernetes
All you need to know to deploy applications on KubernetesAll you need to know to deploy applications on Kubernetes
All you need to know to deploy applications on KubernetesOleksandr Slynko
 
Managing the Complexity of Microservices Deployments
Managing the Complexity of Microservices DeploymentsManaging the Complexity of Microservices Deployments
Managing the Complexity of Microservices DeploymentsVMware Tanzu
 
Spring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan BaxterSpring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan BaxterVMware Tanzu
 
Practical Tips for Ops: End User Monitoring
Practical Tips for Ops: End User MonitoringPractical Tips for Ops: End User Monitoring
Practical Tips for Ops: End User MonitoringDynatrace
 
Living on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora IberkleidLiving on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora IberkleidVMware Tanzu
 
Living on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora IberkleidLiving on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora IberkleidVMware Tanzu
 
How VPNs and Firewalls Put Your Organization at Risk
How VPNs and Firewalls Put Your Organization at RiskHow VPNs and Firewalls Put Your Organization at Risk
How VPNs and Firewalls Put Your Organization at RiskCyxtera Technologies
 

Similar to Your API spec isn't worth the paper it's written on (20)

YugaByte DB—A Planet-Scale Database for Low Latency Transactional Apps
YugaByte DB—A Planet-Scale Database for Low Latency Transactional AppsYugaByte DB—A Planet-Scale Database for Low Latency Transactional Apps
YugaByte DB—A Planet-Scale Database for Low Latency Transactional Apps
 
Advanced networking on AWS | AWS Floor28
Advanced networking on AWS | AWS Floor28Advanced networking on AWS | AWS Floor28
Advanced networking on AWS | AWS Floor28
 
Mobile apps & Server Apis, the weak link? par Emanuele Pecorari
Mobile apps & Server Apis, the weak link? par Emanuele PecorariMobile apps & Server Apis, the weak link? par Emanuele Pecorari
Mobile apps & Server Apis, the weak link? par Emanuele Pecorari
 
Appboy: Operating in the Cloud for 850 Million Monthly Active Users, FutureSt...
Appboy: Operating in the Cloud for 850 Million Monthly Active Users, FutureSt...Appboy: Operating in the Cloud for 850 Million Monthly Active Users, FutureSt...
Appboy: Operating in the Cloud for 850 Million Monthly Active Users, FutureSt...
 
APIdays Paris 2018 - Autonomous APIs, Zdenek Nemec, Founder, Good API
APIdays Paris 2018 - Autonomous APIs, Zdenek Nemec, Founder, Good APIAPIdays Paris 2018 - Autonomous APIs, Zdenek Nemec, Founder, Good API
APIdays Paris 2018 - Autonomous APIs, Zdenek Nemec, Founder, Good API
 
Spring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan BaxterSpring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan Baxter
 
Contract testing and Pact
Contract testing and PactContract testing and Pact
Contract testing and Pact
 
DevOps for a Mobile World: Building an iOS or Android Mobile App in the Cloud...
DevOps for a Mobile World: Building an iOS or Android Mobile App in the Cloud...DevOps for a Mobile World: Building an iOS or Android Mobile App in the Cloud...
DevOps for a Mobile World: Building an iOS or Android Mobile App in the Cloud...
 
José M. Pérez Pérez | Better performance for component-based web apps | Codem...
José M. Pérez Pérez | Better performance for component-based web apps | Codem...José M. Pérez Pérez | Better performance for component-based web apps | Codem...
José M. Pérez Pérez | Better performance for component-based web apps | Codem...
 
ANDROID info session.pdf
ANDROID info session.pdfANDROID info session.pdf
ANDROID info session.pdf
 
Reactive Applications on Apache Tomcat and Servlet 3.1 containers
Reactive Applications on Apache Tomcat and Servlet 3.1 containersReactive Applications on Apache Tomcat and Servlet 3.1 containers
Reactive Applications on Apache Tomcat and Servlet 3.1 containers
 
Tools to Slay the Fire Breathing Monoliths in Your Enterprise
Tools to Slay the Fire Breathing Monoliths in Your EnterpriseTools to Slay the Fire Breathing Monoliths in Your Enterprise
Tools to Slay the Fire Breathing Monoliths in Your Enterprise
 
All you need to know to deploy applications on Kubernetes
All you need to know to deploy applications on KubernetesAll you need to know to deploy applications on Kubernetes
All you need to know to deploy applications on Kubernetes
 
Managing the Complexity of Microservices Deployments
Managing the Complexity of Microservices DeploymentsManaging the Complexity of Microservices Deployments
Managing the Complexity of Microservices Deployments
 
Spring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan BaxterSpring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan Baxter
 
How to: Avoid Mistakes at Scale
How to: Avoid Mistakes at ScaleHow to: Avoid Mistakes at Scale
How to: Avoid Mistakes at Scale
 
Practical Tips for Ops: End User Monitoring
Practical Tips for Ops: End User MonitoringPractical Tips for Ops: End User Monitoring
Practical Tips for Ops: End User Monitoring
 
Living on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora IberkleidLiving on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora Iberkleid
 
Living on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora IberkleidLiving on the Edge With Spring Cloud Gateway - Cora Iberkleid
Living on the Edge With Spring Cloud Gateway - Cora Iberkleid
 
How VPNs and Firewalls Put Your Organization at Risk
How VPNs and Firewalls Put Your Organization at RiskHow VPNs and Firewalls Put Your Organization at Risk
How VPNs and Firewalls Put Your Organization at Risk
 

More from Gareth Jones

Graph API Strategies: CQRS for the API Economy
Graph API Strategies: CQRS for the API EconomyGraph API Strategies: CQRS for the API Economy
Graph API Strategies: CQRS for the API EconomyGareth Jones
 
Microsoft Education APIs
Microsoft Education APIsMicrosoft Education APIs
Microsoft Education APIsGareth Jones
 
Graph API Strategies: CQRS for the sustainable API economy
Graph API Strategies: CQRS for the sustainable API economyGraph API Strategies: CQRS for the sustainable API economy
Graph API Strategies: CQRS for the sustainable API economyGareth Jones
 
Gareth Jones AllAboutTheAPI KeyNote 2016
Gareth Jones AllAboutTheAPI KeyNote 2016Gareth Jones AllAboutTheAPI KeyNote 2016
Gareth Jones AllAboutTheAPI KeyNote 2016Gareth Jones
 
Running Away from JSON APIStrat 2015 Edition
Running Away from JSON APIStrat 2015 EditionRunning Away from JSON APIStrat 2015 Edition
Running Away from JSON APIStrat 2015 EditionGareth Jones
 
Running Away from JSON (or what I learned building the OneNote API)
Running Away from JSON (or what I learned building the OneNote API)Running Away from JSON (or what I learned building the OneNote API)
Running Away from JSON (or what I learned building the OneNote API)Gareth Jones
 

More from Gareth Jones (7)

Graph API Strategies: CQRS for the API Economy
Graph API Strategies: CQRS for the API EconomyGraph API Strategies: CQRS for the API Economy
Graph API Strategies: CQRS for the API Economy
 
Microsoft Education APIs
Microsoft Education APIsMicrosoft Education APIs
Microsoft Education APIs
 
Graph API Strategies: CQRS for the sustainable API economy
Graph API Strategies: CQRS for the sustainable API economyGraph API Strategies: CQRS for the sustainable API economy
Graph API Strategies: CQRS for the sustainable API economy
 
Gareth Jones AllAboutTheAPI KeyNote 2016
Gareth Jones AllAboutTheAPI KeyNote 2016Gareth Jones AllAboutTheAPI KeyNote 2016
Gareth Jones AllAboutTheAPI KeyNote 2016
 
Running Away from JSON APIStrat 2015 Edition
Running Away from JSON APIStrat 2015 EditionRunning Away from JSON APIStrat 2015 Edition
Running Away from JSON APIStrat 2015 Edition
 
Running Away from JSON (or what I learned building the OneNote API)
Running Away from JSON (or what I learned building the OneNote API)Running Away from JSON (or what I learned building the OneNote API)
Running Away from JSON (or what I learned building the OneNote API)
 
T4 scaffolding
T4 scaffoldingT4 scaffolding
T4 scaffolding
 

Recently uploaded

What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 

Recently uploaded (20)

What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 

Your API spec isn't worth the paper it's written on

Editor's Notes

  1. Afternoon, I hope you’ve had a great first day? My name is Gareth Jones, and I’ve been with Microsoft for over twenty years now, working on APIs for about the last six or so. I spent a couple of years as an architect for the Microsoft Graph, and more recently in our Education team focusing on building a platform on the Graph for app-builders targeting the classroom. I’d like to take half an hour this afternoon to talk about the limits of where we are with API descriptions when it comes to protecting our API consumers from unexpected change.
  2. So let’s imagine you’ve shipped an API to a set of customers. And things are running well. You’ve followed best practices, you feel in control. And then…
  3. …you deploy a new build you’re sending data that matches your spec – all your tests are green. But suddenly - tickets are flying – customers are on the phone – their apps are broken – your boss is NOT happy. What went wrong?
  4. Whether your API is public facing or internal, it’s essentially a consumer/producer contract. An API specification has many internal benefits to the producer in terms of engineering quality and predictability. But, like all contracts, the looser it is, the more room for interpretation there is. And I’m here to tell you folks, that even the best API descriptions out there today have quite a lot of wiggle room in them.
  5. So spec interpretation happens on both sides of the relationship, but the burden of pain is usually felt by the consumers, cos they don’t know what change to expect or what change they SHOULD have anticipated. But perhaps more importantly - people are busy and maybe even lazy. This doesn’t just apply to marmalade cats. So often consuming code will be written to handle just the data that is returned from an API call to the first test account that gets set up.
  6. We tend to focus on not making “breaking changes” in our APIs for some definition of breaking change and then anything we do outside of that definition, we say is the API consumer’s problem. But what were we trying to achieve with our API in the first place? Typically we were trying to enable some kind of business relationship. So who is the burden on in that relationship to ensure success?
  7. There’s a fundamental tension between optimizing for relationship continuity by not making any changes in an API, and being flexible and agile to meet the changing needs of a business. *You* have to design where you should land on that spectrum. And today’s API definition languages and tools might not go far enough out of the box.
  8. Of course, really, this isn’t a completely winnable game. Hyrum Wright made this great observation – that fundamentally implementations leak to become implicit interfaces. So let’s talk about some implementation leaks that most commonly cause problems.
  9. This is perhaps the simplest mistake consumers make is rushing to get an implementation shipped. A test account always had an empty list of Foos. The initial data only had one bank account per person. But the API is defined as an array. These initial manifestations in data translate into assumptions in code again and again and again. They’re wrong – but they happen all the time. Sometimes at the parsing layer – sometimes at the application code. It’s not just arrays - often a paged collection handler ignores the next link and only processes the first page.
  10. Other things that grow are the actual payload itself. Perhaps it’s the JSON running over some buffer – especially on IOT solutions. Or perhaps test images were all low-res samples but now in production you are returning high-res PNGs.. Can your stack cope? Here’s a real example from my friend Dave, the CEO of APIMetrics. A major retailer hit a problem when their stack on an Android app couldn’t deal with a JSON packet greater than 10mb. They hit that limit and … bang.
  11. Perf’s another frequent problem. Perhaps it’s obvious that if you slow down your API calls you will have unhappy customers, especially if they happen to have called directly from a mobile app. Think about your sequencing and flows and be super-sensitive to perf of calls that need to happen as predecessors to other calls. e.g. identity lookups. But sad to say, even improving your performance can break your customers, if they had undiscovered race conditions based on your previous typical latency.
  12. Auth is often the hardest thing to get right when onboarding to an API. And auth perhaps breaks more apps than anything else after they have shipped too. Changes to token default or mandatory lifetimes can make app flows that previously worked well be unusable. Apps may have gotten away without implementing OAUTH refresh tokens but now need them. Apps may have used an embedded browser redirect and now you require a separate tab for OAUTH. Perhaps *you* didn’t even make this change – perhaps it came from your IDP – be vigilant! You have a role-based access AuthZ system and you introduce a new role that users need to be added to.
  13. Flooding a consumer with 10x the number of webhooks they were previously handling isn’t likely to go well. Many webhooks handlers don’t implement decent throttling. Many webhooks handlers try to process the packet inline which isn’t a good practice. So also simply making the webhook packet more detailed can degrade them.
  14. Lots of APIs redirect for secondary calls to a subdomain outside the initial subdomain of the API. For example, redirecting to a CDN for image downloads. Callers can have unfortunate proxy configurations set up to only route to known domains and changing here can break the redirect. Don’t assume servers have the same freedom to follow all URLs that browser users have. Note this one can be mentioned in the OAS document but is rarely acted upon today.
  15. Lots of APIs have rich query parameters for describing paging, filtering, sorting, counting resources etc. You can describe these in your OAS, but not how they interact. It’s really easy to make sorting not work with filtering on some collection of resources and break a lot of customers.
  16. Provide a mock endpoint for your API for testing that has a really wide diversity of data delivered. Don’t live with one fixed set. Mix it up ideally. Push every limit and have slow calls, fast calls, big packets, small ones etc. Vary anything that can be varied and start the variance at different points on each session so callers don’t just repeat the same pattern. If your consumers can cope with such a mock, they will probably cope with your real life data.
  17. Anything which is optional or a preference can be disobeyed by the server under some circumstances. There might not be enough data to fill a ten-record page. So sometimes send back five two record pages instead to make sure the client can handle it. Especially if you have a pre-production mode.
  18. Unusual calling patterns? More calls? Less calls? More 400s? More 500s? Average packet size changes in or out?
  19. Consider extending your breaking changes policy to include some of the types of cases I’ve described. This isn’t for everyone, but if relationship continuity is your top priority then you might want to set this higher bar. Then you do whatever you would normally do with a breaking change. Version the API or format/delay/rollback the change etc.
  20. It has to actually WORK…. Here’s another example from APIMetrics. Here’s a UK bank’s API for locating ATMs After a deployment, it was only able to find ATMs in one city in the country. Perfectly compliant to the spec, but mostly no actual data. Don’t be afraid to take a heuristic measurement of content across your APIs. If it changes A LOT – be very suspicious.
  21. So I hope I’ve offered you some food for thought on a wider set of things that can and will break the consumers of your APIs, and just dipped into some strategies for mitigating the problems. I’d love to chat more about your experiences in this area at the reception this evening. Thanks very much.