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
87
0
Share
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
11
Crafting Elegant APIs with Laravel
fetzi
0
140
Battle tested API Design - Laravel Edition (PHP.RUHR)
fetzi
0
90
Battle tested API design
fetzi
0
95
Mastering CLIs
fetzi
0
53
(Understanding) OAuth2
fetzi
0
240
Decouple Everything
fetzi
0
210
Go Basics Workshop
fetzi
1
82
Getting more out of Git (german)
fetzi
0
76
Other Decks in Programming
See All in Programming
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
210
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
1
200
Tamach-sre-3_ANDPAD-shimaison93
mane12yurks38
0
220
Claude Code Skill入門
mayahoney
0
450
Nuxt Server Components
wattanx
0
220
Symfonyの特性(設計思想)を手軽に活かす特性(trait)
ickx
0
110
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.7k
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
2
470
Ruby and LLM Ecosystem 2nd
koic
1
1.4k
モダンOBSプラグイン開発
umireon
0
190
Fundamentals of Software Engineering In the Age of AI
therealdanvega
2
310
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
290
Featured
See All Featured
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
270
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.1k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
780
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
280
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
320
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
Paper Plane
katiecoart
PRO
0
48k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
140
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Music & Morning Musume
bryan
47
7.1k
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