スキーマ
スキーマはtagオブジェクトに存在するすべてのフィールドを定義しています。
id integer |
Unique identifier for the term. 読み取り専用 コンテキスト: |
count integer |
Number of published posts for the term. 読み取り専用 コンテキスト: |
description string |
HTML description of the term. コンテキスト: |
link string, uri |
URL of the term. 読み取り専用 コンテキスト: |
name string |
HTML title for the term. コンテキスト: |
slug string |
An alphanumeric identifier for the term unique to its type. コンテキスト: |
taxonomy string |
Type attribution for the term. 読み取り専用 コンテキスト: 次のいずれか: |
meta object |
Meta fields. コンテキスト: |
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 term attribute.
初期値: 次のいずれか: |
hide_empty |
Whether to hide terms not assigned to any posts. |
post |
Limit result set to terms assigned to a specific post. |
slug |
Limit result set to terms with one or more specific slugs. |
定義
GET /wp/v2/tags
リクエスト例
$ curl http://demo.wp-api.org/wp-json/wp/v2/tags
Tagを取得する
引数
id |
Unique identifier for the term. |
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 term. |
name |
HTML title for the term. 必須: true |
slug |
An alphanumeric identifier for the term unique to its type. |
meta |
Meta fields. |
定義
POST /wp/v2/tags
Tagを更新する
引数
id |
Unique identifier for the term. |
description |
HTML description of the term. |
name |
HTML title for the term. |
slug |
An alphanumeric identifier for the term unique to its type. |
meta |
Meta fields. |
定義
POST /wp/v2/tags/<id>
リクエスト例
Tagを削除
引数
id |
Unique identifier for the term. |
force |
Required to be true, as terms do not support trashing. |
定義
DELETE /wp/v2/tags/<id>
リクエスト例
$ curl -X DELETE http://demo.wp-api.org/wp-json/wp/v2/tags/<id>