Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
JSON API
Search
Paul McMahon
April 28, 2016
Technology
160
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
JSON API
Paul McMahon
April 28, 2016
Transcript
18 slides
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/
More Decks by Paul McMahon
See All by Paul McMahon
Why Ember.js?
pwim
0
1.2k
A developer's perspective on entrepreneurship
pwim
1
420
Using GitHub to get a better job
pwim
11
2.3k
Using Analytics to Improve UX
pwim
0
3.5k
Event Organizers Co-Edo edition
pwim
0
3k
Creating a RESTful API for mobile applications
pwim
6
320
勉強会を開催する大まかな流れ
pwim
2
10k
Creating International Communities in Japan
pwim
0
240
英語でコミットを書こう
pwim
52
28k
Other Decks in Technology
See All in Technology
【Oracle AI SPOTLIGHT ウェビナー】AI時代、狙われるデータと止められない業務をどう守るか?
oracle4engineer
PRO
1
140
Platform Engineering をベースとした Agentic Software Factory の実践
110y
3
940
Is the Website Dying?
miriamschwab
0
140
お風呂場をサーバルームにしよう
yusuke427
0
390
コピーオンライト型ファイルシステムと ランダム書き込み
sat
PRO
2
140
こんなに変わった! AWSネットワークの常識
shotashiratori
16
11k
認知の質も文化醸成も。数年取り組んで見えてきた技術広報のKPI設計 / Tech PR KPIs: Lessons on Awareness Quality and Culture After Several Years
bitkey
PRO
0
210
Re:ゼロから始めるシェアハウスのペットな鯖
silmin_
0
270
Gov-JAWS#9 統合監視機能のマネージドサービス化+AIによる障害時自動調査
fj_yoshimura_kosuke
0
230
おうち環境でも「なるべく止めたくない!」 ― おうち環境の機器冗長化の理想と現実
yuutosi
1
670
ブース設計、 お前もプロダクトだったのか / So Booth Design Was a Product All Along
akihiro0038
0
150
成長するID管理基盤における運用もコストも犠牲にしないオブザーバビリティ向上の実践 / Improving Observability for a Growing Identity Platform Without Adding Operational Burden or Cost
kaminashi
1
120
Featured
See All Featured
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
GitHub's CSS Performance
jonrohan
1033
470k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
630
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
1
310
Chasing Engaging Ingredients in Design
codingconduct
0
410
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
500
The Curse of the Amulet
leimatthew05
4
17k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3.1k
Become a Pro
speakerdeck
PRO
31
6.4k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
540