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
85
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
2
Crafting Elegant APIs with Laravel
fetzi
0
130
Battle tested API Design - Laravel Edition (PHP.RUHR)
fetzi
0
87
Battle tested API design
fetzi
0
93
Mastering CLIs
fetzi
0
51
(Understanding) OAuth2
fetzi
0
230
Decouple Everything
fetzi
0
210
Go Basics Workshop
fetzi
1
81
Getting more out of Git (german)
fetzi
0
74
Other Decks in Programming
See All in Programming
20260313 - Grafana & Friends Taipei #1 - Kubernetes v1.36 的開發雜記:那些困在 Alpha 加護病房太久的 Metrics
tico88612
0
170
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
2
110
Windows on Ryzen and I
seosoft
0
260
RubyとGoでゼロから作る証券システム: 高信頼性が求められるシステムのコードの外側にある設計と運用のリアル
free_world21
0
270
文字コードの話
qnighy
44
17k
ふつうのRubyist、ちいさなデバイス、大きな一年 / Ordinary Rubyists, Tiny Devices, Big Year
chobishiba
1
430
DSPy入門 Pythonで実現する自動プロンプト最適化 〜人手によるプロンプト調整からの卒業〜
seaturt1e
1
690
Understanding Apache Lucene - More than just full-text search
spinscale
0
100
Codex の「自走力」を高める
yorifuji
0
1.2k
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.2k
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
130
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
230
Featured
See All Featured
HDC tutorial
michielstock
1
530
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
Documentation Writing (for coders)
carmenintech
77
5.3k
The browser strikes back
jonoalderson
0
790
Scaling GitHub
holman
464
140k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
200
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
470
A better future with KSS
kneath
240
18k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
630
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
200
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
So, you think you're a good person
axbom
PRO
2
2k
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