Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
120
Battle tested API Design - Laravel Edition (PHP.RUHR)
fetzi
0
85
Battle tested API design
fetzi
0
93
Mastering CLIs
fetzi
0
50
(Understanding) OAuth2
fetzi
0
230
Decouple Everything
fetzi
0
210
Go Basics Workshop
fetzi
1
79
Getting more out of Git (german)
fetzi
0
69
Go for PHP devs
fetzi
3
110
Other Decks in Programming
See All in Programming
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
160
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
6
3.9k
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
190
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
160
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
110
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
890
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
160
Implementation Patterns
denyspoltorak
0
110
愛される翻訳の秘訣
kishikawakatsumi
3
340
Python札幌 LT資料
t3tra
6
1k
Basic Architectures
denyspoltorak
0
120
Cell-Based Architecture
larchanjo
0
140
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Context Engineering - Making Every Token Count
addyosmani
9
550
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
130
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
130
Measuring & Analyzing Core Web Vitals
bluesmoon
9
710
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
34
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
190
What the history of the web can teach us about the future of AI
inesmontani
PRO
0
370
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
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