SlideShare une entreprise Scribd logo
1  sur  50
Télécharger pour lire hors ligne
5 Keys to API Design
Daniel Feist @dfeist
Principal Architect, MuleSoft

@MuleSoft
Me?
Me?
Me?
Me?
APIs:
The Cat's Meow
The New Enterprise

All contents Copyright © 2013, MuleSoft
Inc.

7
The New Enterprise

SaaS
Cloud platforms

Social

Mobility and Devices

Customers / Partners
/ Suppliers

Packaged apps

Custom apps

Big Databases / Big Files
The New Enterprise

1,000s
100s

SaaS

Cloud platforms

Social

1,000,000,000s

100,000s

Mobility and Devices

Customers / Partners
/ Suppliers

Packaged apps

1,000,000s

Custom apps

Big Databases / Big Files
The New Enterprise

SaaS
Social

Cloud platforms

Open web APIs
Mobility and Devices

Customers / Partners / Suppliers

B2B APIs

Product APIs
Internal APIs

Packaged apps

Custom apps

The New Enterprise

Databases
API Design
#1
The Contract is Critical
The API Contract Is Critical

•  tells consumer devs what they'll get

•  tells implementer devs what to deliver

•  enables parallel development

•  ensures they'll meet in the end
The Contract is Critical

ü  where consumers touch you
ü  your front door, your lobby, your façade
ü  how you want to be seen; your brand
ü  versioned more carefully than code
ü  better interfaces è better code
ü  an organizing principle; alignment forcing function
ü  the ultimate testing surface
What kind of contract do we want?

1.  Describe APIs simply and clearly

2.  Design APIs easily and soundly
What kind of contract do we want?

Document your API?

or
Model your API?
#2
Design to Delight
The Key to API Success?

how?
• 
• 
• 
• 

design for them
iterate quickly
model cleanly and consistently
gather feedback
#3
Think APX not API
Design For Your Users

UI à UX
Valida
te

API à APX

Capture
Feedback
Think APX!
This is a long-lived interface,
ladies and gentlemen

Don't expose dirty laundry

!

users

products
orders

è

invoices

Craft it for your users:
what will they love?
#4
Use Patterns
Pattern Lifecycle

Define

Share

Reuse
Types of Patterns

•  Resource Types
•  Collection
•  Collection Member
•  Document

•  Traits
•  Secure
•  Paged
#5
Engage Developers
Engage Developers

•  Social Tools
•  Rate, discuss
•  Provide feedback

•  Interactive Console
•  Prototyping Tools
What Do People Do Today?
WADL
Reverb Swagger
Mashery IOdocs
Google Discovery Docs
Apiary Blueprint
Verdict:

manifest
structure

capture
patterns

humanly
writeable

let's try
harder…
Start From Scratch?
Really???
No Need to Start From Scratch!

• 
• 
• 
• 
• 
• 

well-known superset of JSON
optimized for human readability
great for hierarchies
cruft-free
broad tooling base
extensible-ish
RAML

RESTful API Modeling Language
A new open spec
for RESTful APIs
that's as clean
and as structured
as REST itself
the RAML Workgroup:
raml.org
RAML: How Clean? How Structured?
RAML: Clean & Structured.
RAML: Reuse

resource type
schema

trait
Covers Full HTTP
optional version in baseUri
template URIs

query parameters

headers (on request and response)
response per status code
example (and schema) per media type
Patterns: Resource Types
externalizable
inheritance
pull in traits

parametrize
Patterns: Method-level traits

mix-ins
Patterns: body schemas
XML schema
JSON schema
or just use good ol'
form data:

examples
Patterns: security schemes
username/password; cleartext or use digest
end user allows app to access their data
better to put token in header, not query

the OAuth multi-step dance
What's next?

q growing library of API specs in RAML (e.g. on APIhub)
q converters (import WADL, Swagger etc.)
q client generators
q server frameworks (e.g. MuleSoft APIkit; node.js)
q JAX-RS Support
q testing frameworks
q mocking services (e.g. on APIhub)
q <insert your ideas here>
q evolve RAML spec (RAML workgroup)
Interesting?
Thank you!

Contenu connexe

Tendances

