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
Boas Práticas em APIs REST
Search
Diogo Beato
June 11, 2015
Technology
760
2
Share
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
100
Testando Models
diogobeato
0
38
Logging proativo com ELKW
diogobeato
0
260
Isomorphic Javascript
diogobeato
0
170
Fundamentos da JVM
diogobeato
0
340
MinMax
diogobeato
0
100
TDC - Breaking Build
diogobeato
0
86
Breaking Build
diogobeato
0
260
Design para Programadores - Layout
diogobeato
1
65
Other Decks in Technology
See All in Technology
いつの間にかデータエンジニア以外の業務も増えていたけど、意外と経験が役に立ってる
zozotech
PRO
0
610
Agent の「自由」と「安全」〜未来に向けて今できること〜
katayan
0
360
AI飲み会幹事エージェントを作っただけなのに
ykimi
0
210
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.6k
開発サイクルのボーダーレス化に伴う組織変革から学んだこと / Organizational Transformation Amid the Borderless Development Cycle
mii3king
0
100
エンタープライズの厳格な制約を開発者に意識させない:クラウドネイティブ開発基盤設計/cloudnative-kaigi-golden-path
mhrtech
0
430
サイボウズ、プラットフォームエンジニアリング始めるってよ ― プラットフォームチームの事業貢献と組織アラインメントの強化
ueokande
0
110
AIを賢くしたいなら、まずは人間の改善ループから
subroh0508
0
120
AI 時代の Platform Engineering
recruitengineers
PRO
1
200
エムスリーテクノロジーズ株式会社 エンジニア向け紹介資料 / M3 Technologies Company Deck
m3_engineering
0
140
O'Reilly Infrastructure & Ops Superstream: Platform Engineering for Developers, Architects & the Rest of Us
syntasso
0
180
2026-05-14 要件定義からソース管理まで!IBM Bob基礎ハンズオン
yutanonaka
0
160
Featured
See All Featured
Music & Morning Musume
bryan
47
7.2k
Building Adaptive Systems
keathley
44
3k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.6k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.3k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
170
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
500
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Into the Great Unknown - MozCon
thekraken
41
2.5k
The Language of Interfaces
destraynor
162
26k
Agile that works and the tools we love
rasmusluckow
331
21k
Embracing the Ebb and Flow
colly
88
5k
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