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
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
44
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
67
Other Decks in Technology
See All in Technology
Active Record Connection Adaptersにおける長年の課題に再び取り組む
yahonda
0
150
M5Stackで作る BLEマウス GPSログの世界
tomokusaba
0
420
AI × アーキテクト 第1・2章|生成AIの課題とアーキテクトの素養
daidaidai
0
170
スキマバイトという雇用形態は存在しないので、雇用期間1日のアルバイト契約を事業者とワーカーが結ぶ手続きを支えるのがタイミーなんです
akitoshiga
0
200
エンタメ企業のM&Aを支えるデータ基盤 ― 統合から店舗のリアルタイム分析まで / Data Engineering Summit 2026
genda
0
170
Kiro Crewをはじめよう
kizawa2020
1
160
Webの常識が通じないHTMLメールのダークモード
teamlab
PRO
0
120
継続的なAIコスト最適化
bgpat
1
340
実践! SRE × AI - ABEMA における AIOps -
tetsuya28
8
3.1k
ブラウザとサーバーから考えるAI時代のフロントエンド監視
shogo4131
3
940
20261017福岡devIO 「AIは"良いダッシュボード"を作れるか?
jtakeda
0
140
10年後、Engineering 行為を剥奪されるとして、わたしたちは、どう、何を創ればいいだろうか。 / If Engineering Is Taken Away in 10 Years, How and What Should We Create?
bitkey
PRO
1
190
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
55
8.4k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
Ruling the World: When Life Gets Gamed
codingconduct
0
400
The SEO identity crisis: Don't let AI make you average
varn
0
590
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.2k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
640
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
490
The Cost Of JavaScript in 2023
addyosmani
55
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