POST https://api.groovehq.com/v1/kb/:knowledge_base_id/categories
Name | Type | Required | Default | Notes |
---|---|---|---|---|
article_ids | array | No | The array of category IDs to associate with this category. | |
author_id | string | No | OAuth user | The ID of the user set as the author of the category. |
description | string | No | The description of the category. | |
meta_description | string | No | description |
The meta tag description of the category. |
meta_robots | string | No | INDEX,FOLLOW | The meta robots values of the category. |
og_description | string | No | description |
The open graph meta description of the category. |
og_image_url | string | No | The URL to the open graph meta image of the category. | |
og_title | string | No | title |
The open graph title of the category. |
page_title | string | No | title |
The HTML page title of the category. |
slug | string | No | title |
The slug of the category. |
title | string | No | The title of the category. |
curl -i -X POST https://api.groovehq.com/v1/kb/4216430596/categories \
-H "Authorization: Bearer $GROOVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Uncategorized"
}'
Status: 201 Created
{
"category": {
"id": "5249150327",
"articles_count": 0,
"article_ids": [],
"author_id": "0412191130",
"cover_image_url": null,
"created_at": "2019-10-31T08:48:00Z",
"description": null,
"featured": false,
"knowledge_base_id": "4216430596",
"meta_description": null,
"meta_robots": "INDEX,FOLLOW",
"og_description": null,
"og_image_url": null,
"og_title": null,
"page_title": null,
"position": 1,
"published_at": null,
"slug": "uncategorized",
"state": "draft",
"title": "Uncategorized",
"updated_at": "2019-10-31T08:48:00Z"
}
}
GET https://api.groovehq.com/v1/kb/:knowledge_base_id/categories/search
Name | Type | Required | Default | Notes |
---|---|---|---|---|
keyword | string | Yes | The keyword to search the categories by. Use "*" for all. | |
author_id | string | No | The author ID to filter search results by. | |
order | string | No | The sortable field name and direction (asc ascending or desc descending) to order search results by. | |
page | intger | No | 1 | The page number of the search results. |
per_page | integer | No | 25 | The number of search results per page. |
state | string | No | The category state to filter search results by. | |
unpaginated | boolean | No | false | Whether to return unpaginated search results. Maximum number of results is 100. |
A category can be in one of the following states:
draft
- Created category, not published.published
- Published category, visible to end-users.wip
- New version being edited, while current version is published.Category search results can be ordered by one of the following fields:
articles_count
- Order by number of articles.position
- Order by position.title
- Order by title.updated_at
- Order by last updated timestamp.curl -i -X GET https://api.groovehq.com/v1/kb/4216430596/categories/search?keyword=* \
-H "Authorization: Bearer $GROOVE_API_KEY" \
-H "Content-Type: application/json"
Status: 200 OK
{
"categories": [
{
"id": "5249150327",
"articles_count": 0,
"article_ids": [],
"author_id": "0412191130",
"cover_image_url": null,
"created_at": "2019-10-31T08:48:00Z",
"description": null,
"featured": false,
"knowledge_base_id": "4216430596",
"meta_description": null,
"meta_robots": "INDEX,FOLLOW",
"og_description": null,
"og_image_url": null,
"og_title": null,
"page_title": null,
"position": 1,
"published_at": null,
"slug": "uncategorized",
"state": "draft",
"title": "Uncategorized",
"updated_at": "2019-10-31T08:48:00Z"
}
],
"meta": {
"pagination": {
"current_page": 0,
"total_pages": 1,
"total_count": 1
}
}
}
PUT https://api.groovehq.com/v1/kb/:knowledge_base_id/categories/reposition
Name | Type | Required | Default | Notes |
---|---|---|---|---|
ids | array | Yes | The array of category IDs ordered by position. |
curl -i -X PUT https://api.groovehq.com/v1/kb/4216430596/categories/reposition \
-H "Authorization: Bearer $GROOVE_API_KEY" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'ids[]=1723475590&ids[]=5249150327'
Status: 200 OK
{
"categories": [
{
"id": "1723475590",
"position": 1
},
{
"id": "5249150327",
"position": 2
}
]
}
GET https://api.groovehq.com/v1/kb/:knowledge_base_id/categories/counts
Name | Type | Required | Default | Notes |
---|---|---|---|---|
keyword | string | Yes | The keyword to search the categories by. Use "*" for all. | |
groups | string | No | The comma separated list of group count fields. |
state
- Number of categories groupped by state.curl -i -X GET https://api.groovehq.com/v1/kb/4216430596/categories/counts?keyword=*&groups=state \
-H "Authorization: Bearer $GROOVE_API_KEY" \
-H "Content-Type: application/json"
Status: 200 OK
{
"total_count": 2,
"counts": {
"state": {
"draft": 1,
"published": 1
}
}
}
GET https://api.groovehq.com/v1/kb/:knowledge_base_id/categories/:id
curl -i -X GET https://api.groovehq.com/v1/kb/4216430596/categories/5249150327 \
-H "Authorization: Bearer $GROOVE_API_KEY" \
-H "Content-Type: application/json"
Status: 200 OK
{
"category": {
"id": "5249150327",
"articles_count": 0,
"article_ids": [],
"author_id": "0412191130",
"cover_image_url": null,
"created_at": "2019-10-31T08:48:00Z",
"description": null,
"featured": false,
"knowledge_base_id": "4216430596",
"meta_description": null,
"meta_robots": "INDEX,FOLLOW",
"og_description": null,
"og_image_url": null,
"og_title": null,
"page_title": null,
"position": 1,
"published_at": null,
"slug": "uncategorized",
"state": "draft",
"title": "Uncategorized",
"updated_at": "2019-10-31T08:48:00Z"
}
}
PUT https://api.groovehq.com/v1/kb/:knowledge_base_id/categories/:id
Name | Type | Required | Default | Notes |
---|---|---|---|---|
article_ids | array | No | The array of category IDs to associate with this category. | |
author_id | string | No | OAuth user | The ID of the user set as the author of the category. |
description | string | No | The description of the category. | |
meta_description | string | No | description |
The meta tag description of the category. |
meta_robots | string | No | INDEX,FOLLOW | The meta robots values of the category. |
og_description | string | No | description |
The open graph meta description of the category. |
og_image_url | string | No | The URL to the open graph meta image of the category. | |
og_title | string | No | title |
The open graph title of the category. |
page_title | string | No | title |
The HTML page title of the category. |
slug | string | No | title |
The slug of the category. |
title | string | No | The title of the category. |
curl -i -X PUT https://api.groovehq.com/v1/kb/4216430596/categories/5249150327 \
-H "Authorization: Bearer $GROOVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Default category",
"slug": "default-category"
}'
Status: 200 OK
{
"category": {
"id": "5249150327",
"articles_count": 0,
"article_ids": [],
"author_id": "0412191130",
"cover_image_url": null,
"created_at": "2019-10-31T08:48:00Z",
"description": null,
"featured": false,
"knowledge_base_id": "4216430596",
"meta_description": null,
"meta_robots": "INDEX,FOLLOW",
"og_description": null,
"og_image_url": null,
"og_title": null,
"page_title": null,
"position": 1,
"published_at": null,
"slug": "default-category",
"state": "draft",
"title": "Default category",
"updated_at": "2019-10-31T08:48:00Z"
}
}
PUT https://api.groovehq.com/v1/kb/:knowledge_base_id/categories/:id/publish
curl -i -X PUT https://api.groovehq.com/v1/kb/4216430596/categories/5249150327/publish \
-H "Authorization: Bearer $GROOVE_API_KEY" \
-H "Content-Type: application/json"
Status: 200 OK
{
"category": {
"id": "5249150327",
"articles_count": 0,
"article_ids": [],
"author_id": "0412191130",
"cover_image_url": null,
"created_at": "2019-10-31T08:48:00Z",
"description": null,
"featured": false,
"knowledge_base_id": "4216430596",
"meta_description": null,
"meta_robots": "INDEX,FOLLOW",
"og_description": null,
"og_image_url": null,
"og_title": null,
"page_title": null,
"position": 1,
"published_at": "2019-10-31T09:10:29+00:00",
"slug": "default-category",
"state": "published",
"title": "Default category",
"updated_at": "2019-10-31T09:10:29Z"
}
}
PUT https://api.groovehq.com/v1/kb/:knowledge_base_id/categories/:id/unpublish
curl -i -X PUT https://api.groovehq.com/v1/kb/4216430596/categories/5249150327/unpublish \
-H "Authorization: Bearer $GROOVE_API_KEY" \
-H "Content-Type: application/json"
Status: 200 OK
{
"category": {
"id": "5249150327",
"articles_count": 0,
"article_ids": [],
"author_id": "0412191130",
"cover_image_url": null,
"created_at": "2019-10-31T08:48:00Z",
"description": null,
"featured": false,
"knowledge_base_id": "4216430596",
"meta_description": null,
"meta_robots": "INDEX,FOLLOW",
"og_description": null,
"og_image_url": null,
"og_title": null,
"page_title": null,
"position": 1,
"published_at": null,
"slug": "default-category",
"state": "draft",
"title": "Default category",
"updated_at": "2019-10-31T09:10:29Z"
}
}
PUT https://api.groovehq.com/v1/kb/:knowledge_base_id/categories/:id/revert
curl -i -X PUT https://api.groovehq.com/v1/kb/4216430596/categories/5249150327/revert \
-H "Authorization: Bearer $GROOVE_API_KEY" \
-H "Content-Type: application/json"
Status: 200 OK
{
"category": {
"id": "5249150327",
"articles_count": 0,
"article_ids": [],
"author_id": "0412191130",
"cover_image_url": null,
"created_at": "2019-10-31T08:48:00Z",
"description": null,
"featured": false,
"knowledge_base_id": "4216430596",
"meta_description": null,
"meta_robots": "INDEX,FOLLOW",
"og_description": null,
"og_image_url": null,
"og_title": null,
"page_title": null,
"position": 1,
"published_at": "2019-10-31T09:25:20Z",
"slug": "default-category",
"state": "published",
"title": "Default category 2",
"updated_at": "2019-10-31T09:25:25Z"
}
}
DELETE https://api.groovehq.com/v1/kb/:knowledge_base_id/categories/:id
curl -i -X DELETE https://api.groovehq.com/v1/kb/4216430596/categories/5249150327 \
-H "Authorization: Bearer $GROOVE_API_KEY" \
-H "Content-Type: application/json"
Status: 204 No Content