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
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
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
認知負荷をGemini で溶かす — GKE 基盤「Orbit」における AI エージェントの実践
sansantech
PRO
1
270
AI ネイティブな組織に Gemini Enterprise Agent Platform がなぜ必要なのか
asei
1
190
もう一度考える SRE チームの作り方・育て方 / Rethinking SRE #1: Building and Growing SRE Teams
rrreeeyyy
6
1k
DatadogのBits Chatが開発組織にもたらしたもの / What Bits Chat Has Brought Us
sms_tech
1
120
強化学習「理論」入門
enakai00
3
3.6k
制約理論(ToC)入門 2026版
recruitengineers
PRO
7
2.1k
老害フォレンジッカーはAI羊の夢を見るか?
tadmaddad
0
310
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.9k
Invisible to AI? Making TYPO3 Sites Quotable by AI Search Systems
wolfgangwagner
0
170
モバイルアプリ開発概論2026
recruitengineers
PRO
4
510
【CEDEC2026】コードレビュー支援ツール開発から学ぶ:LLMを用いた業務システムの実践的な運用設計と誤出力対策
cygames
PRO
0
630
修正PRを食べてレビュースキルが賢くなる:Claude Codeによる自己改善サイクル
yuyaumetsu
6
1.4k
Featured
See All Featured
sira's awesome portfolio website redesign presentation
elsirapls
0
320
Making Projects Easy
brettharned
120
6.7k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
200
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
450
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
Being A Developer After 40
akosma
91
590k
Ruling the World: When Life Gets Gamed
codingconduct
0
290
What does AI have to do with Human Rights?
axbom
PRO
1
2.3k
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
A Modern Web Designer's Workflow
chriscoyier
698
190k
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/