SlideShare a Scribd company logo
1 of 62
Download to read offline
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Design and Build
Great APIs
@mamund
Mike Amundsen
youtube.com/mamund
copyright © 2020 by amundsen.com, inc. -- all rights reserved
2
copyright © 2020 by amundsen.com, inc. -- all rights reserved
"From design to code to test to
deployment, unlock hidden business value
and release stable and scalable web APIs
that meet customer needs and solve
important business problems in a
consistent and reliable manner."
-- Pragmatic Publishers
g.mamund.com/GreatWebAPIs
copyright © 2020 by amundsen.com, inc. -- all rights reserved
The Big Picture
● Foundations
● Design
● Build
● Release
● And Then...
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Foundations
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Foundations
● API First
● HTTP, Web, & REST
copyright © 2020 by amundsen.com, inc. -- all rights reserved
What is API-First?
"API-first design means identifying
and/or defining key actors and
personas, determining what those
actors and personas expect to be able
to do with APIs"
-- Kas Thomas, 2009
copyright © 2020 by amundsen.com, inc. -- all rights reserved
● API First
○ APIs Solve Business Problems
○ Designing APIs for People
○ Design First
● HTTP, Web, & REST
Foundations
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Foundations
● API First
● HTTP, Web, & REST
○ HTTP is a protocol
■ URLs, Methods, Messages
○ Web is a common practice
■ SoC, links & forms
○ REST is a style
■ properties, requirements, constraints
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Foundations
● API First
○ Solving business problems for people
● HTTP, Web, & REST
○ Protocol, practice, style
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Designing APIs
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Designing APIs
● Model
● Design
● Describe
copyright © 2020 by amundsen.com, inc. -- all rights reserved
API Design
● Model
○ Norman's Lifecycle
○ There are no straight lines
○ The API Story
● Design
● Describe
copyright © 2020 by amundsen.com, inc. -- all rights reserved
copyright © 2020 by amundsen.com, inc. -- all rights reserved
API Design
● Model
● Design
○ Design Thinking
○ Jobs-to-be-Done
○ The API Diagram
● Describe
copyright © 2020 by amundsen.com, inc. -- all rights reserved
copyright © 2020 by amundsen.com, inc. -- all rights reserved
API Design
● Model
● Design
● Describe
○ Technology agnostic
○ Details on properties & actions
○ ALPS (2014)
○ https://github.com/mamund/2020-04-unified-api-design
copyright © 2020 by amundsen.com, inc. -- all rights reserved
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Designing APIs
● Model
○ API Story
● Design
○ API Diagram
● Describe
○ API Description
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Building APIs
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Building APIs
● Sketching
● Prototyping
● Building
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Building APIs
● Sketching
○ Frank Gehry (via Ronnie Mitra)
○ Experiment w/ possibilities
○ Apiary Blueprint (APIB)
○ Sketches are meant to be
thrown away
● Prototyping
● Building
copyright © 2020 by amundsen.com, inc. -- all rights reserved
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Building APIs
● Sketching
● Prototyping
○ Borglum's Prototypes
○ Explore the details
○ OpenAPI (OAS)
○ Prototypes are made to be
tested
● Building
copyright © 2020 by amundsen.com, inc. -- all rights reserved
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Building APIs
● Sketching
● Prototyping
● Building
○ Repeatable process
○ Convert prototype/design
into code
○ DARRT
■ Data, Actions, Resources,
Representations, Transitions
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Building APIs : DARRT
A simple, repeatable process for publishing API interfaces
● Data
● Actions
● Resources
● Representations
● Transitions
27
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Building APIs : DARRT : Data
● The state properties to pass in messages
○ properties, requireds, enums, defaults
28
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Building APIs : DARRT : Data
● The state properties to pass in messages
○ properties, requireds, enums, defaults
29
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Building APIs : DARRT : Data
● The state properties to pass in messages
○ properties, requireds, enums, defaults
30
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Building APIs : DARRT : Data
● The state properties to pass in messages
○ properties, requireds, enums, defs
31
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Building APIs : DARRT : Actions
● The actual internal operations for the interface
○ approvePayroll, updateCustomer, setStatus
32
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Building APIs : DARRT : Resources
● The public HTTP resources to access the operations
33
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Building APIs : DARRT : Representations
● Produce the requested format for resource responses
34
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Building APIs : DARRT : Transitions
● The list of public actions as expressed in HTTP
35
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Building APIs
● Sketching
○ Experiment, throw away
○ APIB
● Prototyping
○ Explore, test
○ OpenAPI
● Building
○ Translate, repeat
○ NodeJS/DARRT
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Releasing APIs
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Releasing APIs
● Testing
● Security
● Deployment
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Releasing APIs
● Testing
○ Testing Interface, not Code
○ Happy-path (200) & sad-path (400)
○ Simple Request Tests (SRTs)
○ Postman/Newman for BDD
● Security
● Deployment
copyright © 2020 by amundsen.com, inc. -- all rights reserved
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Releasing APIs
● Testing
● Security
○ Encryption, Identity, Access Control
○ M2M Authorization w/ JWTs
○ Auth0 as provider
● Deployment
copyright © 2020 by amundsen.com, inc. -- all rights reserved
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Releasing APIs
● Testing
● Security
● Deployment
○ Integration, delivery, deployment
○ Automation improves safety
○ Heroku via git push
copyright © 2020 by amundsen.com, inc. -- all rights reserved
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Releasing APIs
● Testing
○ Test interface and behavior
○ Postman/Newman
● Security
○ APIs use client_credentials
w/ JWTs
○ Auth0 as a provider
● Deployment
○ Automate for safety
○ Heroku git push
copyright © 2020 by amundsen.com, inc. -- all rights reserved
And Then...
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Modifying APIs
● Update Principles
● Design Updates
● Test Updates
● Release Updates
● API Shutdown
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Modifying APIs
● Update Principles
○ First, do no harm
○ Fork your API
○ Know when to say "No"
● Design Updates
● Test Updates
● Release Updates
● API Shutdown
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Modifying APIs
● Update Principles
● Design Updates
○ Take nothing away
○ Don't redefine
○ Additions are optional
● Test Updates
● Release Updates
● API Shutdown
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Modifying APIs
● Update Principles
● Design Updates
● Test Updates
○ Use all existing tests
○ Add new tests for each release
● Release Updates
● API Shutdown
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Modifying APIs
● Update Principles
● Design Updates
● Test Updates
● Release Updates
○ Reversibility/Re-entry First
○ Side-by-Side Releases
○ Overwriting Releases
● API Shutdown
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Modifying APIs
● Update Principles
● Design Updates
● Test Updates
● Release Updates
● API Shutdown
○ Place Code in Public Domain
○ Open Source the Interface
○ Recoverable Data
○ Mark the API 410 Gone (w/ a pointer)
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Modifying APIs
● Update Principles
○ First, Do no harm
● Design Updates
○ No breaking changes
● Test Updates
○ Use all the old tests
● Release Updates
○ Favor Side-by-Side Releases
● API Shutdown
○ Responsible shutdowns
copyright © 2020 by amundsen.com, inc. -- all rights reserved
So....
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Foundations
● API First
○ Solving business problems for people
● HTTP, Web, & REST
○ Protocol, practice, style
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Designing APIs
● Model
○ API Story
● Design
○ API Diagram
● Describe
○ API Description
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Building APIs
● Sketching
○ Explore, throw away
○ APIB
● Prototyping
○ Details, test
○ OpenAPI
● Building
○ Translate, repeat
○ NodeJS/DARRT
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Releasing APIs
● Testing
○ Test interface and behavior
○ Postman/Newman
● Security
○ APIs use client_credentials
w/ JWTs
○ Auth0 as a provider
● Deployment
○ Automate for safety
○ Heroku git push
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Modifying APIs
● Update Principles
○ First, Do no harm
● Design Updates
○ No breaking changes
● Test Updates
○ Use all the old tests
● Release Updates
○ Favor Side-by-Side Releases
● API Shutdown
○ Responsible shutdowns
copyright © 2020 by amundsen.com, inc. -- all rights reserved
And, don't forget ...
copyright © 2020 by amundsen.com, inc. -- all rights reserved
What is API-First?
"API-first design means identifying
and/or defining key actors and
personas, determining what those
actors and personas expect to be able
to do with APIs"
-- Kas Thomas, 2009
copyright © 2020 by amundsen.com, inc. -- all rights reserved
Design and Build
Great APIs
@mamund
Mike Amundsen
youtube.com/mamund
http://g.mamund.com/2020-interface

