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
78
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
実用的なGOCACHEPROG実装をするために / golang.tokyo #40
mazrean
1
260
Azure SRE Agentで運用は楽になるのか?
kkamegawa
0
2.1k
Deep Dive into Kotlin Flow
jmatsu
1
320
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
1.3k
MCPとデザインシステムに立脚したデザインと実装の融合
yukukotani
4
1.4k
Android 16 × Jetpack Composeで縦書きテキストエディタを作ろう / Vertical Text Editor with Compose on Android 16
cc4966
1
200
Tool Catalog Agent for Bedrock AgentCore Gateway
licux
6
2.4k
250830 IaCの選定~AWS SAMのLambdaをECSに乗り換えたときの備忘録~
east_takumi
0
390
ProxyによるWindow間RPC機構の構築
syumai
3
1.2k
Kiroで始めるAI-DLC
kaonash
2
580
意外と簡単!?フロントエンドでパスキー認証を実現する WebAuthn
teamlab
PRO
2
740
print("Hello, World")
eddie
2
530
Featured
See All Featured
Thoughts on Productivity
jonyablonski
70
4.8k
4 Signs Your Business is Dying
shpigford
184
22k
What's in a price? How to price your products and services
michaelherold
246
12k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.2k
It's Worth the Effort
3n
187
28k
Building Adaptive Systems
keathley
43
2.7k
Git: the NoSQL Database
bkeepers
PRO
431
66k
Music & Morning Musume
bryan
46
6.8k
Bash Introduction
62gerente
615
210k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
Side Projects
sachag
455
43k
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