Category

You need the Manage articles permission to manage categorys.

Categories
- Categories Manage
GET kb/categories
GET kb/categories/{id}
POST kb/categories
PUT kb/categories/{id}
DELETE kb/categories/{id}
Model
Category JSON Format

Category is represented as simple flat JSON objects with the following keys:

Name Type Description
id guid Id of the category.
kbId guid Id of the knowledage base.
name string Name of the category.
order integer Order of the category.
parentId guid Id of the parent category.
createdById guid Id of the agent who created the category.
createdTime datetime Time when the category was created.
modifiedById guid Id of the agent who modified the category.
modifiedTime timestamp Time when the category was last modified.
Endpoint
Get the list of Categories

GET kb/categories

Parameters:
Name Type In Required Description
keywords string query no Search keywords.
kbId guid query no Id of the knowledage base.
Response:

An array of   Category

Example

Sample Request:

curl https://api15.comm100.io/v4/kb/categories \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 200 OK

[{"id":"8a21934a-7def-4064-a211-3cc5295282f9","kbId":"b2754e68-b380-4a61-9c5b-a9570f1a4fcc","name":"Support","order":8,"parentId":"8a21934a-7def-4064-a211-3cc5295282f9","createdById":"21b5d834-b98b-48ba-ae45-0d1316cb382f","createdTime":"2021-04-09T10:38:47.223Z","modifiedById":"21b5d834-b98b-48ba-ae45-0d1316cb382f","modifiedTime":"2021-04-09T10:38:47.223Z"}]
Get a single Category

GET kb/categories/{id}

Parameters:
No Parameters
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/kb/categories/8a21934a-7def-4064-a211-3cc5295282f9 \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 200 OK

{"id":"8a21934a-7def-4064-a211-3cc5295282f9","kbId":"b2754e68-b380-4a61-9c5b-a9570f1a4fcc","name":"Support","order":8,"parentId":"8a21934a-7def-4064-a211-3cc5295282f9","createdById":"21b5d834-b98b-48ba-ae45-0d1316cb382f","createdTime":"2021-04-09T10:38:47.223Z","modifiedById":"21b5d834-b98b-48ba-ae45-0d1316cb382f","modifiedTime":"2021-04-09T10:38:47.223Z"}
Create a new Category

POST kb/categories

Parameters:
Name Type In Required Description
kbId guid body yes Id of the knowledage base.
name string body yes Name of the category.
order integer body no Order of the category.
parentId guid body yes Id of the parent category.
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/kb/categories \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"kbId":"b2754e68-b380-4a61-9c5b-a9570f1a4fcc","name":"Support","order":8,"parentId":"8a21934a-7def-4064-a211-3cc5295282f9"}'

Response:

 HTTP/1.1 201 Created

{"id":"8a21934a-7def-4064-a211-3cc5295282f9","kbId":"b2754e68-b380-4a61-9c5b-a9570f1a4fcc","name":"Support","order":8,"parentId":"8a21934a-7def-4064-a211-3cc5295282f9","createdById":"21b5d834-b98b-48ba-ae45-0d1316cb382f","createdTime":"2021-04-09T10:38:47.223Z","modifiedById":"21b5d834-b98b-48ba-ae45-0d1316cb382f","modifiedTime":"2021-04-09T10:38:47.223Z"}
Update the Category

PUT kb/categories/{id}

Parameters:
Name Type In Required Description
name string body yes Name of the category.
order integer body no Order of the category.
parentId guid body yes Id of the parent category.
Response:
Example

Sample Request:

curl https://api15.comm100.io/v4/kb/categories/8a21934a-7def-4064-a211-3cc5295282f9 \
-X 'PUT' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"name":"Support","order":8,"parentId":"8a21934a-7def-4064-a211-3cc5295282f9"}'

Response:

 HTTP/1.1 200 OK

{"id":"8a21934a-7def-4064-a211-3cc5295282f9","kbId":"b2754e68-b380-4a61-9c5b-a9570f1a4fcc","name":"Support","order":8,"parentId":"8a21934a-7def-4064-a211-3cc5295282f9","createdById":"21b5d834-b98b-48ba-ae45-0d1316cb382f","createdTime":"2021-04-09T10:38:47.223Z","modifiedById":"21b5d834-b98b-48ba-ae45-0d1316cb382f","modifiedTime":"2021-04-09T10:38:47.223Z"}
Remove the Category

DELETE kb/categories/{id}

Parameters:
No Parameters
Response:

No Content

Example

Sample Request:

curl https://api15.comm100.io/v4/kb/categories/8a21934a-7def-4064-a211-3cc5295282f9 \
-X 'DELETE' \
-H 'Authorization: Bearer {access_token}' \

Response:

 HTTP/1.1 204 No Content