STC Summit 2015: API Documentation, an Example-Based Approach
STC Summit 2015: API Documentation, an Example-Based ApproachSTC Summit 2015: API Documentation, an Example-Based Approach
STC Summit 2015: API Documentation, an Example-Based Approach
Lois Patterson
 

Tendances (20)

Open Source And the Internet Of Things
Open Source And the Internet Of ThingsOpen Source And the Internet Of Things
Open Source And the Internet Of Things
 
Google v Oracle: The Future of Software and Fair Use
Google v Oracle: The Future of Software and Fair UseGoogle v Oracle: The Future of Software and Fair Use
Google v Oracle: The Future of Software and Fair Use
 
API Description Languages
API Description LanguagesAPI Description Languages
API Description Languages
 
Life After Microservices – Shifting the Boundaries
Life After Microservices – Shifting the BoundariesLife After Microservices – Shifting the Boundaries
Life After Microservices – Shifting the Boundaries
 
Operational API design anti-patterns (Jason Harmon)
Operational API design anti-patterns (Jason Harmon)Operational API design anti-patterns (Jason Harmon)
Operational API design anti-patterns (Jason Harmon)
 
API 101 - Understanding APIs
API 101 - Understanding APIsAPI 101 - Understanding APIs
API 101 - Understanding APIs
 
API Trends: What to expect in 2012
API Trends: What to expect in 2012API Trends: What to expect in 2012
API Trends: What to expect in 2012
 
Rest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbookRest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbook
 
GitHub Copilot.pptx
GitHub Copilot.pptxGitHub Copilot.pptx
GitHub Copilot.pptx
 
API Description Languages: Which is the Right One for Me?
API Description Languages: Which is the Right One for Me?API Description Languages: Which is the Right One for Me?
API Description Languages: Which is the Right One for Me?
 
Docs Like Code
Docs Like CodeDocs Like Code
Docs Like Code
 
Docs Like Code: Strategies and Stories
Docs Like Code: Strategies and StoriesDocs Like Code: Strategies and Stories
Docs Like Code: Strategies and Stories
 
apidays LIVE Paris 2021 - Privacy Engineering by Ian Oliver, Nokia Bell Labs
apidays LIVE Paris 2021 - Privacy Engineering by Ian Oliver, Nokia Bell Labsapidays LIVE Paris 2021 - Privacy Engineering by Ian Oliver, Nokia Bell Labs
apidays LIVE Paris 2021 - Privacy Engineering by Ian Oliver, Nokia Bell Labs
 
How And Why To Dogfood Your API
How And Why To Dogfood Your APIHow And Why To Dogfood Your API
How And Why To Dogfood Your API
 
Pain Points In API Development? They’re Everywhere
Pain Points In API Development? They’re EverywherePain Points In API Development? They’re Everywhere
Pain Points In API Development? They’re Everywhere
 
Pie for Sale: Timeless Lessons in API Advocacy (Adam DuVander)
Pie for Sale: Timeless Lessons in API Advocacy (Adam DuVander)Pie for Sale: Timeless Lessons in API Advocacy (Adam DuVander)
Pie for Sale: Timeless Lessons in API Advocacy (Adam DuVander)
 
Eight Hours to API Literacy: A Fast, Fun On-ramp for Writers
Eight Hours to API Literacy: A Fast, Fun On-ramp for WritersEight Hours to API Literacy: A Fast, Fun On-ramp for Writers
Eight Hours to API Literacy: A Fast, Fun On-ramp for Writers
 
Scaling API Design
Scaling API DesignScaling API Design
Scaling API Design
 
STC Summit 2015: API Documentation, an Example-Based Approach
STC Summit 2015: API Documentation, an Example-Based ApproachSTC Summit 2015: API Documentation, an Example-Based Approach
STC Summit 2015: API Documentation, an Example-Based Approach
 
ProgrammableWeb's eSignature API Research Report
ProgrammableWeb's eSignature API Research ReportProgrammableWeb's eSignature API Research Report
ProgrammableWeb's eSignature API Research Report
 

Similaire à 5 Keys to API Design - API Days Paris 2013

