logo

パレット - カラフルに🎨

Palette — ビジュアルページビルダー、デザインの専門知識は不要です。

ライブデモ パレットをダウンロード

Scroll

JSON:APIサーバーエンドポイントドキュメント

03/04/2025, by Ivan

JSON:APIサーバーエンドポイントドキュメント

フィルター

タグIDによる記事のフィルタリング

GET

{{host}}/jsonapi/node/article?include=field_image,field_tags&sort=-created&filter[field_tags.meta.drupal_internal__tid]=2

クエリパラメータ:

パラメータ
include field_image,field_tags
sort -created
filter[field_tags.meta.drupal_internal__tid] 2

タグUUIDによる記事のフィルタリング

GET

{{host}}/jsonapi/node/article?include=field_image,field_tags&sort=-created&filter[field_tags.id]=f203b178-3672-4312-b974-4fb5ea8b35cb

クエリパラメータ:

パラメータ
include field_image,field_tags
sort -created
filter[field_tags.id] f203b178-3672-4312-b974-4fb5ea8b35cb

タイトルによる記事のフィルタリング

GET

{{host}}/jsonapi/node/article?filter[title]=Drupal CMS

クエリパラメータ:

パラメータ
filter[title] Drupal CMS

タイトルによる記事のフィルタリング(部分一致)

GET

{{host}}/jsonapi/node/article?filter[title][value]=Drupal&filter[title][operator]=CONTAINS

クエリパラメータ:

パラメータ
filter[title][value] Drupal
filter[title][operator] CONTAINS

公開ステータスによる記事のフィルタリング

GET

{{host}}/jsonapi/node/article?filter[status]=1

クエリパラメータ:

パラメータ
filter[status] 1

2024年1月1日以降に作成された記事

GET

{{host}}/jsonapi/node/article?filter[created][value]=2024-01-01T00:00:00&filter[created][operator]=>=

クエリパラメータ:

パラメータ
filter[created][value] 2024-01-01T00:00:00
filter[created][operator] >=

ページング

GET

{{host}}/jsonapi/node/article?page[limit]=5&page[offset]=0

クエリパラメータ:

パラメータ
page[limit] 5
page[offset] 0

フィルターの組み合わせ(ANDロジック)

GET

{{host}}/jsonapi/node/article?filter[status]=1&filter[field_tags.meta.drupal_internal__tid]=5

クエリパラメータ:

パラメータ
filter[status] 1
filter[field_tags.meta.drupal_internal__tid] 5

タグ

タグの取得

GET

{{host}}/jsonapi/taxonomy_term/tags?sort=name&fields[taxonomy_term--tags]=name,drupal_internal__tid

クエリパラメータ:

パラメータ
sort name
fields[taxonomy_term--tags] name,drupal_internal__tid

記事

記事一覧

GET

{{host}}/jsonapi/node/article?include=field_image,field_tags&sort=-created

クエリパラメータ:

パラメータ
include field_image,field_tags
sort -created

記事の画像

GET

{{host}}/jsonapi/node/article/b26c80d2-155c-4c7e-9135-5a4011e2ae17/field_image?resourceVersion=id%3A5

クエリパラメータ:

パラメータ
resourceVersion id:5

メニュー

メインメニュー

GET

{{host}}/jsonapi/menu_items/main

ページ

IDによるノードページ

GET

{{host}}/jsonapi/node/page?filter[nid][value]=4

クエリパラメータ:

パラメータ
filter[nid][value] 4

UUIDによるノードページ

GET

{{host}}/jsonapi/node/page/8b53db13-613e-45c4-80d7-dc81eba75f11

ウェブフォーム

ウェブフォーム

GET

{{host}}/webform/contact

ヘッダー:

キー
content-type application/json

Webform REST

POST

{{host}}/webform_rest/submit

ヘッダー:

キー
Content-Type application/json

リクエストボディ:

{
    "webform_id": "contact",
    "name": "Ivan Abramenko",
    "subject": "Webform testing submission",
    "email": "levmyshkin89@gmail.com",
    "message": "Webform testing submission"
}

認証

APIキー認証

すべてのエンドポイントは、次のヘッダーを使用したAPIキー認証を必要とします:

ヘッダー
X-API-Key {{token}}