Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
API Design with Apiary
Search
Z
March 17, 2016
Programming
130
1
Share
API Design with Apiary
As presentent on ofmForum.
Z
March 17, 2016
More Decks by Z
See All by Z
Agentic Commerce - arcpay.ai
zdne
1
76
APIs at the Verge of AI
zdne
0
220
Delivering APIs for AI
zdne
0
310
APIs for AI: Have we failed?
zdne
0
330
AI-enabled APIs
zdne
0
150
Autonomous Agents
zdne
0
180
API Documentation & AI
zdne
0
210
APIs in N-tier architecture
zdne
0
560
Autonomous Integration Mesh '21
zdne
0
210
Other Decks in Programming
See All in Programming
アーキテクチャモダナイゼーションとは何か
nwiizo
17
4.2k
PHPで TLSのプロトコルを実装してみる
higaki_program
0
740
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
3
510
AIエージェントで業務改善してみた
taku271
0
480
飯MCP
yusukebe
0
480
ネイティブアプリとWebフロントエンドのAPI通信ラッパーにおける共通化の勘所
suguruooki
0
250
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
560
PHPで TLSのプロトコルを実装してみるをもう一度しゃべりたい
higaki_program
0
180
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
540
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
970
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
400
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
440
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
247
13k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Automating Front-end Workflow
addyosmani
1370
200k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
Evolving SEO for Evolving Search Engines
ryanjones
0
170
Into the Great Unknown - MozCon
thekraken
40
2.3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
120
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
54k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
340
SEO for Brand Visibility & Recognition
aleyda
0
4.4k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Transcript
API DESIGN WITH APIARY Z – @zdne Apiary.io
4 STAGES OF API MATURITY API as a by- product
of building apps API documentation generated from code Design-first API Development API Design Consistency
APIARY.IO
DESIGN-FIRST
API DESCRIPTION • API Blueprint • OpenAPI Specification (Swagger) •
Others (RAML, WADL, WSDL, Email, Word document)
API BLUEPRINT
# User [/user] ## Retrieve [GET] Retrieves the . +
Response 200 (application/json) { "name": "John" }
None
None
API LIFECYCLE
Preparation Design Development Delivery Consumption Analysis CLASSIC API LIFECYCLE
Preparation Design & Prototype Development Delivery Consumption Analysis API LIFECYCLE
WITH APIARY
Preparation 1. Define domain semantics 2. Choose architectural style 3.
Define a style guide*
Design & Prototype 1. Formalize API in an API Description
format* 2. Put API Description in a VCS 3. Circulate & Review 4. Apiary Mock Server
Develop 1. API Description in the same repository as implementation
2. Test locally 3. Test with Apiary 4. Test in CI
Deliver 1. Share VCS repository 2. Share Apiary Documentation 3.
Embed Apiary Documentation
Consume 1. Apiary Documentation 2. Apiary Mock Server 3. Documentation
Console 4. Language Examples 5. Apiary Traffic Inspector 6. Apiary Proxy
Analysis
BONUS: GOVERNANCE • Design Rules • Style Guides • Better
DX through CONSISTENCY
BONUS: MSON • Human readable data description • Reusable, format-agnostic
data modeling language • Data is your API
TRY IT NOW http://apiary.io Q&A @apiaryio
None
MIND SHIFT • Describe resource NOT representation • Define domain
semantics • Reuse common semantics • Do NOT focus on technical details • URIs • representations • schema validations
API ISN’T… • API is not pretty URLs • API
is not HTTP Verbs • API is not CRUD • API is not JSON
REST ARCHITECTURAL STYLE • Client–server • Stateless • Cacheable •
Layered system • Code on Demand (optional) • Uniform Interface • Identification of resources • Manipulation through representations • Self-descriptive messages • Hypermedia as the engine of the application state
Feedback Design Delivery Prototype Development SIMPLE API LIFECYCLE
REFERENCE • http://apiary.io • http://apiblueprint.org • https://github.com/apiaryio/mson • http://www.ics.uci.edu/~fielding/pubs/dissertation/ rest_arch_style.htm