Building Open Source Communities for AWS Serverless Developer Tools
Building Open Source Communities for AWS Serverless Developer ToolsBuilding Open Source Communities for AWS Serverless Developer Tools
Building Open Source Communities for AWS Serverless Developer Tools
Amazon Web Services
 
The next generation of google APIs (Ade Oshineye)
The next generation of google APIs (Ade Oshineye)The next generation of google APIs (Ade Oshineye)
The next generation of google APIs (Ade Oshineye)
Ontico
 

Similaire à 5 Keys to API Design - API Days Paris 2013 (20)

RAML - APIs By Design
RAML - APIs By DesignRAML - APIs By Design
RAML - APIs By Design
 
Mulesoft Raml APIs
Mulesoft Raml APIsMulesoft Raml APIs
Mulesoft Raml APIs
 
Building a REST API for Longevity
Building a REST API for LongevityBuilding a REST API for Longevity
Building a REST API for Longevity
 
Building the Eventbrite API Ecosystem
Building the Eventbrite API EcosystemBuilding the Eventbrite API Ecosystem
Building the Eventbrite API Ecosystem
 
Cloud Services UX
Cloud Services UXCloud Services UX
Cloud Services UX
 
6 Reasons Why APIs Are Reshaping Your Business
6 Reasons Why APIs Are Reshaping Your Business6 Reasons Why APIs Are Reshaping Your Business
6 Reasons Why APIs Are Reshaping Your Business
 
Neev Open Source Contributions
Neev Open Source ContributionsNeev Open Source Contributions
Neev Open Source Contributions
 
Building Open Source Communities for AWS Serverless Developer Tools
Building Open Source Communities for AWS Serverless Developer ToolsBuilding Open Source Communities for AWS Serverless Developer Tools
Building Open Source Communities for AWS Serverless Developer Tools
 
The next generation of google APIs (Ade Oshineye)
The next generation of google APIs (Ade Oshineye)The next generation of google APIs (Ade Oshineye)
The next generation of google APIs (Ade Oshineye)
 
Scaling API Design
Scaling API DesignScaling API Design
Scaling API Design
 
Scaling API Design - Nordic APIs 2014
Scaling API Design - Nordic APIs 2014Scaling API Design - Nordic APIs 2014
Scaling API Design - Nordic APIs 2014
 
Building A Great API - Evan Cooke, Cloudstock, December 2010
Building A Great API - Evan Cooke, Cloudstock, December 2010Building A Great API - Evan Cooke, Cloudstock, December 2010
Building A Great API - Evan Cooke, Cloudstock, December 2010
 
Developer Experience (DX) for UX Professionals
Developer Experience (DX) for UX ProfessionalsDeveloper Experience (DX) for UX Professionals
Developer Experience (DX) for UX Professionals
 
APIs as a Product Strategy
APIs as a Product StrategyAPIs as a Product Strategy
APIs as a Product Strategy
 
Popular App Development Frameworks used by App Developers.
Popular App Development Frameworks used by App Developers.Popular App Development Frameworks used by App Developers.
Popular App Development Frameworks used by App Developers.
 
OS Accelerate London - 09/16/15
OS Accelerate London - 09/16/15OS Accelerate London - 09/16/15
OS Accelerate London - 09/16/15
 
Reaching 1 Million APIs and what to do when we get there
Reaching 1 Million APIs and what to do when we get thereReaching 1 Million APIs and what to do when we get there
Reaching 1 Million APIs and what to do when we get there
 
Six Principles of Software Design to Empower Scientists
Six Principles of Software Design to Empower ScientistsSix Principles of Software Design to Empower Scientists
Six Principles of Software Design to Empower Scientists
 
API Introduction - API Management Workshop Munich from Ronnie Mitra
API Introduction - API Management Workshop Munich from Ronnie MitraAPI Introduction - API Management Workshop Munich from Ronnie Mitra
API Introduction - API Management Workshop Munich from Ronnie Mitra
 
API Description Languages: Which Is The Right One For Me?
 API Description Languages: Which Is The Right One For Me?  API Description Languages: Which Is The Right One For Me?
API Description Languages: Which Is The Right One For Me?
 

Dernier

Dernier (20)

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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
 
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?
 

5 Keys to API Design - API Days Paris 2013