SlideShare ist ein Scribd-Unternehmen logo
1 von 40
Downloaden Sie, um offline zu lesen
REST API DESIGN
END TO END
ANDREW JORDAN
PRODUCT MANAGER
@andrewkirk
andrew@akjordan.com
BIT.LY/2TSLMHD
DOWNLOAD PDF OF SLIDES HERE
ON TODAY’S AGENDA
END TO END REST API DESIGN
▸ API as a Business Model
▸ API Flavors
▸ Resource Design
▸ Testing and Feedback
▸ Resources for Further Reading
▸ Questions
API FIRST AS A BUSINESS MODEL
CLEAN AND SIMPLE
MESSY AND HARD
YOUR CLIENTS
YOUR API
YOUR SERVICES
API FIRST AS A BUSINESS MODEL
API FIRST AS A BUSINESS MODEL
▸ “Solve hard problems for which customers will pay”
▸ Founded in 2007, IPO in 2016 for 2.8 Billion
▸ Twilio Voice API
▸ 100+ million API requests a day
▸ $100+ million ARR business
▸ 99.999% Uptime
▸ 99.999% Request Success Rate
FLAVOR
DEFINE YOUR API
API FLAVOR
DEFINE YOUR API FLAVOR
▸ Choose HTTP methods that will be supported
▸ Choose the data interchange formats that will be accepted and returned
▸ Choose the format for dates, times that will be used
▸ Define what fields must always be returned for every response
API FLAVOR
DEFINE YOUR API FLAVOR
▸ The sum of these decisions dictate the flavor of your API, having a flavor makes
your API predictable to use across endpoints.
▸ At minimum these decisions need to be codified in a style guide and enforced
by people, at scale these need to be enforced with tests.
▸ In the absence of the time to do the above, copy the design decisions of a
good API.
ACCEPTS URLENCODED PARAMS RETURNS JSON FLAVORED API - “TWILIO FLAVOR”
REQUEST
curl -X POST https://api.thefamily.co/v1/talks 

-d ‘speaker_name=Andrew%20Jordan

-d ‘topic=End%20to%20End%20REST%20API%20Design’

-u ‘[Username]:[Password]’ 

-H 'content-type: application/x-www-form-urlencoded'
ACCEPTS URLENCODED PARAMS RETURNS JSON FLAVORED API - “TWILIO FLAVOR”
RESPONSE
201 Created

