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
92
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
29
Crafting Elegant APIs with Laravel
fetzi
0
160
Battle tested API Design - Laravel Edition (PHP.RUHR)
fetzi
0
94
Battle tested API design
fetzi
0
100
Mastering CLIs
fetzi
0
66
(Understanding) OAuth2
fetzi
0
250
Decouple Everything
fetzi
0
230
Go Basics Workshop
fetzi
1
96
Getting more out of Git (german)
fetzi
0
80
Other Decks in Programming
See All in Programming
Hello, Hiroshima Geospatial Data! — Exploring DoboX with Python
ra0kley
0
170
Swift愛好会と私(ウホーイ) / Swift Fan Club and Uhooi
uhooi
0
140
異なる設計思想のフレームワークを経験して得た学び
amekuhideki
2
1.5k
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
140
XHTMLが残したもの
yosuke_furukawa
PRO
2
420
AIと壁打ちしながら進めるコスト管理
fufuhu
2
1.9k
What We Talk About When We Talk About XP
m_seki
2
380
まずはプロンプトガイドを読もう、話はそれからだ
kiakiraki
1
260
Seeing Through Serverless: Observability for AWS Lambda with ADOT and CloudWatch Application Signals
seike460
PRO
1
120
週末にAI-DLCを本気で回したら$1,600溶けた
hbashimizu
0
130
FastAPI の並行処理モデルを完全に理解する
hoto17296
9
3.8k
Deep dive into the select statement (GopherCon UK)
jespino
0
170
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
230
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
470
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
260
Six Lessons from altMBA
skipperchong
29
4.5k
Code Reviewing Like a Champion
maltzj
528
40k
Skip the Path - Find Your Career Trail
mkilby
1
220
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
670
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
400
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
270
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