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
2
740
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
Tweet
Share
More Decks by Diogo Beato
See All by Diogo Beato
Cloud Native Banking
diogobeato
1
91
Testando Models
diogobeato
0
35
Logging proativo com ELKW
diogobeato
0
240
Isomorphic Javascript
diogobeato
0
160
Fundamentos da JVM
diogobeato
0
330
MinMax
diogobeato
0
97
TDC - Breaking Build
diogobeato
0
79
Breaking Build
diogobeato
0
250
Design para Programadores - Layout
diogobeato
1
59
Other Decks in Technology
See All in Technology
react-callを使ってダイヤログをいろんなとこで再利用しよう!
shinaps
1
240
Aurora DSQLはサーバーレスアーキテクチャの常識を変えるのか
iwatatomoya
1
970
Snowflake Intelligenceにはこうやって立ち向かう!クラシルが考えるAI Readyなデータ基盤と活用のためのDataOps
gappy50
0
220
Platform開発が先行する Platform Engineeringの違和感
kintotechdev
4
570
roppongirb_20250911
igaiga
1
220
Generative AI Japan 第一回生成AI実践研究会「AI駆動開発の現在地──ブレイクスルーの鍵を握るのはデータ領域」
shisyu_gaku
0
200
新アイテムをどう使っていくか?みんなであーだこーだ言ってみよう / 20250911-rpi-jam-tokyo
akkiesoft
0
260
2025年夏 コーディングエージェントを統べる者
nwiizo
0
170
オブザーバビリティが広げる AIOps の世界 / The World of AIOps Expanded by Observability
aoto
PRO
0
380
MCPで変わる Amebaデザインシステム「Spindle」の開発
spindle
PRO
3
3.2k
EncryptedSharedPreferences が deprecated になっちゃった!どうしよう! / Oh no! EncryptedSharedPreferences has been deprecated! What should I do?
yanzm
0
320
サンドボックス技術でAI利活用を促進する
koh_naga
0
200
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
431
66k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.9k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.9k
The Straight Up "How To Draw Better" Workshop
denniskardys
236
140k
Why Our Code Smells
bkeepers
PRO
339
57k
Documentation Writing (for coders)
carmenintech
74
5k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.7k
The World Runs on Bad Software
bkeepers
PRO
70
11k
A Tale of Four Properties
chriscoyier
160
23k
Building an army of robots
kneath
306
46k
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