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
Running a Public API Do's and Don'ts
Search
Sibiu Web Meetup
October 18, 2019
Programming
77
0
Share
Running a Public API Do's and Don'ts
Sibiu Web Meetup
October 18, 2019
More Decks by Sibiu Web Meetup
See All by Sibiu Web Meetup
DevSecOps: Develop Fast & Stay Secure
sibiuwebmeetup
0
44
Git commit messages and PR etiquette
sibiuwebmeetup
0
41
Introduction to Cypress
sibiuwebmeetup
0
28
Web Application Security
sibiuwebmeetup
0
120
Zero Coupled Microservices
sibiuwebmeetup
0
23
Ethereum: Quick & Dirty
sibiuwebmeetup
0
91
Automation in Code Reviews
sibiuwebmeetup
0
120
useState(props.title)
sibiuwebmeetup
0
98
Introduction into ClojureScript
sibiuwebmeetup
0
47
Other Decks in Programming
See All in Programming
「Linuxサーバー構築標準教科書」を読んでみた #ツナギメオフライン.7
akase244
0
1.4k
Making the RBS Parser Faster
soutaro
0
660
空間オーディオの活用
objectiveaudio
0
120
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
100
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
170
「話せることがない」を乗り越える 〜日常業務から登壇テーマをつくる思考法〜
shoheimitani
4
970
Liberating Ruby's Parser from Lexer Hacks
ydah
2
2.6k
第3木曜LT会 #28
tinykitten
PRO
0
120
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
240
決定論 vs 確率論:Gemini 3 FlashとTF-IDFを組み合わせた「法規判定エンジン」の構築
shukob
0
150
なぜあなたのコードには「コシ」がないのか?〜AI時代に問う、最後まで美味しい設計と戦略〜 #phpconkagawa / phpconkagawa2026
shogogg
0
120
AgentCore Optimizationを始めよう!
licux
3
170
Featured
See All Featured
Un-Boring Meetings
codingconduct
0
280
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
210
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
Raft: Consensus for Rubyists
vanstee
141
7.4k
A Soul's Torment
seathinner
6
2.8k
First, design no harm
axbom
PRO
2
1.2k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Abbi's Birthday
coloredviolet
2
7.4k
Chasing Engaging Ingredients in Design
codingconduct
0
180
Transcript
Running a Public API Running a Public API Do's and
Don'ts Do's and Don'ts Sibiu Web Meetup #7 - Oct 18, 2019 Jakob Cosoroabă
Jakob Jakob Cosoroabă Cosoroabă Full Stack Developer Product Developer VP
of "git blame" Tsar of "wait what?" the smarter platform for legal intelligence
Sibiu Web Meetup #1 - Nov 23, 2018
Consumer Consumer OH so Many Government APIs Producer Producer 1M/day
request Legal Data
What this talk is NOT about What this talk is
NOT about SOAP vs REST vs GraphQL JSON vs XML vs GRPC JsonAPI vs WDSL
The Basics The Basics
What is a public API What is a public API
used by 3rd parties public documentation
Read-only APIs? Read-only APIs? J JA AMStack MStack
HTTPS HTTPS
Avoid NIHS Avoid NIHS Not Invented Here Syndrome Not Invented
Here Syndrome use api gateways/proxy instead of coding yourself all the basic stuff
- Pablo Ruiz Picasso Jakob NOW-
Must Do Must Do
design first design first
free thinking free thinking API endpoints don't have to follow
API endpoints don't have to follow internal structure internal structure
Versioning Versioning /v1 x-api-version=2019-10-22
Valid Documentation Valid Documentation
Errors Errors
Sane Formats Sane Formats (tweet since removed) (tweet since removed)
Error 007 Error 007
Use the Right Status Use the Right Status
HTTP Response HTTP Response Headers Headers
x-request-id x-request-id
X-RateLimit-Remaining X-RateLimit-Remaining https://stackoverflow.com/questions/1602 2624/examples-of-http-api-rate-limiting- http-response-headers
Retry-After Retry-After https://tools.ietf.org/html/rfc7231#section- 7.1.3
x-credits-left x-credits-left
Cteonnt-Length Cteonnt-Length https://twitframe.com/show? url=https://twitter.com/jcsrb/status/11593896 37066051585
Don't Don't
do not use a browser do not use a browser
for testing too much for testing too much magic magic ♂ ♂ ♂ ♂ ♂ ♂ https://www.ietf.org/rfc/rfc3986.txt
products/1 products/1 products/2 products/2 products/3 products/3
POST /email/deliver POST /email/deliver
Should Do Should Do
Idempotence Idempotence
Actor Tracking Actor Tracking
Offer ASYNC Offer ASYNC
Sandbox Sandbox
Security Security
CORS CORS Signed Webhooks Signed Webhooks Known Origin Known Origin
Nice to have Nice to have
Dashboard Dashboard Multi WebHook Multi WebHook Status Page Status Page
NEVER NEVER
Remove Fields Remove Fields
DELETE with Params DELETE with Params
PUNCHCARDS PUNCHCARDS
Our API Business hours are from 9 - 12, Our
API Business hours are from 9 - 12, 13-17 Monday to Friday except Public 13-17 Monday to Friday except Public holidays holidays
Tools Tools
API Testing API Testing curl insomnia postman API Proxy API
Proxy Kong Tyk.io Express Gateway AWS/Azure Gateway
API Definitions API Definitions RAML API Blueprint (apiary) OpenAPI Specification
API Starter Kits API Starter Kits Node Laravel Rails https://github.com/feredean/node-api-starter https://github.com/joselfonseca/laravel-api https://guides.rubyonrails.org/api_app.html
Thanks Thanks and don't build don't build