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
0
85
Battle tested API design - Laracon EU Online
Johannes Pichler
May 20, 2020
Tweet
Share
More Decks by Johannes Pichler
See All by Johannes Pichler
Crafting Elegant APIs with Laravel
fetzi
0
130
Battle tested API Design - Laravel Edition (PHP.RUHR)
fetzi
0
86
Battle tested API design
fetzi
0
93
Mastering CLIs
fetzi
0
50
(Understanding) OAuth2
fetzi
0
230
Decouple Everything
fetzi
0
210
Go Basics Workshop
fetzi
1
81
Getting more out of Git (german)
fetzi
0
71
Go for PHP devs
fetzi
3
110
Other Decks in Programming
See All in Programming
ゆくKotlin くるRust
exoego
1
220
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
930
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
260
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
180
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
11
6.1k
AgentCoreとHuman in the Loop
har1101
5
200
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
180
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
670
gunshi
kazupon
1
140
CSC307 Lecture 01
javiergs
PRO
0
680
Featured
See All Featured
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
310
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.5k
Why Our Code Smells
bkeepers
PRO
340
58k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
88
Ruling the World: When Life Gets Gamed
codingconduct
0
130
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Deep Space Network (abreviated)
tonyrice
0
37
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
50
Mobile First: as difficult as doing things right
swwweet
225
10k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
61
49k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
190
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