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入門 / Introduction to JSON:API
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
アクイアジャパン Acquia Japan
September 16, 2020
Programming
0
150
JSON:API入門 / Introduction to JSON:API
https://www.acquia.com/jp/resources/webinars/acquia-devchannel-vol11
アクイアジャパン Acquia Japan
September 16, 2020
Tweet
Share
More Decks by アクイアジャパン Acquia Japan
See All by アクイアジャパン Acquia Japan
Auth0 by OktaとDrupalで実践!認証付きアプリケーションの新しいアプローチ
acquiajp
0
190
Drupal 10.3の新機能紹介ウェビナー
acquiajp
0
240
DrupalCon Portland 2024 総まとめウェビナー
acquiajp
0
93
開発者必見!Acquia Cloud IDEで最高のDrupal開発を始めよう
acquiajp
0
170
触って学ぶ!デジタルアセット管理 Acquia DAM ハンズオンウェビナー
acquiajp
0
36
DrupalCon Lille 2023 総まとめウェビナー
acquiajp
0
64
コンテンツ設計手法で変更に強いアプリケーションを実現する〜ローコードによるWebアプリのバックエンド実装 #CNDF2023
acquiajp
0
380
DrupalCon Pittsburgh 2023 総まとめウェビナー
acquiajp
0
91
Acquia製品概要&Site Studioデモのご紹介
acquiajp
0
110
Other Decks in Programming
See All in Programming
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
CSC307 Lecture 07
javiergs
PRO
0
550
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
240
CSC307 Lecture 08
javiergs
PRO
0
670
ThorVG Viewer In VS Code
nors
0
770
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
dchart: charts from deck markup
ajstarks
3
990
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
110
AI時代の認知負荷との向き合い方
optfit
0
160
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
Fluid Templating in TYPO3 14
s2b
0
130
CSC307 Lecture 04
javiergs
PRO
0
660
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
Chasing Engaging Ingredients in Design
codingconduct
0
110
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
The agentic SEO stack - context over prompts
schlessera
0
630
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
320
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
Ethics towards AI in product and experience design
skipperchong
2
190
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
300
Building Applications with DynamoDB
mza
96
6.9k
Are puppies a ranking factor?
jonoalderson
1
2.7k
Transcript
JSON:API ೖ Drupal ͷ Web API JSON:API ͱʁ JSON:API ΤϯυϙΠϯτ
CRUDΦϖϨʔγϣϯ ߴͳϦιʔεͷऔಘํ๏ σϞ Q&A AGENDA
ຊͷεϐʔΧʔ ΞΫΠΞδϟύϯ ؛ढ़ฌ ιϦϡʔγϣϯΤϯδχΞ ΞΫΠΞδϟύϯ ؙࢁͻ͔Δ ςΫχΧϧτϥϯεϨʔλʔ ͰͿͪΌΜͶΔ
DrupalAPI-FirstɺHeadless Architecture ʹ ྗΛೖΕ͍ͯΔʂ https://dri.es/state-of-drupal-presentation-july-2020
Drupal ͷ Web API – RESTful Web Services – REST
API – ίΞϞδϡʔϧ – JSON:API – REST API – ίΞϞδϡʔϧ – GraphQL – ΫΤϦݴޠ – ίϯτϦϏϡʔτϞδϡʔϧ
Drupal ͷ Web API – RESTful Web Services – REST
API – ίΞϞδϡʔϧ – JSON:API – REST API – ίΞϞδϡʔϧ – GraphQL – ΫΤϦݴޠ – ίϯτϦϏϡʔτϞδϡʔϧ
JSON:API ͱ - 2016ΑΓ։ൃ։࢝ - Drupal 8.7 ʙ ίΞϞδϡʔϧͱͯ͠ಋೖ -
DrupalͷϢʔβʔͱύʔϛογϣϯΛ׆༻ - JSON API ͷ༷ʹ४ڌ
JSON:API ͱ JSON API ͱ - https://jsonapi.org - JSONͰAPIΛ࡞͢ΔͨΊͷΦʔϓϯελϯμʔυͳ༷ -
ڞ༗͞Εͨنʹै͏͜ͱͰ RESTful APIΛਝ͔ͭҰ؏ͯ͠࡞ - 2016ΑΓ։ൃ։࢝ - Drupal 8.7 ʙ ίΞϞδϡʔϧͱͯ͠ಋೖ - DrupalͷϢʔβʔͱύʔϛογϣϯΛ׆༻ - JSON API ͷ༷ʹ४ڌ
JSON:APIͷΤϯυϙΠϯτ - /jsonapi/node/article શͯͷهࣄ(article)ϦιʔεΛऔಘ - /jsonapi/node/article/xxx UUID=xxx ͷهࣄΛऔಘ - /jsonapi/node/article/xxx/uid
هࣄ(UUID=xxx)ͱඥ͘ߘऀ(Ϣʔβʔ)ϦιʔεΛऔಘ
None
JSON:API ͷ CRUD ΦϖϨʔγϣϯ GET POST PATCH DELETE ➔Ϧιʔεͷऔಘʢ୯Ұ or
ෳʣ ➔৽͍͠ϦιʔεΛ࡞ ➔طଘͷϦιʔεͷߋ৽ ➔طଘͷϦιʔεͷআ PUTະରԠ GETͷΈෳϦιʔεΛѻ͑Δ
ߴͳϦιʔεऔಘํ๏ - ϑΟϧλϦϯά - ιʔτ - ϖʔδωʔγϣϯ
ߴͳϦιʔεͷऔಘํ๏ɿϑΟϧλϦϯά GET /jsonapi/node/article?filter[label-a][condition][path]=title &filter[label-a][condition][operator]=CONTAINS &filter[label-a][condition][value]=react λΠτϧͰߜΓࠐΈ GET /jsonapi/node/article?filter[label-b][condition][path]=created &filter[label-b][condition][operator]=< &filter[label-b][condition][value]=1598713200
ͰߜΓࠐΈ
ߴͳϦιʔεͷऔಘํ๏ɿιʔτ GET /jsonapi/node/article?sort[sort-title][path]=title λΠτϧͰιʔτʢະࢦఆ࣌ঢॱʣ GET /jsonapi/node/article?sort[sort-title][path]=title &sort[sort-title][direction]=DESC λΠτϧͰ߱ॱιʔτ
ߴͳϦιʔεͷऔಘํ๏ɿϖʔδωʔγϣϯ GET /jsonapi/node/article?page[offset]=20 &page[limit]=10 Ґஔ20͔Β10ݸऔಘ
σϞΞϓϦέʔγϣϯͷߏ - όοΫΤϯυ - Drupal 8 - ϑϩϯτΤϯυ - React
DEMO https://github.com/DrupalizeMe/react-and-drupal-examples
JSON:API ೖ AGENDA Drupal ͷ Web API JSON:API ͱʁ JSON:API
ΤϯυϙΠϯτ CRUDΦϖϨʔγϣϯ ߴͳϦιʔεͷऔಘํ๏ σϞ Q&A
ࢀߟࢿྉ • JSON:API υΩϡϝϯτ ◦ https://www.drupal.org/docs/core-modules-and-themes/core-modules/ jsonapi-module • JSON API
◦ https://jsonapi.org • ༻ͨ͠σϞΞϓϦͷιʔείʔυ ◦ https://github.com/DrupalizeMe/react-and-drupal-examples • JSON:APIͷσϞಈը (Dries Buytaert) ◦ https://youtu.be/zEsNlAeYRn8
None