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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Paul McMahon
April 28, 2016
Technology
150
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
400
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
230
英語でコミットを書こう
pwim
52
28k
Other Decks in Technology
See All in Technology
ハッカソンで入賞した話 @ Findy LT
asari194617
0
1.5k
『自分で判断できるか』を基準に、プロダクトのハンズオン研修でAI利用の線を引いてみた / Where We Drew the Line on AI in Hands-on Training
honyanya
1
440
本番に近いテストをもっと手軽に - Postmanで広がるAPIテストの世界 / Expanding the World of API Testing with Postman
yokawasa
1
130
[RSJ26] Flow as Flow: Modeling Robot Velocity Fields as Probability Velocity Fields
keio_smilab
PRO
0
110
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
77k
AWSとGitHub Actionsの責任境界と 組織で安全に使用する取り組み
nealle
1
220
わたしが知り合いゼロの勉強会に 行けるようになるまで
r5ni4
2
830
Kiro5兄弟のいまどきのセキュリティ基礎知識
kentapapa
0
380
1000⼈規模のClaude Enterprise運⽤を「Oktaのグループ」と「Slack」に集約する
sansantech
PRO
1
500
NANDでも描画したい!
nichica906
3
810
AWSとAzureのマルチクラウド活用における強い味方___AWS_Kiroを使った二刀流スキル作成.pdf
duelist2020jp
1
140
LLMアプリ、 雰囲気で運用してませんか? 〜LLMOpsの現在地〜
taka_aki
1
560
Featured
See All Featured
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
490
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
260
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
750
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Marketing to machines
jonoalderson
1
5.7k
First, design no harm
axbom
PRO
2
1.3k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
310
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
220
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
560
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
310
Code Review Best Practice
trishagee
74
20k
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/