More Related Content

Similar to INTERFACE by apidays_Building Great Web APIs by Mike Amundsen

CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_SingaporeCI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
Amazon Web Services
 

Similar to INTERFACE by apidays_Building Great Web APIs by Mike Amundsen (20)

Business Success with Core Web Vitals
Business Success with Core Web VitalsBusiness Success with Core Web Vitals
Business Success with Core Web Vitals
 
Anatomy of a Successful IoT Project, ft. Pentair (IOT202) - AWS re:Invent 2018
Anatomy of a Successful IoT Project, ft. Pentair (IOT202) - AWS re:Invent 2018Anatomy of a Successful IoT Project, ft. Pentair (IOT202) - AWS re:Invent 2018
Anatomy of a Successful IoT Project, ft. Pentair (IOT202) - AWS re:Invent 2018
 
ETA Padtron Sdn.Bhd. - Enterprise Programming - Tools
ETA Padtron Sdn.Bhd. - Enterprise Programming - ToolsETA Padtron Sdn.Bhd. - Enterprise Programming - Tools
ETA Padtron Sdn.Bhd. - Enterprise Programming - Tools
 
Building Microservices with the Twelve Factor App Pattern on AWS
Building Microservices with the Twelve Factor App Pattern on AWSBuilding Microservices with the Twelve Factor App Pattern on AWS
Building Microservices with the Twelve Factor App Pattern on AWS
 
