スキーマ
スキーマはtagオブジェクトに存在するすべてのフィールドを定義しています。
id integer |
Unique identifier for the resource. 読み取り専用 コンテキスト: |
count integer |
Number of published posts for the resource. 読み取り専用 コンテキスト: |
description string |
HTML description of the resource. コンテキスト: |
link string, uri |
URL to the resource. 読み取り専用 コンテキスト: |
name string |
HTML title for the resource. コンテキスト: |
slug string |
An alphanumeric identifier for the resource unique to its type. コンテキスト: |
taxonomy string |
Type attribution for the resource. 読み取り専用 コンテキスト: 次のいずれか: |
Example Request
$ curl -X OPTIONS -i http://demo.wp-api.org/wp-json/wp/v2/tags
Tag一覧
引数
context |
Scope under which the request is made; determines fields present in response.
初期値: 次のいずれか: |
page |
Current page of the collection.
初期値: |
per_page |
Maximum number of items to be returned in result set.
初期値: |
search |
Limit results to those matching a string. |
exclude |
Ensure result set excludes specific ids.
初期値: |
include |
Limit result set to specific ids.
初期値: |
offset |
Offset the result set by a specific number of items. |
order |
Order sort attribute ascending or descending.
初期値: 次のいずれか: |
orderby |
Sort collection by resource attribute.
初期値: 次のいずれか: |
hide_empty |
Whether to hide resources not assigned to any posts. |
post |
Limit result set to resources assigned to a specific post. |
slug |
Limit result set to resources with a specific slug. |
定義
GET /wp/v2/tags
リクエスト例
$ curl http://demo.wp-api.org/wp-json/wp/v2/tags
Tagを取得する
引数
context |
Scope under which the request is made; determines fields present in response.
初期値: 次のいずれか: |
定義
GET /wp/v2/tags/<id>
リクエスト例
$ curl http://demo.wp-api.org/wp-json/wp/v2/tags/<id>
Tagを作成
引数
description |
HTML description of the resource. |
name |
HTML title for the resource. 必須: true |
slug |
An alphanumeric identifier for the resource unique to its type. |
定義
POST /wp/v2/tags
Tagを更新する
引数
description |
HTML description of the resource. |
name |
HTML title for the resource. |
slug |
An alphanumeric identifier for the resource unique to its type. |
定義
POST /wp/v2/tags/<id>
リクエスト例
Tagを削除
引数
force |
Required to be true, as resource does not support trashing. |
定義
DELETE /wp/v2/tags/<id>
リクエスト例
$ curl -X DELETE http://demo.wp-api.org/wp-json/wp/v2/tags/<id>