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
0
68
Running a Public API Do's and Don'ts
Sibiu Web Meetup
October 18, 2019
Tweet
Share
More Decks by Sibiu Web Meetup
See All by Sibiu Web Meetup
DevSecOps: Develop Fast & Stay Secure
sibiuwebmeetup
0
21
Git commit messages and PR etiquette
sibiuwebmeetup
0
19
Introduction to Cypress
sibiuwebmeetup
0
16
Web Application Security
sibiuwebmeetup
0
91
Zero Coupled Microservices
sibiuwebmeetup
0
11
Ethereum: Quick & Dirty
sibiuwebmeetup
0
78
Automation in Code Reviews
sibiuwebmeetup
0
110
useState(props.title)
sibiuwebmeetup
0
89
Introduction into ClojureScript
sibiuwebmeetup
0
39
Other Decks in Programming
See All in Programming
Google Agent Development Kit でLINE Botを作ってみた
ymd65536
2
190
都市をデータで見るってこういうこと PLATEAU属性情報入門
nokonoko1203
1
570
たった 1 枚の PHP ファイルで実装する MCP サーバ / MCP Server with Vanilla PHP
okashoi
1
190
#kanrk08 / 公開版 PicoRubyとマイコンでの自作トレーニング計測装置を用いたワークアウトの理想と現実
bash0c7
1
440
PHPでWebSocketサーバーを実装しよう2025
kubotak
0
160
Azure AI Foundryではじめてのマルチエージェントワークフロー
seosoft
0
130
5つのアンチパターンから学ぶLT設計
narihara
1
110
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
210
AWS CDKの推しポイント 〜CloudFormationと比較してみた〜
akihisaikeda
3
310
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
46
31k
Haskell でアルゴリズムを抽象化する / 関数型言語で競技プログラミング
naoya
17
4.9k
Deep Dive into ~/.claude/projects
hiragram
8
1.5k
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
How GitHub (no longer) Works
holman
314
140k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
4 Signs Your Business is Dying
shpigford
184
22k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Site-Speed That Sticks
csswizardry
10
660
The Cost Of JavaScript in 2023
addyosmani
51
8.4k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
A designer walks into a library…
pauljervisheath
207
24k
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