SlideShare a Scribd company logo
YOUR API DESCRIPTION ISN’T WORTH $#%*&!
API STRATEGY AND PRACTICE 2018 NASHVILLE #APISTRAT
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
HOW CAN WE PROTECT
OURSELVES?
MODEL THE
REAL DATA
SHAPE
PROVIDE A
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 BREAKING CHANGES
This Photo by Unknown Author is licensed under CC BY-NC-ND
Oh, one last thing…
21
THANK YOU @garethj_msft #APISTRAT

More Related Content

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

Set Your Content Free! : Case Studies from Netflix and NPR
Set Your Content Free! : Case Studies from Netflix and NPRSet Your Content Free! : Case Studies from Netflix and NPR
Set Your Content Free! : Case Studies from Netflix and NPR
Daniel Jacobson
 
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
VMware Tanzu
 
Advanced networking on AWS | AWS Floor28
Advanced networking on AWS | AWS Floor28Advanced networking on AWS | AWS Floor28
Advanced networking on AWS | AWS Floor28
Amazon Web Services
 
Micrsoft Ignite Toronto - BRK3508 - 8 Cloud Design Patterns you ought to know
Micrsoft Ignite Toronto - BRK3508 - 8 Cloud Design Patterns you ought to knowMicrsoft Ignite Toronto - BRK3508 - 8 Cloud Design Patterns you ought to know
Micrsoft Ignite Toronto - BRK3508 - 8 Cloud Design Patterns you ought to know
Taswar Bhatti
 
DevOpsDays Baltimore 2018: A Definition of Done for DevSecOps - Gene Gotimer
DevOpsDays Baltimore 2018: A Definition of Done for DevSecOps - Gene GotimerDevOpsDays Baltimore 2018: A Definition of Done for DevSecOps - Gene Gotimer
DevOpsDays Baltimore 2018: A Definition of Done for DevSecOps - Gene Gotimer
DevOpsDays Baltimore
 
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
Gareth Jones
 
Top 10 Lessons Learned from the Netflix API - OSCON 2014
Top 10 Lessons Learned from the Netflix API - OSCON 2014Top 10 Lessons Learned from the Netflix API - OSCON 2014
Top 10 Lessons Learned from the Netflix API - OSCON 2014
Daniel Jacobson
 
The Beginner’s Guide To Spring Cloud
The Beginner’s Guide To Spring CloudThe Beginner’s Guide To Spring Cloud
The Beginner’s Guide To Spring Cloud
VMware Tanzu
 
AWS STARTUP DAY 2018 I If, how and when to adopt microservices
AWS STARTUP DAY 2018 I If, how and when to adopt microservicesAWS STARTUP DAY 2018 I If, how and when to adopt microservices
AWS STARTUP DAY 2018 I If, how and when to adopt microservices
AWS Germany
 
Spring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan BaxterSpring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan Baxter
VMware Tanzu
 
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
 
Oscon2014 Netflix API - Top 10 Lessons Learned
Oscon2014 Netflix API - Top 10 Lessons LearnedOscon2014 Netflix API - Top 10 Lessons Learned
Oscon2014 Netflix API - Top 10 Lessons Learned
Sangeeta Narayanan
 
How to: Avoid Mistakes at Scale
How to: Avoid Mistakes at ScaleHow to: Avoid Mistakes at Scale
How to: Avoid Mistakes at Scale
Amazon Web Services
 
Crystal clear service interfaces w/ Swagger/OpenAPI
Crystal clear service interfaces w/ Swagger/OpenAPICrystal clear service interfaces w/ Swagger/OpenAPI
Crystal clear service interfaces w/ Swagger/OpenAPI
Scott Triglia
 
Spring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan BaxterSpring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan Baxter
VMware Tanzu
 
Spyros Garyfallos [Microsoft] | Deploy, Monitor and Manage Your High-Value AI...
Spyros Garyfallos [Microsoft] | Deploy, Monitor and Manage Your High-Value AI...Spyros Garyfallos [Microsoft] | Deploy, Monitor and Manage Your High-Value AI...
Spyros Garyfallos [Microsoft] | Deploy, Monitor and Manage Your High-Value AI...
InfluxData
 
Presentation to ESPN about the Netflix API
Presentation to ESPN about the Netflix APIPresentation to ESPN about the Netflix API
Presentation to ESPN about the Netflix API
Daniel Jacobson
 
Serverless - State of the Union
Serverless - State of the UnionServerless - State of the Union
Serverless - State of the Union
Amazon Web Services
 
Introduction to Serverless on AWS
Introduction to Serverless on AWSIntroduction to Serverless on AWS
Introduction to Serverless on AWS
Amazon Web Services
 
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
VMware Tanzu
 

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

