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
Battle tested API design - Laracon EU Online
Search
Johannes Pichler
May 20, 2020
Programming
87
0
Share
Battle tested API design - Laracon EU Online
Johannes Pichler
May 20, 2020
More Decks by Johannes Pichler
See All by Johannes Pichler
Crafting Elegant APIs with Laravel
fetzi
0
11
Crafting Elegant APIs with Laravel
fetzi
0
140
Battle tested API Design - Laravel Edition (PHP.RUHR)
fetzi
0
90
Battle tested API design
fetzi
0
95
Mastering CLIs
fetzi
0
53
(Understanding) OAuth2
fetzi
0
240
Decouple Everything
fetzi
0
210
Go Basics Workshop
fetzi
1
82
Getting more out of Git (german)
fetzi
0
76
Other Decks in Programming
See All in Programming
「接続」—パフォーマンスチューニングの最後の一手 〜点と点を結ぶ、その一瞬のために〜
kentaroutakeda
4
2.3k
Xdebug と IDE による デバッグ実行の仕組みを見る / Exploring-How-Debugging-Works-with-Xdebug-and-an-IDE
shin1x1
0
290
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
350
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
290
Mastering Event Sourcing: Your Parents Holidayed in Yugoslavia
super_marek
0
130
CS教育のDX AIによる育成の効率化
niftycorp
PRO
0
170
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
2.2k
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.5k
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.3k
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
2
470
夢の無限スパゲッティ製造機 -実装篇- #phpstudy
o0h
PRO
0
180
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
530
Featured
See All Featured
First, design no harm
axbom
PRO
2
1.2k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
370
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
Context Engineering - Making Every Token Count
addyosmani
9
790
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
91
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.5k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
330
How to Talk to Developers About Accessibility
jct
2
170
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
54k
Code Reviewing Like a Champion
maltzj
528
40k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Transcript
Ba#le tested API design Laracon EU Online 2020
Johannes Pichler • Web Developer since 2006 • PHP, .NET,
Java • working @ karriere.at
Agenda • API design • Implemen/ng an API in Laravel
None
API Design
Steps for building your API Design • Requirements & Planning
• Implementa4on • Verifica4on & Maintenance
Requirements & Planning
Consider the client(s)
Rou$ng • based on resources • use standard HTTP methods
• be as explicit as possible
Rou$ng GET: /todos GET: /todos/{id} POST: /todos PUT: /todos/{id} DELETE:
/todos/{id}
Rou$ng - API Versioning • frequency of endpoint changes •
handling of breaking changes • use seman8c versioning • use only major version in URLs
Response format • no custom response format • use a
defined standard • JSON:API • HAL
Authoriza*on • use specific client tokens • add access tokens
for sensi3ve endpoints
API Specifica,on • use an API client like Stoplight Studio
or Postman • define your endpoints with edge cases • make your specifica;on testable
Implemen'ng an API in Laravel
Verifica(on & Maintenance
Verifica(on • it's all about metrics • have useful error
logging in place • verify your assump7ons during development
Maintenance • be careful with breaking changes • s3ck to
seman3c versioning • keep your API specifica3on up to date
Summary
Resources • h#ps:/ /github.com/fetzi/laracon-api-design • h#ps:/ /jsonapi.org/
THANKS @fetzi_io