Overview
This article provides details about the REST - KnowledgeArticle API call that Kayako Classic uses, including its field types, arguments, and responses.
- GET /Knowledgebase/Article/ListAll/$categoryid$/$count$/$start$/$sortField$/$sortOrder$
- GET /Knowledgebase/Article
- GET /Knowledgebase/Article/$id$
- POST /Knowledgebase/Article
- PUT /Knowledgebase/Article/$id$
- DELETE /Knowledgebase/Article/$id$
Information
GET /Knowledgebase/Article/ListAll/$categoryid$/$count$/$start$/$sortField$/$sortOrder$
Retrieve a list of articles identified by $categoryid$.
Arguments
Red=required
Name |
Description |
$categoryid$ | The knowledgebase category ID |
$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
<kbarticles>
<kbarticle>
<kbarticleid><![CDATA[1]]]]><![CDATA[></kbarticleid>
<contents><![CDATA[Contents]]]]>
<![CDATA[></contents><contentstext>
<![CDATA[Contents]]]]><![CDATA[>
</contentstext><categories><categoryid>
<![CDATA[0]]]]><![CDATA[></categoryid>
</categories>
<creator><![CDATA[2]]]]><![CDATA[></creator>
<creatorid><![CDATA[1]]]]><![CDATA[></creatorid>
<author><![CDATA[Simaranjit Singh]]]]><![CDATA[></author>
<email><![CDATA[email@domain.com]]]]><![CDATA[></email>
<subject><![CDATA[Subject]]]]><![CDATA[></subject>
<isedited><![CDATA[1]]]]><![CDATA[></isedited>
<editeddateline><![CDATA[1336757517]]]]><![CDATA[></editeddateline>
<editedstaffid><![CDATA[1]]]]><![CDATA[></editedstaffid>
<views><![CDATA[24]]]]><![CDATA[></views>
<isfeatured><![CDATA[0]]]]><![CDATA[></isfeatured>
<allowcomments><![CDATA[1]]]]><![CDATA[></allowcomments>
<totalcomments><![CDATA[0]]]]><![CDATA[></totalcomments>
<hasattachments><![CDATA[1]]]]><![CDATA[></hasattachments>
<attachments>
<attachment>
<id><![CDATA[4]]]]><![CDATA[></id>
<filename><![CDATA[photo.jpg]]]]><![CDATA[></filename>
<filesize><![CDATA[88.42 KB]]]]><![CDATA[></filesize>
<link><![CDATA[http://localhost/fusiongit/trunk/api/index.php?/Knowledgebase/Article/GetAttachment/1/20]]]]><![CDATA[></link>
</attachment>
<attachment>
<id><![CDATA[5]]]]><![CDATA[></id>
<filename><![CDATA[cap_ture1.png]]]]><![CDATA[></filename>
<filesize><![CDATA[8.99 KB]]]]><![CDATA[></filesize>
<link><![CDATA[http://localhost/fusiongit/trunk/api/index.php?/Knowledgebase/Article/GetAttachment/1/20]]]]><![CDATA[></link>
</attachment>
<attachment>
<id><![CDATA[20]]]]><![CDATA[></id>
<filename><![CDATA[abcde.txt]]]]><![CDATA[></filename>
<filesize><![CDATA[0.00 KB]]]]><![CDATA[></filesize>
<link><![CDATA[http://localhost/fusiongit/trunk/api/index.php?/Knowledgebase/Article/GetAttachment/1/20]]]]><![CDATA[></link>
</attachment>
</attachments>
<dateline><![CDATA[1335437662]]]]><![CDATA[></dateline>
<articlestatus><![CDATA[1]]]]><![CDATA[></articlestatus>
<articlerating><![CDATA[0]]]]><![CDATA[></articlerating>
<ratinghits><![CDATA[0]]]]><![CDATA[></ratinghits>
<ratingcount><![CDATA[0]]]]><![CDATA[></ratingcount>
</kbarticle>
</kbarticles>
GET /Knowledgebase/Article
Retrieve a list of all articles.
Response
<kbarticles>
<kbarticle>
<kbarticleid><![CDATA[1]]]]><![CDATA[></kbarticleid>
<contents><![CDATA[Contents]]]]><![CDATA[></contents>
<contentstext><![CDATA[Contents]]]]><![CDATA[></contentstext>
<categories>
<categoryid><![CDATA[0]]]]><![CDATA[></categoryid>
</categories>
<creator><![CDATA[2]]]]><![CDATA[></creator>
<creatorid><![CDATA[1]]]]><![CDATA[></creatorid>
<author><![CDATA[Simaranjit Singh]]]]><![CDATA[></author>
<email><![CDATA[email@domain.com]]]]><![CDATA[></email>
<subject><![CDATA[Subject]]]]><![CDATA[></subject>
<isedited><![CDATA[1]]]]><![CDATA[></isedited>
<editeddateline><![CDATA[1336757517]]]]><![CDATA[></editeddateline>
<editedstaffid><![CDATA[1]]]]><![CDATA[></editedstaffid>
<views><![CDATA[24]]]]><![CDATA[></views>
<isfeatured><![CDATA[0]]]]><![CDATA[></isfeatured>
<allowcomments><![CDATA[1]]]]><![CDATA[></allowcomments>
<totalcomments><![CDATA[0]]]]><![CDATA[></totalcomments>
<hasattachments><![CDATA[1]]]]><![CDATA[></hasattachments>
<attachments>
<attachment>
<id><![CDATA[4]]]]><![CDATA[></id>
<filename><![CDATA[photo.jpg]]]]><![CDATA[></filename>
<filesize><![CDATA[88.42 KB]]]]><![CDATA[></filesize>
<link><![CDATA[http://localhost/fusiongit/trunk/api/index.php?/Knowledgebase/Article/GetAttachment/1/20]]]]><![CDATA[></link>
</attachment>
<attachment>
<id><![CDATA[5]]]]><![CDATA[></id>
<filename><![CDATA[cap_ture1.png]]]]><![CDATA[></filename>
<filesize><![CDATA[8.99 KB]]]]><![CDATA[></filesize>
<link><![CDATA[http://localhost/fusiongit/trunk/api/index.php?/Knowledgebase/Article/GetAttachment/1/20]]]]><![CDATA[></link>
</attachment>
<attachment>
<id><![CDATA[20]]]]><![CDATA[></id>
<filename><![CDATA[abcde.txt]]]]><![CDATA[></filename>
<filesize><![CDATA[0.00 KB]]]]><![CDATA[></filesize>
<link><![CDATA[http://localhost/fusiongit/trunk/api/index.php?/Knowledgebase/Article/GetAttachment/1/20]]]]><![CDATA[></link>
</attachments>
<dateline><![CDATA[1335437662]]]]><![CDATA[></dateline>
<articlestatus><![CDATA[1]]]]><![CDATA[></articlestatus>
<articlerating><![CDATA[0]]]]><![CDATA[></articlerating>
<ratinghits><![CDATA[0]]]]><![CDATA[></ratinghits>
<ratingcount><![CDATA[0]]]]><![CDATA[></ratingcount>
</kbarticle>
</kbarticles>
GET /Knowledgebase/Article/$id$
Retrieve an article identified by $id$.
Arguments
Red = required
Name |
Description |
$id$ | The unique numeric identifier of the knowledgebase article |
Response
<kbarticles>
<kbarticle>
<kbarticleid><![CDATA[1]]]]><![CDATA[></kbarticleid>
<contents><![CDATA[Contents]]]]><![CDATA[></contents>
<contentstext><![CDATA[Contents]]]]><![CDATA[></contentstext>
<categories>
<categoryid><![CDATA[0]]]]><![CDATA[></categoryid>
</categories>
<creator><![CDATA[2]]]]><![CDATA[></creator>
<creatorid><![CDATA[1]]]]><![CDATA[></creatorid>
<author><![CDATA[Simaranjit Singh]]]]><![CDATA[></author>
<email><![CDATA[email@domain.com]]]]><![CDATA[></email>
<subject><![CDATA[Subject]]]]><![CDATA[></subject>
<isedited><![CDATA[1]]]]><![CDATA[></isedited>
<editeddateline><![CDATA[1336757517]]]]><![CDATA[></editeddateline>
<editedstaffid><![CDATA[1]]]]><![CDATA[></editedstaffid>
<views><![CDATA[24]]]]><![CDATA[></views>
<isfeatured><![CDATA[0]]]]><![CDATA[></isfeatured>
<allowcomments><![CDATA[1]]]]><![CDATA[></allowcomments>
<totalcomments><![CDATA[0]]]]><![CDATA[></totalcomments>
<hasattachments><![CDATA[1]]]]><![CDATA[></hasattachments>
<attachments>
<attachment>
<id><![CDATA[4]]]]><![CDATA[></id>
<filename><![CDATA[photo.jpg]]]]><![CDATA[></filename>
<filesize><![CDATA[88.42 KB]]]]><![CDATA[></filesize>
<link><![CDATA[http://localhost/fusiongit/trunk/api/index.php?/Knowledgebase/Article/GetAttachment/1/20]]]]><![CDATA[></link></attachment>
<attachment>
<id><![CDATA[5]]]]><![CDATA[></id>
<filename><![CDATA[cap_ture1.png]]]]><![CDATA[></filename>
<filesize><![CDATA[8.99 KB]]]]><![CDATA[></filesize>
<link><![CDATA[http://localhost/fusiongit/trunk/api/index.php?/Knowledgebase/Article/GetAttachment/1/20]]]]><![CDATA[></link>
</attachment>
<attachment>
<id><![CDATA[20]]]]><![CDATA[></id>
<filename><![CDATA[abcde.txt]]]]><![CDATA[></filename>
<filesize><![CDATA[0.00 KB]]]]><![CDATA[></filesize>
<link><![CDATA[http://localhost/fusiongit/trunk/api/index.php?/Knowledgebase/Article/GetAttachment/1/20]]]]><![CDATA[></link>
</attachment>
</attachments>
<dateline><![CDATA[1335437662]]]]><![CDATA[></dateline>
<articlestatus><![CDATA[1]]]]><![CDATA[></articlestatus>
<articlerating><![CDATA[0]]]]><![CDATA[></articlerating>
<ratinghits><![CDATA[0]]]]><![CDATA[></ratinghits>
<ratingcount><![CDATA[0]]]]><![CDATA[></ratingcount>
</kbarticle>
</kbarticles>
POST /Knowledgebase/Article
A new knowledgebase article.
Arguments (POST variables)
Red = required
Name |
Description |
subject |
The article subject |
contents |
The article contents |
creatorid |
The Staff ID |
articlestatus |
Article status. 1 for published, 2 for drafts. |
isfeatured |
Is featured. 0 is for no and 1 is for yes. |
allowcomments |
Allow comments. 0 is for no and 1 is for yes. |
categoryid |
The article category/categories. Multiple categories can be comma separated like 1, 2, 3. |
Response
<kbarticles>
<kbarticle>
<kbarticleid><![CDATA[1]]]]><![CDATA[></kbarticleid>
<contents><![CDATA[Contents]]]]><![CDATA[></contents>
<contentstext><![CDATA[Contents]]]]><![CDATA[></contentstext>
<categories>
<categoryid><![CDATA[0]]]]><![CDATA[></categoryid>
</categories>
<creator><![CDATA[2]]]]><![CDATA[></creator>
<creatorid><![CDATA[1]]]]><![CDATA[></creatorid>
<author><![CDATA[Simaranjit Singh]]]]><![CDATA[></author>
<email><![CDATA[email@domain.com]]]]><![CDATA[></email>
<subject><![CDATA[Subject]]]]><![CDATA[></subject>
<isedited><![CDATA[1]]]]><![CDATA[></isedited>
<editeddateline><![CDATA[1336757517]]]]><![CDATA[></editeddateline>
<editedstaffid><![CDATA[1]]]]><![CDATA[></editedstaffid>
<views><![CDATA[24]]]]><![CDATA[></views>
<isfeatured><![CDATA[0]]]]><![CDATA[></isfeatured>
<allowcomments><![CDATA[1]]]]><![CDATA[></allowcomments>
<totalcomments><![CDATA[0]]]]><![CDATA[></totalcomments>
<hasattachments><![CDATA[1]]]]><![CDATA[></hasattachments>
<attachments>
<attachment>
<id><![CDATA[4]]]]><![CDATA[></id>
<filename><![CDATA[photo.jpg]]]]><![CDATA[></filename>
<filesize><![CDATA[88.42 KB]]]]><![CDATA[></filesize>
<link><![CDATA[http://localhost/fusiongit/trunk/api/index.php?/Knowledgebase/Article/GetAttachment/1/20]]]]><![CDATA[></link>
</attachment>
<attachment>
<id><![CDATA[5]]]]><![CDATA[></id>
<filename><![CDATA[cap_ture1.png]]]]><![CDATA[></filename>
<filesize><![CDATA[8.99 KB]]]]><![CDATA[></filesize>
<link><![CDATA[http://localhost/fusiongit/trunk/api/index.php?/Knowledgebase/Article/GetAttachment/1/20]]]]><![CDATA[></link>
</attachment>
<attachment>
<id><![CDATA[20]]]]><![CDATA[></id>
<filename><![CDATA[abcde.txt]]]]><![CDATA[></filename>
<filesize><![CDATA[0.00 KB]]]]><![CDATA[></filesize>
<link><![CDATA[http://localhost/fusiongit/trunk/api/index.php?/Knowledgebase/Article/GetAttachment/1/20]]]]><![CDATA[></link>
</attachment>
</attachments>
<dateline><![CDATA[1335437662]]]]><![CDATA[></dateline>
<articlestatus><![CDATA[1]]]]><![CDATA[></articlestatus>
<articlerating><![CDATA[0]]]]><![CDATA[></articlerating>
<ratinghits><![CDATA[0]]]]><![CDATA[></ratinghits>
<ratingcount><![CDATA[0]]]]><![CDATA[></ratingcount>
</kbarticle>
</kbarticles>
PUT /Knowledgebase/Article/$id$
Update knowledgebase article identified by $id$.
Arguments
Red = required
Name |
Description |
editedstaffid | The staff ID |
subject | The article subject |
contents | The article contents |
articlestatus | Article status, 1 for published 2 for draft |
isfeatured | Is featured. 0 is for no and 1 is for yes |
allowcomments | Allow comments. 0 is for no and 1 is for yes |
categoryid | The article category/categories for an article. Multiple categories can be comma separated like 1, 2, 3. |
Response
<kbarticles>
<kbarticle>
<kbarticleid><![CDATA[1]]]]><![CDATA[></kbarticleid>
<contents><![CDATA[Contents]]]]><![CDATA[></contents>
<contentstext><![CDATA[Contents]]]]><![CDATA[></contentstext>
<categories>
<categoryid><![CDATA[0]]]]><![CDATA[></categoryid>
</categories>
<creator><![CDATA[2]]]]><![CDATA[></creator>
<creatorid><![CDATA[1]]]]><![CDATA[></creatorid>
<author><![CDATA[Simaranjit Singh]]]]><![CDATA[></author>
<email><![CDATA[email@domain.com]]]]><![CDATA[></email>
<subject><![CDATA[Subject]]]]><![CDATA[></subject>
<isedited><![CDATA[1]]]]><![CDATA[></isedited>
<editeddateline><![CDATA[1336757517]]]]><![CDATA[></editeddateline>
<editedstaffid><![CDATA[1]]]]><![CDATA[></editedstaffid>
<views><![CDATA[24]]]]><![CDATA[></views>
<isfeatured><![CDATA[0]]]]><![CDATA[></isfeatured>
<allowcomments><![CDATA[1]]]]><![CDATA[></allowcomments>
<totalcomments><![CDATA[0]]]]><![CDATA[></totalcomments>
<hasattachments><![CDATA[1]]]]><![CDATA[></hasattachments>
<attachments>
<attachment>
<id><![CDATA[4]]]]><![CDATA[></id>
<filename><![CDATA[photo.jpg]]]]><![CDATA[></filename>
<filesize><![CDATA[88.42 KB]]]]><![CDATA[></filesize>
<link><![CDATA[http://localhost/fusiongit/trunk/api/index.php?/Knowledgebase/Article/GetAttachment/1/20]]]]><![CDATA[></link>
</attachment>
<attachment>
<id><![CDATA[5]]]]><![CDATA[></id>
<filename><![CDATA[cap_ture1.png]]]]><![CDATA[></filename>
<filesize><![CDATA[8.99 KB]]]]><![CDATA[></filesize>
<link><![CDATA[http://localhost/fusiongit/trunk/api/index.php?/Knowledgebase/Article/GetAttachment/1/20]]]]><![CDATA[></link>
</attachment>
<attachment>
<id><![CDATA[20]]]]><![CDATA[></id>
<filename><![CDATA[abcde.txt]]]]><![CDATA[></filename>
<filesize><![CDATA[0.00 KB]]]]><![CDATA[></filesize>
<link><![CDATA[http://localhost/fusiongit/trunk/api/index.php?/Knowledgebase/Article/GetAttachment/1/20]]]]><![CDATA[></link>
</attachment>
</attachments>
<dateline><![CDATA[1335437662]]]]><![CDATA[></dateline>
<articlestatus><![CDATA[1]]]]><![CDATA[></articlestatus>
<articlerating><![CDATA[0]]]]><![CDATA[></articlerating>
<ratinghits><![CDATA[0]]]]><![CDATA[></ratinghits>
<ratingcount><![CDATA[0]]]]><![CDATA[></ratingcount>
</kbarticle>
</kbarticles>
DELETE /Knowledgebase/Article/$id$
Delete a knowledgebase article identified by $id$.
Arguments
Red = required
Name | Description |
$id$ | The unique numeric identifier of the article |