Overview
This article provides details about the REST - KnowledgebaseComment API call that Kayako Classic uses, including its field types, arguments, and responses.
- Comment Creator Types
- Comment Statuses
- GET /Knowledgebase/Comment/ListAll/$kbarticleid$
- GET /Knowledgebase/Comment/$id$
- POST /Knowledgebase/Comment/
- Delete /Knowledgebase/Comment/$id$
Information
Comment Creator Types
Creator type |
Value |
Staff | 1 |
User | 2 |
Comment Statuses
Comment status |
Value |
Pending for approval | 1 |
Approved | 2 |
Marked as spam | 3 |
GET /Knowledgebase/Comment/ListAll/$kbarticleid$
Retrieve a list of all the comments that belong to a given knowledgebase article ID.
Arguments
Red = required
Name |
Description |
$kbarticleid$ | The unique numeric identifier of the knowledgebase article |
Response
<kbarticlecomments>
<kbarticlecomment>
<id><![CDATA[17]]]]><![CDATA[></id>
<kbarticleid><![CDATA[1]]]]><![CDATA[></kbarticleid>
<creatortype><![CDATA[2]]]]><![CDATA[></creatortype>
<creatorid><![CDATA[1]]]]><![CDATA[></creatorid>
<fullname><![CDATA[Simaranjit Singh]]]]><![CDATA[></fullname>
</email><ipaddress><![CDATA[127.0.0.1]]]]><![CDATA[></ipaddress>
<dateline><![CDATA[1339786410]]]]><![CDATA[></dateline>
<parentcommentid><![CDATA[0]]]]><![CDATA[></parentcommentid>
<commentstatus><![CDATA[2]]]]><![CDATA[></commentstatus></useragent>
<referrer><![CDATA[http://localhost/fusiongit/trunk/index.php?/Knowledgebase/Article/View/1/0/a-z]]]]><![CDATA[></referrer>
<parenturl><![CDATA[http://localhost/fusiongit/trunk/index.php?/Knowledgebase/Article/View/1]]]]><![CDATA[></parenturl>
<contents><![CDATA[Comment1]]]]><![CDATA[></contents>
</kbarticlecomment><kbarticlecomment>
<id><![CDATA[19]]]]><![CDATA[></id>
<kbarticleid><![CDATA[1]]]]><![CDATA[></kbarticleid>
<creatortype><![CDATA[2]]]]><![CDATA[></creatortype>
<creatorid><![CDATA[0]]]]><![CDATA[></creatorid>
<fullname><![CDATA[John]]]]><![CDATA[></fullname>
<email><![CDATA[john@domain.com]]]]><![CDATA[></email>
<ipaddress><![CDATA[::1]]]]><![CDATA[></ipaddress>
<dateline><![CDATA[1339787502]]]]><![CDATA[></dateline>
<parentcommentid><![CDATA[0]]]]><![CDATA[></parentcommentid>
<commentstatus><![CDATA[2]]]]><![CDATA[></commentstatus>
<useragent><![CDATA[Mozilla/5.0 (Windows NT 6.1; rv:13.0)Gecko/20100101 Firefox/13.0]]]]><![CDATA[></useragent>
<referrer><![CDATA[http://localhost/fusiongit/trunk/index.php?/Knowledgebase/Article/View/1/0/a-z]]]]><![CDATA[></referrer>
<parenturl><![CDATA[http://localhost/fusiongit/trunk/index.php?/Knowledgebase/Article/View/1]]]]><![CDATA[></parenturl>
<contents><![CDATA[Comment2]]]]><![CDATA[></contents>
</kbarticlecomment>
</kbarticlecomments>
GET /Knowledgebase/Comment/$id$
Retrieve a comment identified by $id$.
Arguments
Red = required
Name |
Description |
$id$ | The unique numeric identifier of the comment |
Response
<kbarticlecomments>
<kbarticlecomment>
<id><![CDATA[17]]]]><![CDATA[></id>
<kbarticleid><![CDATA[1]]]]><![CDATA[></kbarticleid>
<creatortype><![CDATA[2]]]]><![CDATA[></creatortype>
<creatorid><![CDATA[1]]]]><![CDATA[></creatorid>
<fullname><![CDATA[Simaranjit Singh]]]]><![CDATA[></fullname>
<email /><ipaddress><![CDATA[127.0.0.1]]]]><![CDATA[></ipaddress>
<dateline><![CDATA[1339786410]]]]><![CDATA[></dateline>
<parentcommentid><![CDATA[0]]]]><![CDATA[></parentcommentid>
<commentstatus><![CDATA[2]]]]><![CDATA[></commentstatus>
<useragent />
<referrer><![CDATA[http://localhost/fusiongit/trunk/index.php?/Knowledgebase/Article/View/1/0/a-z]]]]><![CDATA[></referrer>
<parenturl><![CDATA[http://localhost/fusiongit/trunk/index.php?/Knowledgebase/Article/View/1]]]]><![CDATA[></parenturl>
<contents><![CDATA[Comment1]]]]><![CDATA[></contents>
</kbarticlecomment>
</kbarticlecomments>
POST /Knowledgebase/Comment
Create a new knowledgebase article comment.
Arguments (POST variables)
Red = required, Blue = Either of the value
Name |
Description |
knowledgebasearticleid | The knowledgebase article ID |
contents | The comment contents |
creatortype | The creator type. Staff: 1, User: 2 |
creatorid | The creator (staff or user) ID. Needed when creator type is Staff, optional when creator type is User |
fullname | The creator (user) full name. Needed when creator type is User and creator id (user id) is not provided |
The creator email | |
parentcommentid | Parent comment ID (when replying to some comment) |
Response
<kbarticlecomments>
<kbarticlecomment>
<id><![CDATA[17]]]]><![CDATA[></id>
<kbarticleid><![CDATA[1]]]]><![CDATA[></kbarticleid>
<creatortype><![CDATA[2]]]]><![CDATA[></creatortype>
<creatorid><![CDATA[1]]]]><![CDATA[></creatorid>
<fullname><![CDATA[Simaranjit Singh]]]]><![CDATA[></fullname>
<email /><ipaddress><![CDATA[127.0.0.1]]]]><![CDATA[></ipaddress>
<dateline><![CDATA[1339786410]]]]><![CDATA[></dateline>
<parentcommentid><![CDATA[0]]]]><![CDATA[></parentcommentid>
<commentstatus><![CDATA[2]]]]><![CDATA[></commentstatus>
<useragent />
<referrer><![CDATA[http://localhost/fusiongit/trunk/index.php?/Knowledgebase/Article/View/1/0/a-z]]]]><![CDATA[></referrer>
<parenturl><![CDATA[http://localhost/fusiongit/trunk/index.php?/Knowledgebase/Article/View/1]]]]><![CDATA[></parenturl>
<contents><![CDATA[Comment1]]]]><![CDATA[></contents>
</kbarticlecomment>
</kbarticlecomments>
DELETE /Knowledgebase/Comment/$id$
Delete a knowledgebase category identified by $id$.
Arguments
Red = required
Name |
Description |
$id$ | The unique numeric identifier of the comment |