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
83
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
110
Battle tested API Design - Laravel Edition (PHP.RUHR)
fetzi
0
77
Battle tested API design
fetzi
0
87
Mastering CLIs
fetzi
0
48
(Understanding) OAuth2
fetzi
0
220
Decouple Everything
fetzi
0
210
Go Basics Workshop
fetzi
1
76
Getting more out of Git (german)
fetzi
0
68
Go for PHP devs
fetzi
3
110
Other Decks in Programming
See All in Programming
Laravel Boost 超入門
fire_arlo
2
180
開発チーム・開発組織の設計改善スキルの向上
masuda220
PRO
18
9.7k
print("Hello, World")
eddie
1
330
奥深くて厄介な「改行」と仲良くなる20分
oguemon
1
270
為你自己學 Python - 冷知識篇
eddie
1
330
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
300
OSS開発者という働き方
andpad
5
1.6k
時間軸から考えるTerraformを使う理由と留意点
fufuhu
9
3.8k
複雑なドメインに挑む.pdf
yukisakai1225
5
920
CSC305 Summer Lecture 12
javiergs
PRO
0
130
Honoアップデート 2025年夏
yusukebe
1
900
パスタの技術
yusukebe
1
560
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
We Have a Design System, Now What?
morganepeng
53
7.8k
Docker and Python
trallard
45
3.5k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Building Better People: How to give real-time feedback that sticks.
wjessup
368
19k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
6.1k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Cost Of JavaScript in 2023
addyosmani
53
8.9k
Done Done
chrislema
185
16k
How STYLIGHT went responsive
nonsquared
100
5.8k
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