{

"guid": "7abb4f67-84dc-4ddb-9f33-8d0410e8bacd",

"date_created": "2017-06-17T11:17:32Z",

"date_updated": “2017-06-17T11:17:32Z",

“speaker_name": “Andrew Jordan”,

"topic": "End to End REST API Design",

"uri": "api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd.json",

"subresource_uris": {

“slides": "api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd/slides.json",

“videos": “api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd/
videos.json”

}
PREDICTABILITY
APIS ARE CONTRACTS, CONTRACTS PROVIDE
Written Spec Tech Spec Internal Testing External Testing GA
Written Spec Tech Spec Internal Testing External Testing GA
COSTS OF CHANGES INCREASE EXPONENTIALLY
RATE OF CHANGE SHOULD DROP OVER TIME
Written Spec Tech Spec Internal Testing External Testing GA
DESIGNING FOR PREDICTABILITY
UNDERSTAND YOUR CUSTOMER AND THEIRS
▸ API Design is “Meta” Product Management
▸ Your customer is the developer, but they have a customer too.
▸ What is the developer trying to build?
▸ What do the developer’s customers care about?
DESIGNING FOR PREDICTABILITY
WRITE A NARRATIVE FOR YOUR API
▸ Generate a document that details the problem, your customer interviews and
preliminary API design.
▸ This doc is for you as a PM and your engineering team to work out the rough details
of the API.
▸ This doc is the seed of your documentation
▸ Engineering should sign off this doc to flag any security or scaleability issues early
▸ A cleaned up version of this doc should be shared with customer as early as
possible for feedback
DESIGNING FOR PREDICTABILITY
DEFINE YOUR RESOURCES
▸ Every resource should be a noun, not a verb
▸ Choosing the correct level of abstraction is the art of API design
▸ Expose a minimal number of resource properties to start
▸ 80% or more of the time spent designing an API is spent taking the underlying
system and translating it into an object model that makes sense
▸ This underlying structure is most disruptive to change so spend the most time
getting it right
Written Spec Tech Spec Internal Testing External Testing GA
DESIGNING FOR PREDICTABILITY
TECHNICAL SPECIFICATION
▸ Document laying out object model, request flow, sequence diagrams
▸ If you are using Swagger or similar, this is where you start generating those
specifications
▸ Once technical specification is finalized feed any changes back into your
written narrative and validate changes with your customers.
Written Spec Tech Spec Internal Testing External Testing GA
DESIGNING FOR PREDICTABILITY
INTERNAL TESTING
▸ As a Product Manager building an API, you are your first customer, code
against your API early and often.
▸ Evaluate the usability of your API
▸ Generate code samples to use in your documentation
DESIGNING FOR PREDICTABILITY
INTERNAL TESTING
▸ Plan an internal hackathon to build against your API, treat your team like your
customers.
▸ Detail out several use cases that they should be able to build.
▸ Customer facing docs should be completed by this point, do not allow use of
internal docs.
▸ Improve customer facing docs as hackathon progresses.
▸ Keep shared google sheet for team to compile issues
Written Spec Tech Spec Internal Testing External Testing GA
DESIGNING FOR PREDICTABILITY
EXTERNAL TESTING
▸ Define release stages for your API and clearly communicate them, for instance
Preview, Beta, GA
▸ Preview APIs could have significant breaking changes, and may not be
totally operationalized
▸ Beta APIs may have small breaking changes should be production ready
▸ GA APIs had no breaking changes allowed without a version change, fully
operationalized with SLAs
DESIGNING FOR PREDICTABILITY
EXTERNAL TESTING
▸ Getting good customer feedback for an API is incredibly difficult
▸ Customers don't want to do throw away development work integrating an API
that will significantly change. Customers want to engage once API is nearly
final, without customer feedback API will never be final, goto 1.
▸ Hackathons + Amazon cards work pretty well, paid user testing, cultivate a few
customers that you take very good care of in exchange for their API feedback.
▸ The Beta stage is where you need to start selling your API, lag time to integrate
can be months, need to get your API on dev schedules in advance.
Written Spec Tech Spec Internal Testing External Testing GA
DESIGNING FOR PREDICTABILITY
GENERAL AVAILABILITY
▸ In the best case, having an API in GA should be very low overhead, predicable
▸ Documentation is a never-ending maintenance task, it can always be better
▸ Fix bugs (some of them), improve API performance
▸ Gather feedback for future enhancements
DESIGNING FOR PREDICTABILITY
IF YOU HAVE TO CHANGE, DO SO CAREFULLY
▸ Plan for and document your change policy, clearly communicate it to your
customers.
▸ Additive changes are usually safe
▸ Add new resources or new parameters to resources
▸ Add new subdomains for new products
DESIGNING FOR PREDICTABILITY
IF YOU HAVE TO CHANGE, DO SO CAREFULLY
▸ Versioning is a massive undertaking and has very large indirect costs.
▸ Will need to maintain parallel, docs, support FAQ everything, may double
your overhead to maintain API.
▸ Version with a non date identifier, https://api.thefamily.co/v1/talks to https://
api.thefamily.co/v2/talks
▸ “We’ll just migrate the last few customers off the old endpoint and shut it
down”
DESIGNING FOR PREDICTABILITY
▸ Predictability, consistency, and stability above all else.
▸ APIs are a contract, define a clear contact and honor it.
▸ Use GUIDs or UUIDs as resource identifiers
▸ All time in ISO 8601, in UTC, always
▸ Version APIs using version numbers, not dates
▸ Separate APIs should live on Subdomains
▸ Implement HATEOS
▸ Start small and make additive non-breaking changes
▸ Basic auth is probably fine, a scoped token scheme is better, think about how auth impacts developer experience.
▸ HTTPS only and always
▸ Customer feedback on APIs is hard to come by, plan on doing most of the lifting internally.
TAKEAWAYS
WRITING AND TALKS
▸ Amanda Folson, Your API is Bad and
you should Feel Bad
▸ Vinay Sahni: API Best Practices
▸ Gordon Wintrob's GET PUT POST
newsletter
▸ Kevin Burke on API Docs
▸ Kevin Burke on Client Libs
▸ And the other talks from API Mixtape
conference
API EXAMPLES
▸ Classic Flavor Twilio API
▸ Modern Flavor Twilio API
▸ Shippo API
▸ Stripe API
▸ 18F API Standards
▸ Microsoft API Guidelines
FURTHER CONTENT
TOOLING
▸ Swagger
▸ POSTman
QUESTIONS?
CUT SLIDES
REST
Request:
curl -G http://api.thefamily.co/v1/talks 

-u ‘23679019-81dd-4c24-83c5-2b625c71186c:e592b87e-3c5f-4fed-8d8f-a1edbc88c880' 
Response:
200 OK
{
   "uri": "api.thefamily.co/v1/talks.json",
   "first_page_uri": "api.thefamily.co/v1/talks?Page=0",
   "previous_page_uri": null,
   "next_page_uri": "api.thefamily.co/v1/talks?Page=1",
   "talks": [{
       "guid": "7abb4f67-84dc-4ddb-9f33-8d0410e8bacd",
       "date_created": "Friday, 30-Jun-17 11:17:32 UTC",
       "date_updated": "Friday, 30-Jun-17 11:17:32 UTC",
       "speaker_name": “Andrew Jordan”,
       "topic": "End to End REST API Design",
       "uri": "api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd.json",
       "subresource_uris": {
           "slides": "api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd/slides.json",
           "recordings": "api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd/slides/recordings.json"}},
{
       "guid": "a680011a-5286-4d10-96b8-a9cbcfbd1d08",
REST
Request:
curl -G http://api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd.json

-u ‘23679019-81dd-4c24-83c5-2b625c71186c:e592b87e-3c5f-4fed-8d8f-a1edbc88c880' 
Response:
200 OK
{
“guid": "7abb4f67-84dc-4ddb-9f33-8d0410e8bacd",

"date_created": "Friday, 30-Jun-17 11:17:32 UTC",

"date_updated": "Friday, 30-Jun-17 11:17:32 UTC",

“speaker_name": “Andrew Jordan”,

"topic": "End to End REST API Design",

"uri": "api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd.json",

"subresource_uris": {

"slides": "api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd/slides.json",

“recordings": “api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd/slides/recordings.json”
}
REST
Request:
curl -X POST http://api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd.json 

-d ‘topic=Front%20to%20Back%20REST%20API%20Design’

-u ‘23679019-81dd-4c24-83c5-2b625c71186c:e592b87e-3c5f-4fed-8d8f-a1edbc88c880' 

-H 'content-type: application/x-www-form-urlencoded'
Response:
201 Created
{
"guid": "7abb4f67-84dc-4ddb-9f33-8d0410e8bacd",

"date_created": "Friday, 30-Jun-17 11:17:32 UTC",

"date_updated": "Friday, 30-Jun-17 13:42:32 UTC",

“speaker_name": “Andrew Jordan”,

"topic": "Front to Back REST API Design",

"uri": "api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd.json",

"subresource_uris": {

"slides": "api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd/slides.json",

“recordings": “api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd/slides/recordings.json”
}
REST
Request:
curl -X DELETE http://api.thefamily.co/v1/talks/
7abb4f67-84dc-4ddb-9f33-8d0410e8bacd.json 

-u ‘23679019-81dd-4c24-83c5-2b625c71186c:e592b87e-3c5f-4fed-8d8f-
a1edbc88c880' 
Response:
204 No Content
API FLAVOR
WHAT IS REST
▸ REST (Representational State Transfer) is an architectural style which advocates
that web applications should use HTTP as it was originally envisioned. Lookups
should use GET requests. PUT, POST, and DELETE requests should be used for
creation, mutation, and deletion.
▸ Create, Read, Update, Delete (CRUD) maps to POST, GET, PUT/PATCH, DELETE

Weitere ähnliche Inhalte

Was ist angesagt?

AWS - Lambda Fundamentals
AWS - Lambda FundamentalsAWS - Lambda Fundamentals
AWS - Lambda FundamentalsPiyush Agrawal
 
Integration patterns in AEM 6
Integration patterns in AEM 6Integration patterns in AEM 6
Integration patterns in AEM 6Yuval Ararat
 
Understanding REST APIs in 5 Simple Steps
Understanding REST APIs in 5 Simple StepsUnderstanding REST APIs in 5 Simple Steps
Understanding REST APIs in 5 Simple StepsTessa Mero
 
AWS re:Invent 2016: How to Automate Policy Validation (SEC311)
AWS re:Invent 2016: How to Automate Policy Validation (SEC311)AWS re:Invent 2016: How to Automate Policy Validation (SEC311)
AWS re:Invent 2016: How to Automate Policy Validation (SEC311)Amazon Web Services
 
API Testing: The heart of functional testing" with Bj Rollison
API Testing: The heart of functional testing" with Bj RollisonAPI Testing: The heart of functional testing" with Bj Rollison
API Testing: The heart of functional testing" with Bj RollisonTEST Huddle
 
Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...
Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...
Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...Amazon Web Services
 
Architecting an Enterprise API Management Strategy
Architecting an Enterprise API Management StrategyArchitecting an Enterprise API Management Strategy
Architecting an Enterprise API Management StrategyWSO2
 
DataPower Restful API Security
DataPower Restful API SecurityDataPower Restful API Security
DataPower Restful API SecurityJagadish Vemugunta
 
Azure API Management
Azure API ManagementAzure API Management
Azure API ManagementDaniel Toomey
 
apidays Paris 2022 - Event-Driven API Management – why REST isn't enough, Ben...
apidays Paris 2022 - Event-Driven API Management – why REST isn't enough, Ben...apidays Paris 2022 - Event-Driven API Management – why REST isn't enough, Ben...
apidays Paris 2022 - Event-Driven API Management – why REST isn't enough, Ben...apidays
 
APIsecure 2023 - API orchestration: to build resilient applications, Cherish ...
APIsecure 2023 - API orchestration: to build resilient applications, Cherish ...APIsecure 2023 - API orchestration: to build resilient applications, Cherish ...
APIsecure 2023 - API orchestration: to build resilient applications, Cherish ...apidays
 
Reasons To Automate API Testing Process
Reasons To Automate API Testing ProcessReasons To Automate API Testing Process
Reasons To Automate API Testing ProcessQASource
 
API Testing with Frisby and Mocha
API Testing with Frisby and MochaAPI Testing with Frisby and Mocha
API Testing with Frisby and MochaLyudmila Anisimova
 

Was ist angesagt? (20)

02 api gateway
02 api gateway02 api gateway
02 api gateway
 
AWS - Lambda Fundamentals
AWS - Lambda FundamentalsAWS - Lambda Fundamentals
AWS - Lambda Fundamentals
 
API for Beginners
API for BeginnersAPI for Beginners
API for Beginners
 
Integration patterns in AEM 6
Integration patterns in AEM 6Integration patterns in AEM 6
Integration patterns in AEM 6
 
Guide to an API-first Strategy
Guide to an API-first StrategyGuide to an API-first Strategy
Guide to an API-first Strategy
 
Understanding REST APIs in 5 Simple Steps
Understanding REST APIs in 5 Simple StepsUnderstanding REST APIs in 5 Simple Steps
Understanding REST APIs in 5 Simple Steps
 
AWS re:Invent 2016: How to Automate Policy Validation (SEC311)
AWS re:Invent 2016: How to Automate Policy Validation (SEC311)AWS re:Invent 2016: How to Automate Policy Validation (SEC311)
AWS re:Invent 2016: How to Automate Policy Validation (SEC311)
 
API Testing: The heart of functional testing" with Bj Rollison
API Testing: The heart of functional testing" with Bj RollisonAPI Testing: The heart of functional testing" with Bj Rollison
API Testing: The heart of functional testing" with Bj Rollison
 
Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...
Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...
Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...
 
Belajar Postman test runner
Belajar Postman test runnerBelajar Postman test runner
Belajar Postman test runner
 
Architecting an Enterprise API Management Strategy
Architecting an Enterprise API Management StrategyArchitecting an Enterprise API Management Strategy
Architecting an Enterprise API Management Strategy
 
AWS API Gateway
AWS API GatewayAWS API Gateway
AWS API Gateway
 
DataPower Restful API Security
DataPower Restful API SecurityDataPower Restful API Security
DataPower Restful API Security
 
Azure API Management
Azure API ManagementAzure API Management
Azure API Management
 
apidays Paris 2022 - Event-Driven API Management – why REST isn't enough, Ben...
apidays Paris 2022 - Event-Driven API Management – why REST isn't enough, Ben...apidays Paris 2022 - Event-Driven API Management – why REST isn't enough, Ben...
apidays Paris 2022 - Event-Driven API Management – why REST isn't enough, Ben...
 
APIsecure 2023 - API orchestration: to build resilient applications, Cherish ...
APIsecure 2023 - API orchestration: to build resilient applications, Cherish ...APIsecure 2023 - API orchestration: to build resilient applications, Cherish ...
APIsecure 2023 - API orchestration: to build resilient applications, Cherish ...
 
Reasons To Automate API Testing Process
Reasons To Automate API Testing ProcessReasons To Automate API Testing Process
Reasons To Automate API Testing Process
 
API Testing with Frisby and Mocha
API Testing with Frisby and MochaAPI Testing with Frisby and Mocha
API Testing with Frisby and Mocha
 
Spring Cloud Gateway
Spring Cloud GatewaySpring Cloud Gateway
Spring Cloud Gateway
 
OpenID Connect Explained
OpenID Connect ExplainedOpenID Connect Explained
OpenID Connect Explained
 

Andere mochten auch

Programmable Video Fundamentals
Programmable Video FundamentalsProgrammable Video Fundamentals
Programmable Video FundamentalsMark Roberts
 
What Can You Do With Twilio
What Can You Do With TwilioWhat Can You Do With Twilio
What Can You Do With TwilioTwilio Inc
 
【最新版誘導用】クラウドコミュニケーションAPI Twilio&sakura.io体験ハンズオン
【最新版誘導用】クラウドコミュニケーションAPI Twilio&sakura.io体験ハンズオン【最新版誘導用】クラウドコミュニケーションAPI Twilio&sakura.io体験ハンズオン
【最新版誘導用】クラウドコミュニケーションAPI Twilio&sakura.io体験ハンズオンさくらインターネット株式会社
 
Watson DevCon 2016 - Do More with Less Code: Enriched Communications with Twi...
Watson DevCon 2016 - Do More with Less Code: Enriched Communications with Twi...Watson DevCon 2016 - Do More with Less Code: Enriched Communications with Twi...
Watson DevCon 2016 - Do More with Less Code: Enriched Communications with Twi...IBM Watson
 
Data Analytics in Digital Transformation
Data Analytics in Digital TransformationData Analytics in Digital Transformation
Data Analytics in Digital TransformationMukund Babbar
 
Twilio+Node-REDで作る自動モーニングコール
Twilio+Node-REDで作る自動モーニングコールTwilio+Node-REDで作る自動モーニングコール
Twilio+Node-REDで作る自動モーニングコールrina0521
 
Building Blocks for Next Generation Contact Centers
Building Blocks for Next Generation Contact CentersBuilding Blocks for Next Generation Contact Centers
Building Blocks for Next Generation Contact CentersTwilio Inc
 

Andere mochten auch (7)

Programmable Video Fundamentals
Programmable Video FundamentalsProgrammable Video Fundamentals
Programmable Video Fundamentals
 
What Can You Do With Twilio
What Can You Do With TwilioWhat Can You Do With Twilio
What Can You Do With Twilio
 
【最新版誘導用】クラウドコミュニケーションAPI Twilio&sakura.io体験ハンズオン
【最新版誘導用】クラウドコミュニケーションAPI Twilio&sakura.io体験ハンズオン【最新版誘導用】クラウドコミュニケーションAPI Twilio&sakura.io体験ハンズオン
【最新版誘導用】クラウドコミュニケーションAPI Twilio&sakura.io体験ハンズオン
 
Watson DevCon 2016 - Do More with Less Code: Enriched Communications with Twi...
Watson DevCon 2016 - Do More with Less Code: Enriched Communications with Twi...Watson DevCon 2016 - Do More with Less Code: Enriched Communications with Twi...
Watson DevCon 2016 - Do More with Less Code: Enriched Communications with Twi...
 
Data Analytics in Digital Transformation
Data Analytics in Digital TransformationData Analytics in Digital Transformation
Data Analytics in Digital Transformation
 
Twilio+Node-REDで作る自動モーニングコール
Twilio+Node-REDで作る自動モーニングコールTwilio+Node-REDで作る自動モーニングコール
Twilio+Node-REDで作る自動モーニングコール
 
Building Blocks for Next Generation Contact Centers
Building Blocks for Next Generation Contact CentersBuilding Blocks for Next Generation Contact Centers
Building Blocks for Next Generation Contact Centers
 

Ähnlich wie "API Design: From User Need to Finished Spec" by Andrew Jordan, ex-Product @Twilio

apidays LIVE New York 2021 - Docs Driven API Development by Rahul Dighe, Paypal
apidays LIVE New York 2021 - Docs Driven API Development by Rahul Dighe, Paypalapidays LIVE New York 2021 - Docs Driven API Development by Rahul Dighe, Paypal
apidays LIVE New York 2021 - Docs Driven API Development by Rahul Dighe, Paypalapidays
 
Flipping the script: How to take the first step towards internal developer pl...
Flipping the script: How to take the first step towards internal developer pl...Flipping the script: How to take the first step towards internal developer pl...
Flipping the script: How to take the first step towards internal developer pl...Abigail Bangser
 
Continuous API Strategies for Integrated Platforms
 Continuous API Strategies for Integrated Platforms Continuous API Strategies for Integrated Platforms
Continuous API Strategies for Integrated PlatformsBill Doerrfeld
 
Continuous Delivery Pipeline in the Cloud – How to Achieve Continous Everything
Continuous Delivery Pipeline in the Cloud – How to Achieve Continous Everything Continuous Delivery Pipeline in the Cloud – How to Achieve Continous Everything
Continuous Delivery Pipeline in the Cloud – How to Achieve Continous Everything CA Technologies
 
DataHero / Eventbrite - API Best Practices
DataHero / Eventbrite - API Best PracticesDataHero / Eventbrite - API Best Practices
DataHero / Eventbrite - API Best PracticesJeff Zabel
 
apidays New York 2023 - Hypermedia as the engine for Customer Success, Michae...
apidays New York 2023 - Hypermedia as the engine for Customer Success, Michae...apidays New York 2023 - Hypermedia as the engine for Customer Success, Michae...
apidays New York 2023 - Hypermedia as the engine for Customer Success, Michae...apidays
 
Building a great internal platform starts with the API
Building a great internal platform starts with the API Building a great internal platform starts with the API
Building a great internal platform starts with the API Abigail Bangser
 
Practical guide to building public APIs
Practical guide to building public APIsPractical guide to building public APIs
Practical guide to building public APIsReda Hmeid MBCS
 
Making Your Customer Experience Great Before You Hit Production - AppSphere16
Making Your Customer Experience Great Before You Hit Production - AppSphere16Making Your Customer Experience Great Before You Hit Production - AppSphere16
Making Your Customer Experience Great Before You Hit Production - AppSphere16AppDynamics
 
API product strategy - Intro to Internal, External APIs and Developer Platforms
API product strategy - Intro to Internal, External APIs and Developer PlatformsAPI product strategy - Intro to Internal, External APIs and Developer Platforms
API product strategy - Intro to Internal, External APIs and Developer PlatformsRajath D M
 
ENT206 Product Development in the Cloud
ENT206 Product Development in the CloudENT206 Product Development in the Cloud
ENT206 Product Development in the CloudAmazon Web Services
 
Spec-first API Design for Speed and Safety
Spec-first API Design for Speed and SafetySpec-first API Design for Speed and Safety
Spec-first API Design for Speed and SafetyAtlassian
 
Everybody loves Swagger (Massimo Crippa @ Integration Monday)
Everybody loves Swagger (Massimo Crippa @ Integration Monday)Everybody loves Swagger (Massimo Crippa @ Integration Monday)
Everybody loves Swagger (Massimo Crippa @ Integration Monday)Codit
 
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...apidays
 
API Management For Building Software Applications Powerpoint Presentation Slides
API Management For Building Software Applications Powerpoint Presentation SlidesAPI Management For Building Software Applications Powerpoint Presentation Slides
API Management For Building Software Applications Powerpoint Presentation SlidesSlideTeam
 
Streamlining API with Swagger.io
Streamlining API with Swagger.ioStreamlining API with Swagger.io
Streamlining API with Swagger.ioVictor Augusteo
 
Everybody loves Swagger
Everybody loves SwaggerEverybody loves Swagger
Everybody loves SwaggerBizTalk360
 
Building the Eventbrite API Ecosystem
Building the Eventbrite API EcosystemBuilding the Eventbrite API Ecosystem
Building the Eventbrite API EcosystemMitch Colleran
 
Collaborative Contract Driven Development
Collaborative Contract Driven DevelopmentCollaborative Contract Driven Development
Collaborative Contract Driven DevelopmentBilly Korando
 

Ähnlich wie "API Design: From User Need to Finished Spec" by Andrew Jordan, ex-Product @Twilio (20)

API Best Practices
API Best PracticesAPI Best Practices
API Best Practices
 
apidays LIVE New York 2021 - Docs Driven API Development by Rahul Dighe, Paypal
apidays LIVE New York 2021 - Docs Driven API Development by Rahul Dighe, Paypalapidays LIVE New York 2021 - Docs Driven API Development by Rahul Dighe, Paypal
apidays LIVE New York 2021 - Docs Driven API Development by Rahul Dighe, Paypal
 
Flipping the script: How to take the first step towards internal developer pl...
Flipping the script: How to take the first step towards internal developer pl...Flipping the script: How to take the first step towards internal developer pl...
Flipping the script: How to take the first step towards internal developer pl...
 
Continuous API Strategies for Integrated Platforms
 Continuous API Strategies for Integrated Platforms Continuous API Strategies for Integrated Platforms
Continuous API Strategies for Integrated Platforms
 
Continuous Delivery Pipeline in the Cloud – How to Achieve Continous Everything
Continuous Delivery Pipeline in the Cloud – How to Achieve Continous Everything Continuous Delivery Pipeline in the Cloud – How to Achieve Continous Everything
Continuous Delivery Pipeline in the Cloud – How to Achieve Continous Everything
 
DataHero / Eventbrite - API Best Practices
DataHero / Eventbrite - API Best PracticesDataHero / Eventbrite - API Best Practices
DataHero / Eventbrite - API Best Practices
 
apidays New York 2023 - Hypermedia as the engine for Customer Success, Michae...
apidays New York 2023 - Hypermedia as the engine for Customer Success, Michae...apidays New York 2023 - Hypermedia as the engine for Customer Success, Michae...
apidays New York 2023 - Hypermedia as the engine for Customer Success, Michae...
 
Building a great internal platform starts with the API
Building a great internal platform starts with the API Building a great internal platform starts with the API
Building a great internal platform starts with the API
 
Practical guide to building public APIs
Practical guide to building public APIsPractical guide to building public APIs
Practical guide to building public APIs
 
Making Your Customer Experience Great Before You Hit Production - AppSphere16
Making Your Customer Experience Great Before You Hit Production - AppSphere16Making Your Customer Experience Great Before You Hit Production - AppSphere16
Making Your Customer Experience Great Before You Hit Production - AppSphere16
 
API product strategy - Intro to Internal, External APIs and Developer Platforms
API product strategy - Intro to Internal, External APIs and Developer PlatformsAPI product strategy - Intro to Internal, External APIs and Developer Platforms
API product strategy - Intro to Internal, External APIs and Developer Platforms
 
ENT206 Product Development in the Cloud
ENT206 Product Development in the CloudENT206 Product Development in the Cloud
ENT206 Product Development in the Cloud
 
Spec-first API Design for Speed and Safety
Spec-first API Design for Speed and SafetySpec-first API Design for Speed and Safety
Spec-first API Design for Speed and Safety
 
Everybody loves Swagger (Massimo Crippa @ Integration Monday)
Everybody loves Swagger (Massimo Crippa @ Integration Monday)Everybody loves Swagger (Massimo Crippa @ Integration Monday)
Everybody loves Swagger (Massimo Crippa @ Integration Monday)
 
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
apidays LIVE Paris 2021 - Lessons from the API Stewardship Journey in Azure b...
 
API Management For Building Software Applications Powerpoint Presentation Slides
API Management For Building Software Applications Powerpoint Presentation SlidesAPI Management For Building Software Applications Powerpoint Presentation Slides
API Management For Building Software Applications Powerpoint Presentation Slides
 
Streamlining API with Swagger.io
Streamlining API with Swagger.ioStreamlining API with Swagger.io
Streamlining API with Swagger.io
 
Everybody loves Swagger
Everybody loves SwaggerEverybody loves Swagger
Everybody loves Swagger
 
Building the Eventbrite API Ecosystem
Building the Eventbrite API EcosystemBuilding the Eventbrite API Ecosystem
Building the Eventbrite API Ecosystem
 
Collaborative Contract Driven Development
Collaborative Contract Driven DevelopmentCollaborative Contract Driven Development
Collaborative Contract Driven Development
 

Mehr von TheFamily

Building a design culture from day one
Building a design culture from day oneBuilding a design culture from day one
Building a design culture from day oneTheFamily
 
Individual Contributors vs Managers
Individual Contributors vs ManagersIndividual Contributors vs Managers
Individual Contributors vs ManagersTheFamily
 
Build the decentralized team you ever dreamed of
Build the decentralized team you ever dreamed ofBuild the decentralized team you ever dreamed of
Build the decentralized team you ever dreamed ofTheFamily
 
CEOs best practices to win time back & focus on what matters
CEOs best practices to win time back & focus on what mattersCEOs best practices to win time back & focus on what matters
CEOs best practices to win time back & focus on what mattersTheFamily
 
Managing fully remote teams
Managing fully remote teamsManaging fully remote teams
Managing fully remote teamsTheFamily
 
State of European Tech by Atomico
State of European Tech by AtomicoState of European Tech by Atomico
State of European Tech by AtomicoTheFamily
 
Building a real estate startup
Building a real estate startupBuilding a real estate startup
Building a real estate startupTheFamily
 
A VC view on Enterprise Sales
A VC view on Enterprise SalesA VC view on Enterprise Sales
A VC view on Enterprise SalesTheFamily
 
Find your style and create emotions
Find your style and create emotionsFind your style and create emotions
Find your style and create emotionsTheFamily
 
From product to ecosystem
From product to ecosystemFrom product to ecosystem
From product to ecosystemTheFamily
 
Demystifying the product black box
Demystifying the product black boxDemystifying the product black box
Demystifying the product black boxTheFamily
 
The secrets to create bank brand love
The secrets to create bank brand loveThe secrets to create bank brand love
The secrets to create bank brand loveTheFamily
 
Building an insurance startup with Alan, Luko, Coverd & Balderton
Building an insurance startup with Alan, Luko, Coverd & BaldertonBuilding an insurance startup with Alan, Luko, Coverd & Balderton
Building an insurance startup with Alan, Luko, Coverd & BaldertonTheFamily
 
Mixing Product & Tech by Jean Lebrument, CTO & CPO at Brigad
Mixing Product & Tech by Jean Lebrument, CTO & CPO at BrigadMixing Product & Tech by Jean Lebrument, CTO & CPO at Brigad
Mixing Product & Tech by Jean Lebrument, CTO & CPO at BrigadTheFamily
 
A new breed of CTO - Philippe Vimard, CTO & COO at Doctolib
A new breed of CTO - Philippe Vimard, CTO & COO at DoctolibA new breed of CTO - Philippe Vimard, CTO & COO at Doctolib
A new breed of CTO - Philippe Vimard, CTO & COO at DoctolibTheFamily
 
Building a logistics startup  with Trusk, Totem & SpaceFill
Building a logistics startup  with Trusk, Totem & SpaceFillBuilding a logistics startup  with Trusk, Totem & SpaceFill
Building a logistics startup  with Trusk, Totem & SpaceFillTheFamily
 
Building an accounting startup with Fred de la compta, Acasi & Chaintrust
Building an accounting startup with Fred de la compta, Acasi & ChaintrustBuilding an accounting startup with Fred de la compta, Acasi & Chaintrust
Building an accounting startup with Fred de la compta, Acasi & ChaintrustTheFamily
 
Scale your tech team from 0 to Series A
Scale your tech team from 0 to Series A Scale your tech team from 0 to Series A
Scale your tech team from 0 to Series A TheFamily
 
Onboarding developers and setting them up for success
Onboarding developers and setting them up for successOnboarding developers and setting them up for success
Onboarding developers and setting them up for successTheFamily
 
Apprendre à penser comme un journaliste
Apprendre à penser comme un journalisteApprendre à penser comme un journaliste
Apprendre à penser comme un journalisteTheFamily
 

Mehr von TheFamily (20)

Building a design culture from day one
Building a design culture from day oneBuilding a design culture from day one
Building a design culture from day one
 
Individual Contributors vs Managers
Individual Contributors vs ManagersIndividual Contributors vs Managers
Individual Contributors vs Managers
 
Build the decentralized team you ever dreamed of
Build the decentralized team you ever dreamed ofBuild the decentralized team you ever dreamed of
Build the decentralized team you ever dreamed of
 
CEOs best practices to win time back & focus on what matters
CEOs best practices to win time back & focus on what mattersCEOs best practices to win time back & focus on what matters
CEOs best practices to win time back & focus on what matters
 
Managing fully remote teams
Managing fully remote teamsManaging fully remote teams
Managing fully remote teams
 
State of European Tech by Atomico
State of European Tech by AtomicoState of European Tech by Atomico
State of European Tech by Atomico
 
Building a real estate startup
Building a real estate startupBuilding a real estate startup
Building a real estate startup
 
A VC view on Enterprise Sales
A VC view on Enterprise SalesA VC view on Enterprise Sales
A VC view on Enterprise Sales
 
Find your style and create emotions
Find your style and create emotionsFind your style and create emotions
Find your style and create emotions
 
From product to ecosystem
From product to ecosystemFrom product to ecosystem
From product to ecosystem
 
Demystifying the product black box
Demystifying the product black boxDemystifying the product black box
Demystifying the product black box
 
The secrets to create bank brand love
The secrets to create bank brand loveThe secrets to create bank brand love
The secrets to create bank brand love
 
Building an insurance startup with Alan, Luko, Coverd & Balderton
Building an insurance startup with Alan, Luko, Coverd & BaldertonBuilding an insurance startup with Alan, Luko, Coverd & Balderton
Building an insurance startup with Alan, Luko, Coverd & Balderton
 
Mixing Product & Tech by Jean Lebrument, CTO & CPO at Brigad
Mixing Product & Tech by Jean Lebrument, CTO & CPO at BrigadMixing Product & Tech by Jean Lebrument, CTO & CPO at Brigad
Mixing Product & Tech by Jean Lebrument, CTO & CPO at Brigad
 
A new breed of CTO - Philippe Vimard, CTO & COO at Doctolib
A new breed of CTO - Philippe Vimard, CTO & COO at DoctolibA new breed of CTO - Philippe Vimard, CTO & COO at Doctolib
A new breed of CTO - Philippe Vimard, CTO & COO at Doctolib
 
Building a logistics startup  with Trusk, Totem & SpaceFill
Building a logistics startup  with Trusk, Totem & SpaceFillBuilding a logistics startup  with Trusk, Totem & SpaceFill
Building a logistics startup  with Trusk, Totem & SpaceFill
 
Building an accounting startup with Fred de la compta, Acasi & Chaintrust
Building an accounting startup with Fred de la compta, Acasi & ChaintrustBuilding an accounting startup with Fred de la compta, Acasi & Chaintrust
Building an accounting startup with Fred de la compta, Acasi & Chaintrust
 
Scale your tech team from 0 to Series A
Scale your tech team from 0 to Series A Scale your tech team from 0 to Series A
Scale your tech team from 0 to Series A
 
Onboarding developers and setting them up for success
Onboarding developers and setting them up for successOnboarding developers and setting them up for success
Onboarding developers and setting them up for success
 
Apprendre à penser comme un journaliste
Apprendre à penser comme un journalisteApprendre à penser comme un journaliste
Apprendre à penser comme un journaliste
 

Kürzlich hochgeladen

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Kürzlich hochgeladen (20)

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

"API Design: From User Need to Finished Spec" by Andrew Jordan, ex-Product @Twilio

  • 4. ON TODAY’S AGENDA END TO END REST API DESIGN ▸ API as a Business Model ▸ API Flavors ▸ Resource Design ▸ Testing and Feedback ▸ Resources for Further Reading ▸ Questions
  • 5. API FIRST AS A BUSINESS MODEL CLEAN AND SIMPLE MESSY AND HARD YOUR CLIENTS YOUR API YOUR SERVICES
  • 6. API FIRST AS A BUSINESS MODEL
  • 7. API FIRST AS A BUSINESS MODEL ▸ “Solve hard problems for which customers will pay” ▸ Founded in 2007, IPO in 2016 for 2.8 Billion ▸ Twilio Voice API ▸ 100+ million API requests a day ▸ $100+ million ARR business ▸ 99.999% Uptime ▸ 99.999% Request Success Rate
  • 9. API FLAVOR DEFINE YOUR API FLAVOR ▸ Choose HTTP methods that will be supported ▸ Choose the data interchange formats that will be accepted and returned ▸ Choose the format for dates, times that will be used ▸ Define what fields must always be returned for every response
  • 10. API FLAVOR DEFINE YOUR API FLAVOR ▸ The sum of these decisions dictate the flavor of your API, having a flavor makes your API predictable to use across endpoints. ▸ At minimum these decisions need to be codified in a style guide and enforced by people, at scale these need to be enforced with tests. ▸ In the absence of the time to do the above, copy the design decisions of a good API.
  • 11. ACCEPTS URLENCODED PARAMS RETURNS JSON FLAVORED API - “TWILIO FLAVOR” REQUEST curl -X POST https://api.thefamily.co/v1/talks 
 -d ‘speaker_name=Andrew%20Jordan
 -d ‘topic=End%20to%20End%20REST%20API%20Design’
 -u ‘[Username]:[Password]’ 
 -H 'content-type: application/x-www-form-urlencoded'
  • 12. ACCEPTS URLENCODED PARAMS RETURNS JSON FLAVORED API - “TWILIO FLAVOR” RESPONSE 201 Created
 {
 "guid": "7abb4f67-84dc-4ddb-9f33-8d0410e8bacd",
 "date_created": "2017-06-17T11:17:32Z",
 "date_updated": “2017-06-17T11:17:32Z",
 “speaker_name": “Andrew Jordan”,
 "topic": "End to End REST API Design",
 "uri": "api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd.json",
 "subresource_uris": {
 “slides": "api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd/slides.json",
 “videos": “api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd/ videos.json”
 }
  • 14. Written Spec Tech Spec Internal Testing External Testing GA
  • 15. Written Spec Tech Spec Internal Testing External Testing GA COSTS OF CHANGES INCREASE EXPONENTIALLY RATE OF CHANGE SHOULD DROP OVER TIME
  • 16. Written Spec Tech Spec Internal Testing External Testing GA
  • 17. DESIGNING FOR PREDICTABILITY UNDERSTAND YOUR CUSTOMER AND THEIRS ▸ API Design is “Meta” Product Management ▸ Your customer is the developer, but they have a customer too. ▸ What is the developer trying to build? ▸ What do the developer’s customers care about?
  • 18. DESIGNING FOR PREDICTABILITY WRITE A NARRATIVE FOR YOUR API ▸ Generate a document that details the problem, your customer interviews and preliminary API design. ▸ This doc is for you as a PM and your engineering team to work out the rough details of the API. ▸ This doc is the seed of your documentation ▸ Engineering should sign off this doc to flag any security or scaleability issues early ▸ A cleaned up version of this doc should be shared with customer as early as possible for feedback
  • 19. DESIGNING FOR PREDICTABILITY DEFINE YOUR RESOURCES ▸ Every resource should be a noun, not a verb ▸ Choosing the correct level of abstraction is the art of API design ▸ Expose a minimal number of resource properties to start ▸ 80% or more of the time spent designing an API is spent taking the underlying system and translating it into an object model that makes sense ▸ This underlying structure is most disruptive to change so spend the most time getting it right
  • 20. Written Spec Tech Spec Internal Testing External Testing GA
  • 21. DESIGNING FOR PREDICTABILITY TECHNICAL SPECIFICATION ▸ Document laying out object model, request flow, sequence diagrams ▸ If you are using Swagger or similar, this is where you start generating those specifications ▸ Once technical specification is finalized feed any changes back into your written narrative and validate changes with your customers.
  • 22. Written Spec Tech Spec Internal Testing External Testing GA
  • 23. DESIGNING FOR PREDICTABILITY INTERNAL TESTING ▸ As a Product Manager building an API, you are your first customer, code against your API early and often. ▸ Evaluate the usability of your API ▸ Generate code samples to use in your documentation
  • 24. DESIGNING FOR PREDICTABILITY INTERNAL TESTING ▸ Plan an internal hackathon to build against your API, treat your team like your customers. ▸ Detail out several use cases that they should be able to build. ▸ Customer facing docs should be completed by this point, do not allow use of internal docs. ▸ Improve customer facing docs as hackathon progresses. ▸ Keep shared google sheet for team to compile issues
  • 25. Written Spec Tech Spec Internal Testing External Testing GA
  • 26. DESIGNING FOR PREDICTABILITY EXTERNAL TESTING ▸ Define release stages for your API and clearly communicate them, for instance Preview, Beta, GA ▸ Preview APIs could have significant breaking changes, and may not be totally operationalized ▸ Beta APIs may have small breaking changes should be production ready ▸ GA APIs had no breaking changes allowed without a version change, fully operationalized with SLAs
  • 27. DESIGNING FOR PREDICTABILITY EXTERNAL TESTING ▸ Getting good customer feedback for an API is incredibly difficult ▸ Customers don't want to do throw away development work integrating an API that will significantly change. Customers want to engage once API is nearly final, without customer feedback API will never be final, goto 1. ▸ Hackathons + Amazon cards work pretty well, paid user testing, cultivate a few customers that you take very good care of in exchange for their API feedback. ▸ The Beta stage is where you need to start selling your API, lag time to integrate can be months, need to get your API on dev schedules in advance.
  • 28. Written Spec Tech Spec Internal Testing External Testing GA
  • 29. DESIGNING FOR PREDICTABILITY GENERAL AVAILABILITY ▸ In the best case, having an API in GA should be very low overhead, predicable ▸ Documentation is a never-ending maintenance task, it can always be better ▸ Fix bugs (some of them), improve API performance ▸ Gather feedback for future enhancements
  • 30. DESIGNING FOR PREDICTABILITY IF YOU HAVE TO CHANGE, DO SO CAREFULLY ▸ Plan for and document your change policy, clearly communicate it to your customers. ▸ Additive changes are usually safe ▸ Add new resources or new parameters to resources ▸ Add new subdomains for new products
  • 31. DESIGNING FOR PREDICTABILITY IF YOU HAVE TO CHANGE, DO SO CAREFULLY ▸ Versioning is a massive undertaking and has very large indirect costs. ▸ Will need to maintain parallel, docs, support FAQ everything, may double your overhead to maintain API. ▸ Version with a non date identifier, https://api.thefamily.co/v1/talks to https:// api.thefamily.co/v2/talks ▸ “We’ll just migrate the last few customers off the old endpoint and shut it down”
  • 32. DESIGNING FOR PREDICTABILITY ▸ Predictability, consistency, and stability above all else. ▸ APIs are a contract, define a clear contact and honor it. ▸ Use GUIDs or UUIDs as resource identifiers ▸ All time in ISO 8601, in UTC, always ▸ Version APIs using version numbers, not dates ▸ Separate APIs should live on Subdomains ▸ Implement HATEOS ▸ Start small and make additive non-breaking changes ▸ Basic auth is probably fine, a scoped token scheme is better, think about how auth impacts developer experience. ▸ HTTPS only and always ▸ Customer feedback on APIs is hard to come by, plan on doing most of the lifting internally. TAKEAWAYS
  • 33. WRITING AND TALKS ▸ Amanda Folson, Your API is Bad and you should Feel Bad ▸ Vinay Sahni: API Best Practices ▸ Gordon Wintrob's GET PUT POST newsletter ▸ Kevin Burke on API Docs ▸ Kevin Burke on Client Libs ▸ And the other talks from API Mixtape conference API EXAMPLES ▸ Classic Flavor Twilio API ▸ Modern Flavor Twilio API ▸ Shippo API ▸ Stripe API ▸ 18F API Standards ▸ Microsoft API Guidelines FURTHER CONTENT TOOLING ▸ Swagger ▸ POSTman
  • 36. REST Request: curl -G http://api.thefamily.co/v1/talks 
 -u ‘23679019-81dd-4c24-83c5-2b625c71186c:e592b87e-3c5f-4fed-8d8f-a1edbc88c880' Response: 200 OK {    "uri": "api.thefamily.co/v1/talks.json",    "first_page_uri": "api.thefamily.co/v1/talks?Page=0",    "previous_page_uri": null,    "next_page_uri": "api.thefamily.co/v1/talks?Page=1",    "talks": [{        "guid": "7abb4f67-84dc-4ddb-9f33-8d0410e8bacd",        "date_created": "Friday, 30-Jun-17 11:17:32 UTC",        "date_updated": "Friday, 30-Jun-17 11:17:32 UTC",        "speaker_name": “Andrew Jordan”,        "topic": "End to End REST API Design",        "uri": "api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd.json",        "subresource_uris": {            "slides": "api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd/slides.json",            "recordings": "api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd/slides/recordings.json"}}, {        "guid": "a680011a-5286-4d10-96b8-a9cbcfbd1d08",
  • 37. REST Request: curl -G http://api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd.json
 -u ‘23679019-81dd-4c24-83c5-2b625c71186c:e592b87e-3c5f-4fed-8d8f-a1edbc88c880' Response: 200 OK { “guid": "7abb4f67-84dc-4ddb-9f33-8d0410e8bacd",
 "date_created": "Friday, 30-Jun-17 11:17:32 UTC",
 "date_updated": "Friday, 30-Jun-17 11:17:32 UTC",
 “speaker_name": “Andrew Jordan”,
 "topic": "End to End REST API Design",
 "uri": "api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd.json",
 "subresource_uris": {
 "slides": "api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd/slides.json",
 “recordings": “api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd/slides/recordings.json” }
  • 38. REST Request: curl -X POST http://api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd.json 
 -d ‘topic=Front%20to%20Back%20REST%20API%20Design’
 -u ‘23679019-81dd-4c24-83c5-2b625c71186c:e592b87e-3c5f-4fed-8d8f-a1edbc88c880' 
 -H 'content-type: application/x-www-form-urlencoded' Response: 201 Created { "guid": "7abb4f67-84dc-4ddb-9f33-8d0410e8bacd",
 "date_created": "Friday, 30-Jun-17 11:17:32 UTC",
 "date_updated": "Friday, 30-Jun-17 13:42:32 UTC",
 “speaker_name": “Andrew Jordan”,
 "topic": "Front to Back REST API Design",
 "uri": "api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd.json",
 "subresource_uris": {
 "slides": "api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd/slides.json",
 “recordings": “api.thefamily.co/v1/talks/7abb4f67-84dc-4ddb-9f33-8d0410e8bacd/slides/recordings.json” }
  • 39. REST Request: curl -X DELETE http://api.thefamily.co/v1/talks/ 7abb4f67-84dc-4ddb-9f33-8d0410e8bacd.json 
 -u ‘23679019-81dd-4c24-83c5-2b625c71186c:e592b87e-3c5f-4fed-8d8f- a1edbc88c880' Response: 204 No Content
  • 40. API FLAVOR WHAT IS REST ▸ REST (Representational State Transfer) is an architectural style which advocates that web applications should use HTTP as it was originally envisioned. Lookups should use GET requests. PUT, POST, and DELETE requests should be used for creation, mutation, and deletion. ▸ Create, Read, Update, Delete (CRUD) maps to POST, GET, PUT/PATCH, DELETE