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
JSON API
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Paul McMahon
April 28, 2016
Technology
140
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
JSON API
Paul McMahon
April 28, 2016
More Decks by Paul McMahon
See All by Paul McMahon
Why Ember.js?
pwim
0
1.1k
A developer's perspective on entrepreneurship
pwim
1
390
Using GitHub to get a better job
pwim
11
2.3k
Using Analytics to Improve UX
pwim
0
3.4k
Event Organizers Co-Edo edition
pwim
0
2.9k
Creating a RESTful API for mobile applications
pwim
6
310
勉強会を開催する大まかな流れ
pwim
2
10k
Creating International Communities in Japan
pwim
0
220
英語でコミットを書こう
pwim
52
28k
Other Decks in Technology
See All in Technology
型は壁、Rustでもバグを直すな、表現できなくせよ
nwiizo
14
2.1k
AICoEでAIネイティブ組織への進化
yukiogawa
0
200
AI Coding Agent時代のcdk-nagガードレール 〜組織ルールを強制CIで守り抜く設計の挑戦〜
mhrtech
3
430
インフラと開発の垣根を超えていき!〜元AWSインフラエンジニアがAWS開発で奮闘している話〜
hatahata021
3
300
DatabricksにおけるMCPソリューション
taka_aki
1
280
関数型の考えを TypeScript に持ち込んで、テストしやすい純粋関数を増やす / Pure at the Core, Effects at the Edge: Bringing Functional Thinking into TypeScript
kaminashi
2
130
[2026-07-15] AI Ready なはずだったアーキテクチャと、見えてきた課題・次に目指す状態
wxyzzz
9
4k
Type-safe IaC for Dart
coborinai
0
160
kaonavi Tech Night#1
kaonavi
0
110
CIで使うClaude
iwatatomoya
0
290
CDKで書くECSのベストプラクティス、 改めて考え直す2026 #cdkconf2026
makies
3
850
AI、CDK と協働する Full TypeScript アプリケーション開発 / Full TypeScript Application with AI and CDK
geekplus_tech
2
400
Featured
See All Featured
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
410
Un-Boring Meetings
codingconduct
0
350
Being A Developer After 40
akosma
91
590k
30 Presentation Tips
portentint
PRO
1
350
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
AI: The stuff that nobody shows you
jnunemaker
PRO
8
830
Designing for Performance
lara
611
70k
Agile that works and the tools we love
rasmusluckow
331
22k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
880
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.8k
Transcript
JSON API A SPECIFICATION FOR BUILDING APIS IN JSON PAUL
MCMAHON DOORKEEPERגࣜձࣾ @PWIM
େڕళ
API'S ARE HARD
CREATING A NEW API ISN'T SOMETHING YOU DO REGULARITY
DIFFERENT TECHNOLOGIES MAKE DIFFERENT ASSUMPTIONS ABOUT BEST PRACTICES
BACKWARDS COMPATIBILITY MAKES RESTRUCTURING HARD
CONVENTION OVER CONFIGURATION
DEVELOPING AN APPLICATION INVOLVES A LOT OF DECISIONS THAT DON'T
MATTER.
ALLOWS TO BUILD UP GENERALIZED TOOLING
JSON API
STANDARDIZES AN API'S JSON RESPONSE, SO YOU DON'T NEED TO
THINK ABOUT IT
CLIENT LIBRARIES IN JAVASCRIPT, IOS, RUBY, PHP, PERL, JAVA, ANDROID.
SERVER LIBRARIES IN PHP, NODE.JS, RUBY, PYTHON, GO, .NET, JAVA,
ELIXIR, PERL.
INITIAL DRAFT IN 2013, STABLE VERSION 1.0 IN 2015
BASIC EXAMPLE GET /events/42716 { "data": { "type": "events", "id":
"1", "attributes": { "title": "Machida Tech Night" "starts_at": "2016-04-28T10:00:00.000Z" "ends_at": "2016-04-28T12:30:00.000Z" }, "relationships": { "data": { "type": "group", "id": "6918" } } } }
SPARE FIELDSETS & RELATIONSHIPS GET /events/42716?include=group { "data": { "type":
"events", "id": "1", "attributes": { "title": "ୈ3ճ Machida Tech Night" }, "relationships": { "data": { "type": "group", "id": "6918" } } }, "included": [ { "type": "group", "id": "6918", "attributes": { "name": "Machida Tech Night" } ] }
PAGINATION & FILTERING GET /events?filter[title]=Machida&page[number]=2&page[size]=1 { "meta": { "total-pages": 3
}, "data": [{ "type": "events", "id": "1", "attributes": { "title": "ୈ3ճ Machida Tech Night" }, "relationships": { "data": { "type": "group", "id": "6918" } } }], "links": { "self": "https://api.doorkeeper.jp/events?filter[title]=Machida&page[number]=2&page[size]=1", "first": "https://api.doorkeeper.jp/events?filter[title]=Machida&page[number]=1&page[size]=1", "prev": "https://api.doorkeeper.jp/events?filter[title]=Machida&page[number]=1&page[size]=1", "next": "https://api.doorkeeper.jp/events?filter[title]=Machida&page[number]=3&page[size]=1", "last": "https://api.doorkeeper.jp/events?filter[title]=Machida&page[number]=3&page[size]=1" } }
RESOURCES > http://jsonapi.org/ > https://github.com/rails-api/ active_model_serializers > http://emberjs.com/