Set Your Content Free! : Case Studies from Netflix and NPR
Set Your Content Free! : Case Studies from Netflix and NPRSet Your Content Free! : Case Studies from Netflix and NPR
Set Your Content Free! : Case Studies from Netflix and NPR
 
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
 
Micrsoft Ignite Toronto - BRK3508 - 8 Cloud Design Patterns you ought to know
Micrsoft Ignite Toronto - BRK3508 - 8 Cloud Design Patterns you ought to knowMicrsoft Ignite Toronto - BRK3508 - 8 Cloud Design Patterns you ought to know
Micrsoft Ignite Toronto - BRK3508 - 8 Cloud Design Patterns you ought to know
 
DevOpsDays Baltimore 2018: A Definition of Done for DevSecOps - Gene Gotimer
DevOpsDays Baltimore 2018: A Definition of Done for DevSecOps - Gene GotimerDevOpsDays Baltimore 2018: A Definition of Done for DevSecOps - Gene Gotimer
DevOpsDays Baltimore 2018: A Definition of Done for DevSecOps - Gene Gotimer
 
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
 
Top 10 Lessons Learned from the Netflix API - OSCON 2014
Top 10 Lessons Learned from the Netflix API - OSCON 2014Top 10 Lessons Learned from the Netflix API - OSCON 2014
Top 10 Lessons Learned from the Netflix API - OSCON 2014
 
The Beginner’s Guide To Spring Cloud
The Beginner’s Guide To Spring CloudThe Beginner’s Guide To Spring Cloud
The Beginner’s Guide To Spring Cloud
 
AWS STARTUP DAY 2018 I If, how and when to adopt microservices
AWS STARTUP DAY 2018 I If, how and when to adopt microservicesAWS STARTUP DAY 2018 I If, how and when to adopt microservices
AWS STARTUP DAY 2018 I If, how and when to adopt microservices
 
Spring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan BaxterSpring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan Baxter
 
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...
 
Oscon2014 Netflix API - Top 10 Lessons Learned
Oscon2014 Netflix API - Top 10 Lessons LearnedOscon2014 Netflix API - Top 10 Lessons Learned
Oscon2014 Netflix API - Top 10 Lessons Learned
 
How to: Avoid Mistakes at Scale
How to: Avoid Mistakes at ScaleHow to: Avoid Mistakes at Scale
How to: Avoid Mistakes at Scale
 
Crystal clear service interfaces w/ Swagger/OpenAPI
Crystal clear service interfaces w/ Swagger/OpenAPICrystal clear service interfaces w/ Swagger/OpenAPI
Crystal clear service interfaces w/ Swagger/OpenAPI
 
Spring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan BaxterSpring Cloud Gateway - Ryan Baxter
Spring Cloud Gateway - Ryan Baxter
 
Spyros Garyfallos [Microsoft] | Deploy, Monitor and Manage Your High-Value AI...
Spyros Garyfallos [Microsoft] | Deploy, Monitor and Manage Your High-Value AI...Spyros Garyfallos [Microsoft] | Deploy, Monitor and Manage Your High-Value AI...
Spyros Garyfallos [Microsoft] | Deploy, Monitor and Manage Your High-Value AI...
 
Presentation to ESPN about the Netflix API
Presentation to ESPN about the Netflix APIPresentation to ESPN about the Netflix API
Presentation to ESPN about the Netflix API
 
Serverless - State of the Union
Serverless - State of the UnionServerless - State of the Union
Serverless - State of the Union
 
Introduction to Serverless on AWS
Introduction to Serverless on AWSIntroduction to Serverless on AWS
Introduction to Serverless on AWS
 
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
 

More from Gareth Jones

Microsoft Education APIs
Microsoft Education APIsMicrosoft Education APIs
Microsoft Education APIs
Gareth 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 economy
Gareth Jones
 
Gareth Jones AllAboutTheAPI KeyNote 2016
Gareth Jones AllAboutTheAPI KeyNote 2016Gareth Jones AllAboutTheAPI KeyNote 2016
Gareth Jones AllAboutTheAPI KeyNote 2016
Gareth 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 Edition
Gareth 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
 
T4 scaffolding
T4 scaffoldingT4 scaffolding
T4 scaffolding
Gareth Jones
 

More from Gareth Jones (6)

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

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
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
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
 
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
 
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
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 

Recently uploaded (20)

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...
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup 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
 
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
 
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
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 

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

Editor's Notes

  1. So 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. So 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 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 contract – 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!
  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. If you have lists that only have one element 95 percent of the time, and multiple elements is really an edge case then model it that way. Have a primary and a list of secondaries. You’ll give you consumers a much better chance of understanding the likely shape of data to expect.
  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 these types of cases. 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 after the session. Thanks very much.