Power Up Your Productivity with ER/Studio 18.0
Power Up Your Productivity with ER/Studio 18.0Power Up Your Productivity with ER/Studio 18.0
Power Up Your Productivity with ER/Studio 18.0
 
Empowering Your Users: Maximizing the Content Management Experience
Empowering Your Users: Maximizing the Content Management ExperienceEmpowering Your Users: Maximizing the Content Management Experience
Empowering Your Users: Maximizing the Content Management Experience
 
Forge - DevCon 2016: Integrate & extend your construction ecosystem with BI...
  Forge - DevCon 2016: Integrate & extend your construction ecosystem with BI...  Forge - DevCon 2016: Integrate & extend your construction ecosystem with BI...
Forge - DevCon 2016: Integrate & extend your construction ecosystem with BI...
 
Enterprise Kafka: Kafka as a Service
Enterprise Kafka: Kafka as a ServiceEnterprise Kafka: Kafka as a Service
Enterprise Kafka: Kafka as a Service
 
Websites go Serverless | AWS Floor28
Websites go Serverless | AWS Floor28Websites go Serverless | AWS Floor28
Websites go Serverless | AWS Floor28
 
Websites go Serverless - Floor28
Websites go Serverless - Floor28Websites go Serverless - Floor28
Websites go Serverless - Floor28
 
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_SingaporeCI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
 
AWS DevDay Cologne - CI/CD for modern applications
AWS DevDay Cologne - CI/CD for modern applicationsAWS DevDay Cologne - CI/CD for modern applications
AWS DevDay Cologne - CI/CD for modern applications
 
apidays LIVE New York - API Lifecycle Management - Avoiding Breaches By Secur...
apidays LIVE New York - API Lifecycle Management - Avoiding Breaches By Secur...apidays LIVE New York - API Lifecycle Management - Avoiding Breaches By Secur...
apidays LIVE New York - API Lifecycle Management - Avoiding Breaches By Secur...
 
re:Invent 2018 Recap Digital Advertising (Japanese)
re:Invent 2018 Recap Digital Advertising (Japanese)re:Invent 2018 Recap Digital Advertising (Japanese)
re:Invent 2018 Recap Digital Advertising (Japanese)
 
apidays LIVE Paris - Avoid Building a Microservices Death Star by Przemek Kulik
apidays LIVE Paris - Avoid Building a Microservices Death Star by Przemek Kulikapidays LIVE Paris - Avoid Building a Microservices Death Star by Przemek Kulik
apidays LIVE Paris - Avoid Building a Microservices Death Star by Przemek Kulik
 
CI/CD with AWS Developer Tools and Fargate
CI/CD with AWS Developer Tools and FargateCI/CD with AWS Developer Tools and Fargate
CI/CD with AWS Developer Tools and Fargate
 
