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
73
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
66
Battle tested API Design - Laravel Edition (PHP.RUHR)
fetzi
0
60
Battle tested API design
fetzi
0
78
Mastering CLIs
fetzi
0
38
(Understanding) OAuth2
fetzi
0
200
Decouple Everything
fetzi
0
200
Go Basics Workshop
fetzi
1
60
Getting more out of Git (german)
fetzi
0
57
Go for PHP devs
fetzi
3
100
Other Decks in Programming
See All in Programming
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
510
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
4
990
Realtime API 入門
riofujimon
0
140
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
290
リリース8年目のサービスの1800個のERBファイルをViewComponentに移行した方法とその結果
katty0324
5
4.2k
RailsのPull requestsのレビューの時に私が考えていること
yahonda
5
2.8k
僕がつくった48個のWebサービス達
yusukebe
20
17k
役立つログに取り組もう
irof
28
9.4k
PLoP 2024: The evolution of the microservice architecture pattern language
cer
PRO
0
2.4k
Tuning GraphQL on Rails
pyama86
2
1.2k
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
540
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
190
Featured
See All Featured
Music & Morning Musume
bryan
46
6.2k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Thoughts on Productivity
jonyablonski
67
4.3k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
A Modern Web Designer's Workflow
chriscoyier
693
190k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
Navigating Team Friction
lara
183
14k
Agile that works and the tools we love
rasmusluckow
327
21k
4 Signs Your Business is Dying
shpigford
180
21k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
How to Ace a Technical Interview
jacobian
276
23k
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