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
Boas Práticas em APIs REST
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Diogo Beato
June 11, 2015
Technology
770
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Boas Práticas em APIs REST
slides para a apresentação sobre boas práticas em apis rest no papo reto da bluesoft
Diogo Beato
June 11, 2015
More Decks by Diogo Beato
See All by Diogo Beato
Cloud Native Banking
diogobeato
1
120
Testando Models
diogobeato
0
45
Logging proativo com ELKW
diogobeato
0
270
Isomorphic Javascript
diogobeato
0
180
Fundamentos da JVM
diogobeato
0
350
MinMax
diogobeato
0
110
TDC - Breaking Build
diogobeato
0
90
Breaking Build
diogobeato
0
270
Design para Programadores - Layout
diogobeato
1
68
Other Decks in Technology
See All in Technology
Conditional PED-ANOVA: Hyperparameter Importance in Hierarchical & Dynamic Search Spaces
pfn
PRO
0
140
DGX Spark でどこまでハッキングができるのか?
kash1064
3
1.3k
JAWSUG TOHOKU 青森支部 「LoGoチャット」のAWS移行で 乗り越えたこと
taketakekaho
0
340
サブエージェントと Claude Mods で作る独自 Advisor ツールの話
kenichiodo
2
160
Classmethod Company Deck
satoshi7
1
730
コンテナ運用におけるネットワーク・コンテナコストの削減方法/How to Reduce Network and Container Costs in Container Operations
masakiokuda
1
280
DBについての基礎説明(MySQL編) - コロプラ 2026年度 新卒研修
colopl
0
110
ソフトウェア ファクトリー - 再現性のあるソフトウェアの工場づくり / Software factory
iktakahiro
6
5k
⾮構造化データを価値に変える AI エージェント基盤とその組織
ivry_presentationmaterials
0
190
Running Kotlin + Quarkus with Lambda
nealle
1
3.9k
Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
1
720
10年後、Engineering 行為を剥奪されるとして、わたしたちは、どう、何を創ればいいだろうか。 / If Engineering Is Taken Away in 10 Years, How and What Should We Create?
bitkey
PRO
1
200
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
270
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Why Our Code Smells
bkeepers
PRO
340
58k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
Designing for humans not robots
tammielis
254
26k
Optimizing for Happiness
mojombo
378
71k
Ethics towards AI in product and experience design
skipperchong
2
440
Abbi's Birthday
coloredviolet
4
10k
Transcript
boas práticas em Diogo Beato @dvbeato
REST - Representational State Transfer Desenvolvimento orientado a webservices Criado
por Roy Fielding
Independência de tecnologia Flexibilidade para clientes diferentes Venda de serviços
urls amigáveis: acelerato.com/tickets simples e de fácil adoção flexível para
quem for utilizar
Creates e Updates retornam o recurso NÃO utilize verbos para
os recursos Utilize sempre nomes no plural Recursos Lógicos
GET /tickets GET /tickets/12 POST /tickets PUT /tickets/12 PATCH /tickets/12
DELETE /tickets/12 Recursos Lógicos
GET /tickets/12/messages GET /tickets/12/messages/5 POST /tickets/12/messages PUT /tickets/12/messages/5 PATCH /tickets/12/messages/5
DELETE /tickets/12/messages/5 Relacionamentos
A API é tão boa quanto sua documentação Cria independencia
e autonomia Mesmo que seja uma API privada e interna Documentação
Mudanças são inevitáveis Sempre versione sua API GET /v1/tickets Versionamento
Utilize query parameters GET /tickets?state=open GET /tickets?sort=-priority,created_at Filtros e Ordenação
Para filtros comuns, crie alias GET /tickets/recently_closed Filtros e Ordenação
GET /tickets?fields=id,subject,customer_name Seleção de campos
GET /tickets?page=2&per_page=50 Paginação
Roy Fielding http://roy.gbiv.com/ Tese de Roy Fielding http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm Artigo
http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api REFERÊNCIAS
None