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
91
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
29
Crafting Elegant APIs with Laravel
fetzi
0
160
Battle tested API Design - Laravel Edition (PHP.RUHR)
fetzi
0
94
Battle tested API design
fetzi
0
100
Mastering CLIs
fetzi
0
66
(Understanding) OAuth2
fetzi
0
250
Decouple Everything
fetzi
0
230
Go Basics Workshop
fetzi
1
96
Getting more out of Git (german)
fetzi
0
80
Other Decks in Programming
See All in Programming
【DroidKaigi 2026】「アクセシビリティを利用するとき、 アクセシビリティもまたこちらを利用している」 〜マルウェアによる攻撃と防衛について〜
halunoyo
0
350
My Marp Sample
sinoue0108
0
140
Press start. Python's next generation.
willingc
PRO
3
300
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
500
[DroidKaigi 2026] Bring your own phones to Gradle Managed Devices
f2lk
0
100
XHTMLが残したもの
yosuke_furukawa
PRO
1
380
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
2
300
LLMは4年分のCompose移行を再現できるのか?実プロダクト279件のXMLで探る自動化の境界線
makun
0
380
Swift愛好会100回記念 第1回を振り返る
jollyjoester
0
120
片田舎のおっさん、 Swift Buildのダイアモンド問題解決の不具合修正PRを出すが、解決方法がキャッシュをしないようにすることであり、ビルド時間が伸びると言われてマージされないので高速化もする/swiftbuild
yimajo
0
350
Seeing Through Serverless: Observability for AWS Lambda with ADOT and CloudWatch Application Signals
seike460
PRO
1
120
Flow は今どうなっているか
mizdra
PRO
0
900
Featured
See All Featured
Chasing Engaging Ingredients in Design
codingconduct
0
300
Building a Scalable Design System with Sketch
lauravandoore
463
34k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
570
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
320
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
Fireside Chat
paigeccino
42
4k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
WENDY [Excerpt]
tessaabrams
12
39k
Balancing Empowerment & Direction
lara
6
1.3k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
470
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
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