Filtering API responses by tag category
Specify the tag_category_id
parameter to filter. The specification of this parameter takes into account the parent-child relationship of tag categories.
Content Examples
Results of filtering the following contents are as follows.
Topic ID | Title | Tag Category ID | Tag Category Name | Tag ID | Tag Name |
---|---|---|---|---|---|
1152 | Content of parent category | 7 | Parent tag category | 186 | ParentTag |
1153 | Content of child category | 8 | Child tag category | 187 | ChildTag |
1154 | Content of grandchild category | 9 | Grandchild tag category | 188 | GrandchildTag |
Tag category settings
Tag list
Content list
Filtering by tag_category_id
Filtering by tag_category_id
takes into account the parent-child relationship of tag categories, and returns a list of content with tags belonging to the specified tag category and its subcategories.
Specifying tag_category_id=[7]
Displays "Content of parent category", "Content of child category", and "Content of grandchild category".
Request URL:
https://example.g.kuroco.app/rcms-api/13/news?tag_category_id=7
Response Body:
{
"errors": [],
"messages": [],
"list": [
{
"topics_id": 1152,
"ymd": "2023-02-16",
"contents_type": 17,
"contents": "",
"subject": "Content of parent category",
・
・
・
"tags": [
{
"tag_id": 186,
"tag_nm": "ParentTag",
"open_contents_cnt": 1,
"all_contents_cnt": 1,
"inst_ymdhi": "2023-02-16T15:40:07+09:00",
"update_ymdhi": "2023-02-16T15:40:52+09:00",
"tag_category_id": 7,
・
・
・
}
],
・
・
・
},
{
"topics_id": 1153,
"ymd": "2023-02-16",
"contents_type": 54,
"contents": "",
"subject": "Content of child category",
・
・
・
"tags": [
{
"tag_id": 187,
"tag_nm": "ChildTag",
"open_contents_cnt": 1,
"all_contents_cnt": 1,
"inst_ymdhi": "2023-02-16T15:40:21+09:00",
"update_ymdhi": "2023-02-16T15:40:52+09:00",
"tag_category_id": 8,
・
・
・
}
],
・
・
・
},
{
"topics_id": 1154,
"ymd": null,
"contents_type": 55,
"contents": "",
"subject": "Content of grandchild category",
・
・
・
"tags": [
{
"tag_id": 188,
"tag_nm": "GrandchildTag",
"open_contents_cnt": 1,
"all_contents_cnt": 1,
"inst_ymdhi": "2023-02-16T15:40:34+09:00",
"update_ymdhi": "2023-02-16T15:40:52+09:00",
"tag_category_id": 9,
・
・
・
}
],
・
・
・
}
],
"pageInfo": {
"totalCnt": 3,
・
・
・
}
}
Specifying tag_category_id=[8]
Displays "Content of child category" and "Content of grandchild category".
Request URL:
https://example.g.kuroco.app/rcms-api/13/news?tag_category_id=8
Response Body:
{
"errors": [],
"messages": [],
"list": [
{
"topics_id": 1153,
"ymd": "2023-02-16",
"contents_type": 54,
"contents": "",
"subject": "Content of child category",
・
・
・
"tags": [
{
"tag_id": 187,
"tag_nm": "ChildTag",
"open_contents_cnt": 1,
"all_contents_cnt": 1,
"inst_ymdhi": "2023-02-16T15:40:21+09:00",
"update_ymdhi": "2023-02-16T15:40:52+09:00",
"tag_category_id": 8,
・
・
・
}
],
・
・
・
},
{
"topics_id": 1154,
"ymd": null,
"contents_type": 55,
"contents": "",
"subject": "Content of grandchild category",
・
・
・
"tags": [
{
"tag_id": 188,
"tag_nm": "GrandchildTag",
"open_contents_cnt": 1,
"all_contents_cnt": 1,
"inst_ymdhi": "2023-02-16T15:40:34+09:00",
"update_ymdhi": "2023-02-16T15:40:52+09:00",
"tag_category_id": 9,
・
・
・
}
],
・
・
・
}
],
"pageInfo": {
"totalCnt": 2,
・
・
・
}
}
Related Documents
Support
If you have any other questions, please contact us or check out Our Slack Community.