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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Sibiu Web Meetup
October 18, 2019
Programming
75
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
40
Git commit messages and PR etiquette
sibiuwebmeetup
0
39
Introduction to Cypress
sibiuwebmeetup
0
23
Web Application Security
sibiuwebmeetup
0
120
Zero Coupled Microservices
sibiuwebmeetup
0
21
Ethereum: Quick & Dirty
sibiuwebmeetup
0
89
Automation in Code Reviews
sibiuwebmeetup
0
110
useState(props.title)
sibiuwebmeetup
0
97
Introduction into ClojureScript
sibiuwebmeetup
0
43
Other Decks in Programming
See All in Programming
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
130
一度始めたらやめられない開発効率向上術 / Findy あなたのdotfilesを教えて!
k0kubun
4
3k
年間50登壇、単著出版、雑誌寄稿、Podcast出演、YouTube、CM、カンファレンス主催……全部やってみたので面白さ等を比較してみよう / I’ve tried them all, so let’s compare how interesting they are.
nrslib
4
790
ハーネスエンジニアリングとは?
kinopeee
10
5.3k
瑠璃の宝石に学ぶ技術の声の聴き方 / 【劇場版】アニメから得た学びを発表会2026 #エンジニアニメ
mazrean
0
250
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
3
350
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
220
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
430
SkillがSkillを生む:QA観点出しを自動化した
sontixyou
6
3.4k
Xdebug と IDE による デバッグ実行の仕組みを見る / Exploring-How-Debugging-Works-with-Xdebug-and-an-IDE
shin1x1
0
380
2026_04_15_量子計算をパズルとして解く
hideakitakechi
0
110
AIエージェントで業務改善してみた
taku271
0
530
Featured
See All Featured
Faster Mobile Websites
deanohume
310
31k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
170
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
110
エンジニアに許された特別な時間の終わり
watany
106
240k
Accessibility Awareness
sabderemane
1
100
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Docker and Python
trallard
47
3.8k
Writing Fast Ruby
sferik
630
63k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
490
A Tale of Four Properties
chriscoyier
163
24k
Six Lessons from altMBA
skipperchong
29
4.2k
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