Implementing API-led Cloud-native apps on OCI
Implementing API-led Cloud-native apps on OCIImplementing API-led Cloud-native apps on OCI
Implementing API-led Cloud-native apps on OCI
 
Implementing API-led Cloud-native apps on OCI
Implementing API-led Cloud-native apps on OCIImplementing API-led Cloud-native apps on OCI
Implementing API-led Cloud-native apps on OCI
 
Let’s Talk About the Ipro Platform
Let’s Talk About the Ipro PlatformLet’s Talk About the Ipro Platform
Let’s Talk About the Ipro Platform
 
Automate Everything!
Automate Everything!Automate Everything!
Automate Everything!
 

More from apidays

More from apidays (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - The secrets to Graph success, by Leah Hurwich Adler, ...
Apidays New York 2024 - The secrets to Graph success, by Leah Hurwich Adler, ...Apidays New York 2024 - The secrets to Graph success, by Leah Hurwich Adler, ...
Apidays New York 2024 - The secrets to Graph success, by Leah Hurwich Adler, ...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - API Discovery - From Crawl to Run by Rob Dickinson, G...
Apidays New York 2024 - API Discovery - From Crawl to Run by Rob Dickinson, G...Apidays New York 2024 - API Discovery - From Crawl to Run by Rob Dickinson, G...
Apidays New York 2024 - API Discovery - From Crawl to Run by Rob Dickinson, G...
 
Apidays Singapore 2024 - Building with the Planet in Mind by Sandeep Joshi, M...
Apidays Singapore 2024 - Building with the Planet in Mind by Sandeep Joshi, M...Apidays Singapore 2024 - Building with the Planet in Mind by Sandeep Joshi, M...
Apidays Singapore 2024 - Building with the Planet in Mind by Sandeep Joshi, M...
 
Apidays Singapore 2024 - Connecting Cross Border Commerce with Payments by Gu...
Apidays Singapore 2024 - Connecting Cross Border Commerce with Payments by Gu...Apidays Singapore 2024 - Connecting Cross Border Commerce with Payments by Gu...
Apidays Singapore 2024 - Connecting Cross Border Commerce with Payments by Gu...
 
Apidays Singapore 2024 - Privacy Enhancing Technologies for AI by Mark Choo, ...
Apidays Singapore 2024 - Privacy Enhancing Technologies for AI by Mark Choo, ...Apidays Singapore 2024 - Privacy Enhancing Technologies for AI by Mark Choo, ...
Apidays Singapore 2024 - Privacy Enhancing Technologies for AI by Mark Choo, ...
 
Apidays Singapore 2024 - Blending AI and IoT for Smarter Health by Matthew Ch...
Apidays Singapore 2024 - Blending AI and IoT for Smarter Health by Matthew Ch...Apidays Singapore 2024 - Blending AI and IoT for Smarter Health by Matthew Ch...
Apidays Singapore 2024 - Blending AI and IoT for Smarter Health by Matthew Ch...
 
Apidays Singapore 2024 - OpenTelemetry for API Monitoring by Danielle Kayumbi...
Apidays Singapore 2024 - OpenTelemetry for API Monitoring by Danielle Kayumbi...Apidays Singapore 2024 - OpenTelemetry for API Monitoring by Danielle Kayumbi...
Apidays Singapore 2024 - OpenTelemetry for API Monitoring by Danielle Kayumbi...
 
Apidays Singapore 2024 - Connecting Product and Engineering Teams with Testin...
Apidays Singapore 2024 - Connecting Product and Engineering Teams with Testin...Apidays Singapore 2024 - Connecting Product and Engineering Teams with Testin...
Apidays Singapore 2024 - Connecting Product and Engineering Teams with Testin...
 
Apidays Singapore 2024 - The Growing Carbon Footprint of Digitalization and H...
Apidays Singapore 2024 - The Growing Carbon Footprint of Digitalization and H...Apidays Singapore 2024 - The Growing Carbon Footprint of Digitalization and H...
Apidays Singapore 2024 - The Growing Carbon Footprint of Digitalization and H...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays Singapore 2024 - API Monitoring x SRE by Ryan Ashneil and Eugene Wong...
Apidays Singapore 2024 - API Monitoring x SRE by Ryan Ashneil and Eugene Wong...Apidays Singapore 2024 - API Monitoring x SRE by Ryan Ashneil and Eugene Wong...
Apidays Singapore 2024 - API Monitoring x SRE by Ryan Ashneil and Eugene Wong...
 
Apidays Singapore 2024 - A nuanced approach on AI costs and benefits for the ...
Apidays Singapore 2024 - A nuanced approach on AI costs and benefits for the ...Apidays Singapore 2024 - A nuanced approach on AI costs and benefits for the ...
Apidays Singapore 2024 - A nuanced approach on AI costs and benefits for the ...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Apidays Singapore 2024 - How APIs drive business at BNP Paribas by Quy-Doan D...
Apidays Singapore 2024 - How APIs drive business at BNP Paribas by Quy-Doan D...Apidays Singapore 2024 - How APIs drive business at BNP Paribas by Quy-Doan D...
Apidays Singapore 2024 - How APIs drive business at BNP Paribas by Quy-Doan D...
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

INTERFACE by apidays_Building Great Web APIs by Mike Amundsen

  • 1. copyright © 2020 by amundsen.com, inc. -- all rights reserved Design and Build Great APIs @mamund Mike Amundsen youtube.com/mamund
  • 2. copyright © 2020 by amundsen.com, inc. -- all rights reserved 2
  • 3. copyright © 2020 by amundsen.com, inc. -- all rights reserved "From design to code to test to deployment, unlock hidden business value and release stable and scalable web APIs that meet customer needs and solve important business problems in a consistent and reliable manner." -- Pragmatic Publishers g.mamund.com/GreatWebAPIs
  • 4. copyright © 2020 by amundsen.com, inc. -- all rights reserved The Big Picture ● Foundations ● Design ● Build ● Release ● And Then...
  • 5. copyright © 2020 by amundsen.com, inc. -- all rights reserved Foundations
  • 6. copyright © 2020 by amundsen.com, inc. -- all rights reserved Foundations ● API First ● HTTP, Web, & REST
  • 7. copyright © 2020 by amundsen.com, inc. -- all rights reserved What is API-First? "API-first design means identifying and/or defining key actors and personas, determining what those actors and personas expect to be able to do with APIs" -- Kas Thomas, 2009
  • 8. copyright © 2020 by amundsen.com, inc. -- all rights reserved ● API First ○ APIs Solve Business Problems ○ Designing APIs for People ○ Design First ● HTTP, Web, & REST Foundations
  • 9. copyright © 2020 by amundsen.com, inc. -- all rights reserved Foundations ● API First ● HTTP, Web, & REST ○ HTTP is a protocol ■ URLs, Methods, Messages ○ Web is a common practice ■ SoC, links & forms ○ REST is a style ■ properties, requirements, constraints
  • 10. copyright © 2020 by amundsen.com, inc. -- all rights reserved Foundations ● API First ○ Solving business problems for people ● HTTP, Web, & REST ○ Protocol, practice, style
  • 11. copyright © 2020 by amundsen.com, inc. -- all rights reserved Designing APIs
  • 12. copyright © 2020 by amundsen.com, inc. -- all rights reserved Designing APIs ● Model ● Design ● Describe
  • 13. copyright © 2020 by amundsen.com, inc. -- all rights reserved API Design ● Model ○ Norman's Lifecycle ○ There are no straight lines ○ The API Story ● Design ● Describe
  • 14. copyright © 2020 by amundsen.com, inc. -- all rights reserved
  • 15. copyright © 2020 by amundsen.com, inc. -- all rights reserved API Design ● Model ● Design ○ Design Thinking ○ Jobs-to-be-Done ○ The API Diagram ● Describe
  • 16. copyright © 2020 by amundsen.com, inc. -- all rights reserved
  • 17. copyright © 2020 by amundsen.com, inc. -- all rights reserved API Design ● Model ● Design ● Describe ○ Technology agnostic ○ Details on properties & actions ○ ALPS (2014) ○ https://github.com/mamund/2020-04-unified-api-design
  • 18. copyright © 2020 by amundsen.com, inc. -- all rights reserved
  • 19. copyright © 2020 by amundsen.com, inc. -- all rights reserved Designing APIs ● Model ○ API Story ● Design ○ API Diagram ● Describe ○ API Description
  • 20. copyright © 2020 by amundsen.com, inc. -- all rights reserved Building APIs
  • 21. copyright © 2020 by amundsen.com, inc. -- all rights reserved Building APIs ● Sketching ● Prototyping ● Building
  • 22. copyright © 2020 by amundsen.com, inc. -- all rights reserved Building APIs ● Sketching ○ Frank Gehry (via Ronnie Mitra) ○ Experiment w/ possibilities ○ Apiary Blueprint (APIB) ○ Sketches are meant to be thrown away ● Prototyping ● Building
  • 23. copyright © 2020 by amundsen.com, inc. -- all rights reserved
  • 24. copyright © 2020 by amundsen.com, inc. -- all rights reserved Building APIs ● Sketching ● Prototyping ○ Borglum's Prototypes ○ Explore the details ○ OpenAPI (OAS) ○ Prototypes are made to be tested ● Building
  • 25. copyright © 2020 by amundsen.com, inc. -- all rights reserved
  • 26. copyright © 2020 by amundsen.com, inc. -- all rights reserved Building APIs ● Sketching ● Prototyping ● Building ○ Repeatable process ○ Convert prototype/design into code ○ DARRT ■ Data, Actions, Resources, Representations, Transitions
  • 27. copyright © 2020 by amundsen.com, inc. -- all rights reserved Building APIs : DARRT A simple, repeatable process for publishing API interfaces ● Data ● Actions ● Resources ● Representations ● Transitions 27
  • 28. copyright © 2020 by amundsen.com, inc. -- all rights reserved Building APIs : DARRT : Data ● The state properties to pass in messages ○ properties, requireds, enums, defaults 28
  • 29. copyright © 2020 by amundsen.com, inc. -- all rights reserved Building APIs : DARRT : Data ● The state properties to pass in messages ○ properties, requireds, enums, defaults 29
  • 30. copyright © 2020 by amundsen.com, inc. -- all rights reserved Building APIs : DARRT : Data ● The state properties to pass in messages ○ properties, requireds, enums, defaults 30
  • 31. copyright © 2020 by amundsen.com, inc. -- all rights reserved Building APIs : DARRT : Data ● The state properties to pass in messages ○ properties, requireds, enums, defs 31
  • 32. copyright © 2020 by amundsen.com, inc. -- all rights reserved Building APIs : DARRT : Actions ● The actual internal operations for the interface ○ approvePayroll, updateCustomer, setStatus 32
  • 33. copyright © 2020 by amundsen.com, inc. -- all rights reserved Building APIs : DARRT : Resources ● The public HTTP resources to access the operations 33
  • 34. copyright © 2020 by amundsen.com, inc. -- all rights reserved Building APIs : DARRT : Representations ● Produce the requested format for resource responses 34
  • 35. copyright © 2020 by amundsen.com, inc. -- all rights reserved Building APIs : DARRT : Transitions ● The list of public actions as expressed in HTTP 35
  • 36. copyright © 2020 by amundsen.com, inc. -- all rights reserved Building APIs ● Sketching ○ Experiment, throw away ○ APIB ● Prototyping ○ Explore, test ○ OpenAPI ● Building ○ Translate, repeat ○ NodeJS/DARRT
  • 37. copyright © 2020 by amundsen.com, inc. -- all rights reserved Releasing APIs
  • 38. copyright © 2020 by amundsen.com, inc. -- all rights reserved Releasing APIs ● Testing ● Security ● Deployment
  • 39. copyright © 2020 by amundsen.com, inc. -- all rights reserved Releasing APIs ● Testing ○ Testing Interface, not Code ○ Happy-path (200) & sad-path (400) ○ Simple Request Tests (SRTs) ○ Postman/Newman for BDD ● Security ● Deployment
  • 40. copyright © 2020 by amundsen.com, inc. -- all rights reserved
  • 41. copyright © 2020 by amundsen.com, inc. -- all rights reserved Releasing APIs ● Testing ● Security ○ Encryption, Identity, Access Control ○ M2M Authorization w/ JWTs ○ Auth0 as provider ● Deployment
  • 42. copyright © 2020 by amundsen.com, inc. -- all rights reserved
  • 43. copyright © 2020 by amundsen.com, inc. -- all rights reserved Releasing APIs ● Testing ● Security ● Deployment ○ Integration, delivery, deployment ○ Automation improves safety ○ Heroku via git push
  • 44. copyright © 2020 by amundsen.com, inc. -- all rights reserved
  • 45. copyright © 2020 by amundsen.com, inc. -- all rights reserved Releasing APIs ● Testing ○ Test interface and behavior ○ Postman/Newman ● Security ○ APIs use client_credentials w/ JWTs ○ Auth0 as a provider ● Deployment ○ Automate for safety ○ Heroku git push
  • 46. copyright © 2020 by amundsen.com, inc. -- all rights reserved And Then...
  • 47. copyright © 2020 by amundsen.com, inc. -- all rights reserved Modifying APIs ● Update Principles ● Design Updates ● Test Updates ● Release Updates ● API Shutdown
  • 48. copyright © 2020 by amundsen.com, inc. -- all rights reserved Modifying APIs ● Update Principles ○ First, do no harm ○ Fork your API ○ Know when to say "No" ● Design Updates ● Test Updates ● Release Updates ● API Shutdown
  • 49. copyright © 2020 by amundsen.com, inc. -- all rights reserved Modifying APIs ● Update Principles ● Design Updates ○ Take nothing away ○ Don't redefine ○ Additions are optional ● Test Updates ● Release Updates ● API Shutdown
  • 50. copyright © 2020 by amundsen.com, inc. -- all rights reserved Modifying APIs ● Update Principles ● Design Updates ● Test Updates ○ Use all existing tests ○ Add new tests for each release ● Release Updates ● API Shutdown
  • 51. copyright © 2020 by amundsen.com, inc. -- all rights reserved Modifying APIs ● Update Principles ● Design Updates ● Test Updates ● Release Updates ○ Reversibility/Re-entry First ○ Side-by-Side Releases ○ Overwriting Releases ● API Shutdown
  • 52. copyright © 2020 by amundsen.com, inc. -- all rights reserved Modifying APIs ● Update Principles ● Design Updates ● Test Updates ● Release Updates ● API Shutdown ○ Place Code in Public Domain ○ Open Source the Interface ○ Recoverable Data ○ Mark the API 410 Gone (w/ a pointer)
  • 53. copyright © 2020 by amundsen.com, inc. -- all rights reserved Modifying APIs ● Update Principles ○ First, Do no harm ● Design Updates ○ No breaking changes ● Test Updates ○ Use all the old tests ● Release Updates ○ Favor Side-by-Side Releases ● API Shutdown ○ Responsible shutdowns
  • 54. copyright © 2020 by amundsen.com, inc. -- all rights reserved So....
  • 55. copyright © 2020 by amundsen.com, inc. -- all rights reserved Foundations ● API First ○ Solving business problems for people ● HTTP, Web, & REST ○ Protocol, practice, style
  • 56. copyright © 2020 by amundsen.com, inc. -- all rights reserved Designing APIs ● Model ○ API Story ● Design ○ API Diagram ● Describe ○ API Description
  • 57. copyright © 2020 by amundsen.com, inc. -- all rights reserved Building APIs ● Sketching ○ Explore, throw away ○ APIB ● Prototyping ○ Details, test ○ OpenAPI ● Building ○ Translate, repeat ○ NodeJS/DARRT
  • 58. copyright © 2020 by amundsen.com, inc. -- all rights reserved Releasing APIs ● Testing ○ Test interface and behavior ○ Postman/Newman ● Security ○ APIs use client_credentials w/ JWTs ○ Auth0 as a provider ● Deployment ○ Automate for safety ○ Heroku git push
  • 59. copyright © 2020 by amundsen.com, inc. -- all rights reserved Modifying APIs ● Update Principles ○ First, Do no harm ● Design Updates ○ No breaking changes ● Test Updates ○ Use all the old tests ● Release Updates ○ Favor Side-by-Side Releases ● API Shutdown ○ Responsible shutdowns
  • 60. copyright © 2020 by amundsen.com, inc. -- all rights reserved And, don't forget ...
  • 61. copyright © 2020 by amundsen.com, inc. -- all rights reserved What is API-First? "API-first design means identifying and/or defining key actors and personas, determining what those actors and personas expect to be able to do with APIs" -- Kas Thomas, 2009
  • 62. copyright © 2020 by amundsen.com, inc. -- all rights reserved Design and Build Great APIs @mamund Mike Amundsen youtube.com/mamund http://g.mamund.com/2020-interface