Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
API Design
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
azisaka
March 04, 2013
Technology
190
7
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
API Design
A keynote made for Papaya Ventures explaining the main points when developing an API.
azisaka
March 04, 2013
More Decks by azisaka
See All by azisaka
SASS for fun and profit
azisaka
3
150
Omniauth - Basic and principles
azisaka
1
86
Other Decks in Technology
See All in Technology
スプシの手作業からの解脱 ~更新はClaude Codeに、見せ方と使い方はGASアプリに任せる~
kentarofujii
0
150
Rustuna: Rustによる高速なOptuna実装
pfn
PRO
0
190
PagerDuty Tech Hub-鳴らすけれど、人は動かない
ezaki
0
170
Gemini Intelligence 入門 ― AppFunctions と Gemini Nano
takuroabe
0
250
How to Design Configuration for Rails Applications
willnet
1
770
Tofu-Controller lightning talk @ Containerday 2026
gionn
0
100
V8のArray.prototype.flatを最大約20倍速くするまでと、巨大OSSへの大規模コミットの道のり
riyaamemiya
0
290
ストレスなくAIと付き合いたい!こんなときどうしてる?
namiki64
3
490
Benchmarking Disaggregated Serving on vLLM + Dynamo with a Real Coding-Agent Workload
nttcom
1
190
実践!Cloud Run ハンズオン!! / Cloud Run handson
y0hgi
2
280
サブエージェントと Claude Mods で作る独自 Advisor ツールの話
kenichiodo
2
160
触りたくないデータに、どう触るか AI時代のRBACアクセスガバナンス
ivry_presentationmaterials
0
260
Featured
See All Featured
Between Models and Reality
mayunak
4
500
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
480
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
220
Rails Girls Zürich Keynote
gr2m
96
14k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
570
The Mindset for Success: Future Career Progression
greggifford
PRO
0
540
First, design no harm
axbom
PRO
2
1.3k
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
520
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
500
Transcript
por que você deveria se importar? API design
Como enviar dados para a nuvem?
API Application Programming Interface Fácil de usar Rápida Leve JSON
Construindo uma API
Representational State Transfer REST
Arquitetura DISTRIBUÍDA
Representação de Entidades /posts/1.json /posts/1/comments.json /posts/1/likes.json
HTTP METHOD ACTION VERBO SUBSTANTIVO GET DELETE POST PUT /posts
/posts /posts/1 /posts/1
USE Substantivos ao inves de verbos
verbos criam uma API prolixa GET /listarPosts.json POST /criarPost.json GET
/visualizarPost.json?id=1
Se aproveite dos HTTP methods GET /posts.json POST /posts.json GET
/posts/1.json PUT /posts/1.json DELETE /posts/1.json
Sempre plural, nunca singular
ENdpoints no plural são intuitivos GET /posts GET /posts/1 PUT
/posts/1 POST /posts
Substantivos concretos, nunca abstratos
Endpoints devem ter significado GET /items GET /products GET /users
GET /assets Ruim Bom
RELACIONE RECURSOS DE FORMA SIMPLES
Endpoints auto-explicativos Foto Likes POST /photos/1/likes Categoria Estabelecimentos GET /categories/restaurant/venues
Coloque a complexidade DEPOIS da “?”
filtros e buscas GET /posts?status=draft GET /posts/1/comments?user_id=1 GET /posts?q=something
Resultados devem ser paginados
Indiquem onde o resultado está GET /posts { “posts”: [
{ “id”: 1, title: “Post #1” }, { “id”: 2, title: “Post #2” } ], “page”: 1, “total”: 10, “perPage”: 2 } GET /posts?page=2&perPage=1 { “posts”: [ { “id”: 3, title: “Post #3” }, ], “page”: 2, “total”: 10, “perPage”: 1 }
Retorne dados parcialmente
Reduza o payload GET /posts/1 { “post”: { “id”: 1,
“title”: “Post #1”, “body”: “Post’s body”, “tags”: [“api”, “web”, “http”], “category”: { “name”: “Development” } } } GET /posts/1?fields=id,title { “post”: { “id”: 1, “title”: “Post #1” } }
Retorne erros com significado
Seja claro! POST /posts { “status”: 400, “message”: “O título
não pode ficar em branco” }
Versione sua API
E mantenha ao menos 1 versão GET /v1/posts/1 GET /v2/posts/1
{ “post”: { “id”: 1, “title”: “Post #1”, “content”: “Post’s body” } } } { “post”: { “id”: 1, “title”: “Post #1”, “body”: “Post’s body” } } }
Use um subdomínio
api.seuprojeto.com Escalabilidade independente Controle de cache e CDN independente Organização
Wrap up
APIs podem fazer a diferença durante o desenvolvimento Cuidado com
o Design
A mesma API pode ser core de aplicativos iPhone, Android,
Web e Desktop Colha os frutos
Outros aplicativos podem aumentar o valor do seu produto expandindo
o seu uso Aumente seu evaluation
O caso “Instragram”
None
None
None
None
None
Obrigado :)