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
81
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
100
Battle tested API Design - Laravel Edition (PHP.RUHR)
fetzi
0
75
Battle tested API design
fetzi
0
87
Mastering CLIs
fetzi
0
47
(Understanding) OAuth2
fetzi
0
220
Decouple Everything
fetzi
0
210
Go Basics Workshop
fetzi
1
75
Getting more out of Git (german)
fetzi
0
68
Go for PHP devs
fetzi
3
110
Other Decks in Programming
See All in Programming
VS Code Update for GitHub Copilot
74th
2
660
AIプログラマーDevinは PHPerの夢を見るか?
shinyasaita
1
230
The Evolution of Enterprise Java with Jakarta EE 11 and Beyond
ivargrimstad
0
120
テストから始めるAgentic Coding 〜Claude Codeと共に行うTDD〜 / Agentic Coding starts with testing
rkaga
13
4.9k
Team operations that are not burdened by SRE
kazatohiei
1
320
XP, Testing and ninja testing
m_seki
3
290
生成AI時代のコンポーネントライブラリの作り方
touyou
1
250
ソフトウェア品質を数字で捉える技術。事業成長を支えるシステム品質の マネジメント
takuya542
2
14k
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
600
Railsアプリケーションと パフォーマンスチューニング ー 秒間5万リクエストの モバイルオーダーシステムを支える事例 ー Rubyセミナー 大阪
falcon8823
5
1.2k
The Niche of CDK Grant オブジェクトって何者?/the-niche-of-cdk-what-isgrant-object
hassaku63
0
220
テスト駆動Kaggle
isax1015
1
440
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
83
9.1k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
Why Our Code Smells
bkeepers
PRO
336
57k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
980
Writing Fast Ruby
sferik
628
62k
Designing Experiences People Love
moore
142
24k
The World Runs on Bad Software
bkeepers
PRO
69
11k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.9k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
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