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
RESTful APIs
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Enderson Tadeu S. Maia
December 17, 2014
Programming
1.3k
5
Share
RESTful APIs
A brief introduction to RESTful APIs concept.
Enderson Tadeu S. Maia
December 17, 2014
More Decks by Enderson Tadeu S. Maia
See All by Enderson Tadeu S. Maia
Minimalist Operating Systems for Containers
endersonmaia
0
140
De Zero a Docker em 30min
endersonmaia
1
860
Other Decks in Programming
See All in Programming
How We Practice Exploratory Testing in Iterative Development( #scrumniigata ) / 反復開発の中で、探索的テストをどう実施しているか
teyamagu
PRO
3
690
サプライチェーン攻撃対策「層を重ねて落ちない壁」を10日間で組み上げた話 #TechLeadConf2026
kashewnuts
1
200
Programming with a DJ Controller — not vibe coding
m_seki
3
780
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
130
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
1
650
GoogleCloudとterraform完全に理解した
terisuke
1
190
KMP × Kotlin 2.3 - How Android Got Slower While iOS Builds Improved by 47%
rio432
0
120
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
300
Vibe NLP for Applied NLP
inesmontani
PRO
0
590
20260514_its_the_context_window_stupid.pdf
heita
0
150
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
330
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
4
440
Featured
See All Featured
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
530
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
My Coaching Mixtape
mlcsv
0
120
How to make the Groovebox
asonas
2
2.2k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
130
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
280
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
200
Claude Code のすすめ
schroneko
67
220k
How to build a perfect <img>
jonoalderson
1
5.5k
A designer walks into a library…
pauljervisheath
211
24k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
320
Color Theory Basics | Prateek | Gurzu
gurzu
0
300
Transcript
RESTful APIs Maceió Dev Meetup December 17, 2014
about.me/endersonmaia
What I’m going to talk
30 minutes to • REST • Constraints • Richard Maturity
Model (RMM) • HTTP Methods • HTTP Satus Codes • Resource Naming • Format • Linking • …
REST Representational State Transfer (Roy Fielding, 2000)
Constraints
Client–server
Stateless
Cacheable
Layered system
Uniform interface
Uniform interface • Resource-Based • Manipulation of Resources Through Representations
• Self-descriptive Messages • Hypermedia as the Engine of Application State (HATEOAS)
RMM Richardson Maturity Model
Level 0 The swamp of POX
Level 0 The swamp of POX $ curl -X POST
-d \ "<?xml version=“1.0"?> \ <methodCall> \ <methodName>examples.getStateName</methodName> \ <params> \ <param> \ <value><i4>40</i4></value> \ </param> \ </params> \ </methodCall>" http://api.example.com
Level 1 Resources
Level 1 Resources • GET - http://host/person?action=add? name=John&age=25 • GET
- http://host/city/delete
Level 2 HTTP Verbs
Level 2 HTTP Verbs • GET - http://host/users • PUT
- http://host/users • DELETE - http://host/users
Level 3 Hypermedia Controls
HTTP Methods
GET
POST
DELETE
PUT
PATCH
OPTIONS
– Leonard Richardson, 2007 "OPTIONS is a promising idea that
nobody uses."
HEAD
HTTP Status Codes
None
2XX
2XX • 200 - OK • 201 - Created •
202 - Accepted • 204 - No Content
3XX
3XX • 301 - Moved Permanently • 304 - Not
Modified
4XX
4XX • 400 - Bad Request • 401 - Unauthorized
• 403 - Forbidden • 404 - Not Found • 409 - Conflict
5XX
5XX • 500 - Internal Server Error • 501 -
Not Implemented
HTTP Headers
HTTP Method x Status
None
None
None
None
More …
Verbs
Verbs • POST - to create (INSERT) a new resource
• GET - to recover (SELECT) a specific resource • PUT/PATCH - to UPDATE a specific resource • DELETE - to DELETE a specific resource
Resource Naming
Resource Naming • POST http://example.com/customers • GET http://example.com/customers/33245 • GET|PUT|DELETE
http://example.com/products/66432 • GET http://example.com/customers/33245/orders • POST http://example.com/customers/33245/orders/ 8769/lineitems • GET http://example.com/customers/33245/orders/ 8769/lineitems/1
Resource Naming Anti-Pattern • GET http://api.example.com/services? op=update_customer&id=12345&format=json • GET http://api.example.com/
update_customer/12345 • GET http://api.example.com/customers/ 12345/update • PUT http://api.example.com/customers/ 12345/update
Response
Format
Format • XML (Atom, …) • JSON (JSON-LD, HAL, …)
None
Linking
None
HATEOAS
Hypermedia As The Engine Of Application State
HATEOAS
HATEOAS
Idempotence & Safe Methods
What’s missing ?
What’s missing ? • More about HTTP Header • HTTP
Authentication samples • Using Tokens • Versioning strategies • ?
References • http://stateless.co/hal_specification.html • http://jsonapi.org • http://www.infoq.com/articles/Web-APIs-From-Start-to-Finish • http://restfulwebapis.com •
http://www.restapitutorial.com • http://martinfowler.com/articles/richardsonMaturityModel.html • http://restcookbook.com • http://www.w3.org/TR/json-ld/ • http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm • http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven • http://brockallen.com/2012/05/14/http-status-codes-for-rest/
Thank you! @endersonmaia