Overview
This article provides details about the REST - KnowledgebaseCategory API call that Kayako Classic uses, including its field types, arguments, and responses.
- GET /Knowledgebase/Category/ListAll/$count$/$start$$sortField$/$sortOrder$
- GET /Knowledgebase/Category/$id$
- POST /Knowledgebase/Category/
- PUT /Knowledgebase/Category/$id$
- DELETE /Knowledgebase/Category/$id$
Information
GET /Knowledgebase/Category/ListAll/$count$/$start$$sortField$/$sortOrder$
Retrieve a list of all categories.
Arguments
Name |
Description |
$count$ | Items count for retrieval |
$start$ | Start item for retrieval |
$sortField$ | Sort items according to a single specified field |
$sortOrder$ | Sort items according to a single specified order |
Response
<kbcategories>
<kbcategory>
<id><![CDATA[70]]]]><![CDATA[></id>
<parentkbcategoryid><![CDATA[0]]]]><![CDATA[></parentkbcategoryid>
<staffid><![CDATA[1]]]]><![CDATA[></staffid>
<title><![CDATA[category title]]]]><![CDATA[></title>
<totalarticles><![CDATA[1]]]]><![CDATA[></totalarticles>
<categorytype><![CDATA[4]]]]><![CDATA[></categorytype>
<displayorder><![CDATA[6]]]]><![CDATA[></displayorder>
<allowcomments><![CDATA[1]]]]><![CDATA[></allowcomments>
<uservisibilitycustom><![CDATA[0]]]]><![CDATA[></uservisibilitycustom>
<usergroupidlist>
<usergroupid><![CDATA[1]]]]><![CDATA[></usergroupid>
</usergroupidlist>
<staffvisibilitycustom><![CDATA[0]]]]><![CDATA[></staffvisibilitycustom>
<staffgroupidlist>
<staffgroupid><![CDATA[1]]]]><![CDATA[></staffgroupid>
</staffgroupidlist>
<allowrating><![CDATA[1]]]]><![CDATA[></allowrating>
<ispublished><![CDATA[1]]]]><![CDATA[></ispublished>
</kbcategory>
<kbcategory>
<id><![CDATA[79]]]]><![CDATA[></id>
<parentkbcategoryid><![CDATA[0]]]]><![CDATA[></parentkbcategoryid>
<staffid><![CDATA[1]]]]><![CDATA[></staffid>
<title><![CDATA[The next one]]]]><![CDATA[></title>
<totalarticles><![CDATA[6]]]]><![CDATA[></totalarticles>
<categorytype><![CDATA[4]]]]><![CDATA[></categorytype>
<displayorder><![CDATA[7]]]]><![CDATA[></displayorder>
<allowcomments><![CDATA[1]]]]><![CDATA[></allowcomments>
<uservisibilitycustom><![CDATA[0]]]]><![CDATA[></uservisibilitycustom>
<usergroupidlist>
<usergroupid><![CDATA[1]]]]><![CDATA[></usergroupid>
</usergroupidlist>
<staffvisibilitycustom><![CDATA[0]]]]><![CDATA[></staffvisibilitycustom>
<staffgroupidlist>
<staffgroupid><![CDATA[1]]]]><![CDATA[></staffgroupid>
</staffgroupidlist>
<allowrating><![CDATA[1]]]]><![CDATA[></allowrating>
<ispublished><![CDATA[1]]]]><![CDATA[></ispublished>
</kbcategory>
</kbcategories>
GET /Knowledgebase/Category/$id$
Retrieve a category identified by $id$.
Arguments
Red = required
Name |
Description |
$id$ | The unique numeric identifier of the knowledgebase category |
Response
<kbcategories>
<kbcategory>
<id><![CDATA[70]]]]><![CDATA[></id>
<parentkbcategoryid><![CDATA[0]]]]><![CDATA[></parentkbcategoryid>
<staffid><![CDATA[1]]]]><![CDATA[></staffid>
<title><![CDATA[category title]]]]><![CDATA[></title>
<totalarticles><![CDATA[1]]]]><![CDATA[></totalarticles>
<categorytype><![CDATA[4]]]]><![CDATA[></categorytype>
<displayorder><![CDATA[6]]]]><![CDATA[></displayorder>
<allowcomments><![CDATA[1]]]]><![CDATA[></allowcomments>
<uservisibilitycustom><![CDATA[0]]]]><![CDATA[></uservisibilitycustom>
<usergroupidlist>
<usergroupid><![CDATA[1]]]]><![CDATA[></usergroupid>
</usergroupidlist>
<staffvisibilitycustom><![CDATA[0]]]]><![CDATA[></staffvisibilitycustom>
<staffgroupidlist>
<staffgroupid><![CDATA[1]]]]><![CDATA[></staffgroupid>
</staffgroupidlist>
<allowrating><![CDATA[1]]]]><![CDATA[></allowrating>
<ispublished><![CDATA[1]]]]><![CDATA[></ispublished>
</kbcategory>
</kbcategories>
POST /Knowledgebase/Category/
Create a new knowledgebase category.
Arguments (POST variables)
Red = required, Blue = Either of the value
Name |
Description |
title | The category title |
categorytype | The category type. Global: 1, public: 2, private:3, inherit: 4 |
parentcategoryid | The parent category ID |
displayorder | The display order. |
articlesortorder | The article sort order. Sort inherti: 1, sort title: 2, sort rating: 3, sort creationdate: 4, sort displayorder: 5 |
allowcomments | Allow comments |
allowrating | Allow rating |
ispublished | Toggle the published yes/no property using this flag. |
uservisibilitycustom | Toogle the user visibility custom yes/no property using this flag |
usergroupidlist | The user group ID list. Multiple values can be comma separated like 1,2,3 |
staffgroupidlist | The staff group ID list. Multiple values can be comma separated like 1,2,3 |
staffid | The creator staff ID |
Response
<kbcategories>
<kbcategory>
<id><![CDATA[70]]]]><![CDATA[></id>
<parentkbcategoryid><![CDATA[0]]]]><![CDATA[></parentkbcategoryid>
<staffid><![CDATA[1]]]]><![CDATA[></staffid>
<title><![CDATA[category title]]]]><![CDATA[></title>
<totalarticles><![CDATA[1]]]]><![CDATA[></totalarticles>
<categorytype><![CDATA[4]]]]><![CDATA[></categorytype>
<displayorder><![CDATA[6]]]]><![CDATA[></displayorder>
<allowcomments><![CDATA[1]]]]><![CDATA[></allowcomments>
<uservisibilitycustom><![CDATA[0]]]]><![CDATA[></uservisibilitycustom>
<usergroupidlist>
<usergroupid><![CDATA[1]]]]><![CDATA[></usergroupid>
</usergroupidlist>
<staffvisibilitycustom><![CDATA[0]]]]><![CDATA[></staffvisibilitycustom>
<staffgroupidlist>
<staffgroupid><![CDATA[1]]]]><![CDATA[></staffgroupid>
</staffgroupidlist>
<allowrating><![CDATA[1]]]]><![CDATA[></allowrating>
<ispublished><![CDATA[1]]]]><![CDATA[></ispublished>
</kbcategory>
</kbcategories>
PUT /Knowledgebase/Category/$id$
Update the knowledgebase category identified by $id$.
Arguments
Red = required, Blue = Either of the value
Name |
Description |
title | The category title |
categorytype | The category type. Global: 1, public: 2, private:3, inherit: 4 |
parentcategoryid | The parent category ID |
displayorder | The display order |
articledisplayorder | The article sort order. Sort inherti: 1, sort title: 2, sort rating: 3, sort creationdate: 4, sort displayorder: 5 |
allowcomments | Allow comments. 0 is for no and 1 is for yes. |
allowrating | Allow rating. 0 is for no, 1 is for yes |
ispublished | Toggle the published yes/no property using this flag |
uservisibilitycustom | Toggle the user visibility custom yes/no property using this flag |
usergroupidlist | The user group ID list. Multiple values can be comma separated like 1,2,3 |
staffvisibilitycustom | Toggle the staff visibility custom yes/no property using this flag |
staffgroupidlist | The staff group ID list. Multiple values can be comma separated like 1,2,3 |
Response
<kbcategories>
<kbcategory>
<id><![CDATA[70]]]]><![CDATA[></id>
<parentkbcategoryid><![CDATA[0]]]]><![CDATA[></parentkbcategoryid>
<staffid><![CDATA[1]]]]><![CDATA[></staffid>
<title><![CDATA[category title]]]]><![CDATA[></title>
<totalarticles><![CDATA[1]]]]><![CDATA[></totalarticles>
<categorytype><![CDATA[4]]]]><![CDATA[></categorytype>
<displayorder><![CDATA[6]]]]><![CDATA[></displayorder>
<allowcomments><![CDATA[1]]]]><![CDATA[></allowcomments>
<uservisibilitycustom><![CDATA[0]]]]><![CDATA[></uservisibilitycustom>
<usergroupidlist><usergroupid><![CDATA[1]]]]><![CDATA[></usergroupid>
</usergroupidlist>
<staffvisibilitycustom><![CDATA[0]]]]><![CDATA[></staffvisibilitycustom>
<staffgroupidlist>
<staffgroupid><![CDATA[1]]]]><![CDATA[></staffgroupid>
</staffgroupidlist>
<allowrating><![CDATA[1]]]]><![CDATA[></allowrating>
<ispublished><![CDATA[1]]]]><![CDATA[></ispublished>
</kbcategory>
</kbcategories>
DELETE /Knowledgebase/Category/$id$
Delete a knowledgebase category identified by $id$.
Arguments
Red = required
Name |
Description |
$id$ | The unique numeric identifier of the article |