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
84
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
120
Battle tested API Design - Laravel Edition (PHP.RUHR)
fetzi
0
83
Battle tested API design
fetzi
0
92
Mastering CLIs
fetzi
0
50
(Understanding) OAuth2
fetzi
0
230
Decouple Everything
fetzi
0
210
Go Basics Workshop
fetzi
1
79
Getting more out of Git (german)
fetzi
0
69
Go for PHP devs
fetzi
3
110
Other Decks in Programming
See All in Programming
Nitro v3
kazupon
2
320
Flutterアプリ運用の現場で役立った監視Tips 5選
ostk0069
1
520
How Software Deployment tools have changed in the past 20 years
geshan
0
11k
レイトレZ世代に捧ぐ、今からレイトレを始めるための小径
ichi_raven
0
470
JEP 496 と JEP 497 から学ぶ耐量子計算機暗号入門 / Learning Post-Quantum Crypto Basics from JEP 496 & 497
mackey0225
2
490
無秩序からの脱却 / Emergence from chaos
nrslib
1
9.4k
TypeScript 5.9 で使えるようになった import defer でパフォーマンス最適化を実現する
bicstone
1
500
スタートアップを支える技術戦略と組織づくり
pospome
8
12k
AWS CDKの推しポイントN選
akihisaikeda
1
210
CloudflareのSandbox SDKを試してみた
syumai
0
180
Private APIの呼び出し方
kishikawakatsumi
3
900
最新のDirectX12で使えるレイトレ周りの機能追加について
projectasura
0
300
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.1k
Facilitating Awesome Meetings
lara
57
6.6k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
Building an army of robots
kneath
306
46k
The Language of Interfaces
destraynor
162
25k
Automating Front-end Workflow
addyosmani
1371
200k
Become a Pro
speakerdeck
PRO
30
5.6k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Balancing Empowerment & Direction
lara
5
760
Embracing the Ebb and Flow
colly
88
4.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