Overview
This article provides details about the REST - KnowledgebaseAttachment API call that Kayako Classic uses, including its field types, arguments, and responses.
- GET /Knowledgebase/Attachment/ListAll/$kbarticleid$
- GET /Knowledgebase/Attachment/$kbarticleid$/$id$
- POST /Knowledgebase/Attachment
- DELETE /Knowledgebase/Attachment/ListAll/$kbarticleid$/$id$
Information
GET /Knowledgebase/Attachment/ListAll/$kbarticleid$
Retrieve a list of all the attachments that belong to a given knowledgebase article ID.
Arguments
Red = required
Name |
Description |
$kbarticleid$ | The unique numeric identifier of the knowledgebase article |
Response
<kbattachments>
<kbattachment>
<id><![CDATA[4]]]]><![CDATA[></id>
<kbarticleid><![CDATA[1]]]]><![CDATA[></kbarticleid>
<filename><![CDATA[image.jpg]]]]><![CDATA[></filename>
<filesize><![CDATA[90543]]]]><![CDATA[></filesize>
<filetype><![CDATA[image/jpeg]]]]><![CDATA[></filetype>
<dateline><![CDATA[1335819066]]]]><![CDATA[></dateline>
<contents><![CDATA[iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK==]]]]><![CDATA[></contents>
</kbattachment>
<kbattachment>
<id><![CDATA[4]]]]><![CDATA[></id>
<kbarticleid><![CDATA[1]]]]><![CDATA[></kbarticleid>
<filename><![CDATA[image1.jpg]]]]><![CDATA[></filename>
<filesize><![CDATA[90549]]]]><![CDATA[></filesize>
<filetype><![CDATA[image/jpeg]]]]><![CDATA[></filetype>
<dateline><![CDATA[1335819066]]]]><![CDATA[></dateline>
<contents><![CDATA[iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK==]]]]><![CDATA[></contents>
</kbattachment>
</kbattachments>
GET /Knowledgebase/Attachment/$kbarticleid$/$id$
Retrieve an attachment identified by $id$.
Arguments
Red = required
Name |
Description |
$kbarticleid$ | The unique numeric identifier of the knowledgebase article |
$id$ | The unique numeric identifier of the attachment. |
Response
<kbattachments>
<kbattachment>
<id><![CDATA[4]]]]><![CDATA[></id>
<kbarticleid><![CDATA[1]]]]><![CDATA[></kbarticleid>
<filename><![CDATA[image.jpg]]]]><![CDATA[></filename>
<filesize><![CDATA[90543]]]]><![CDATA[></filesize>
<filetype><![CDATA[image/jpeg]]]]><![CDATA[></filetype>
<dateline><![CDATA[1335819066]]]]><![CDATA[></dateline>
<contents><![CDATA[iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK==]]]]><![CDATA[></contents>
</kbattachment>
</kbattachments>
POST /Knowledgebase/Attachment
Create a new knowledgebase attachment.
Arguments (POST variables)
Red = required
Name |
Description |
kbarticleid | The knowledgebase article ID. |
filename | The uploaded file name. |
contents | The BASE64 encoded attachment contents |
Response
<kbattachments>
<kbattachment>
<id><![CDATA[4]]]]><![CDATA[></id>
<kbarticleid><![CDATA[1]]]]><![CDATA[></kbarticleid>
<filename><![CDATA[image.jpg]]]]><![CDATA[></filename>
<filesize><![CDATA[90543]]]]><![CDATA[></filesize>
<filetype><![CDATA[image/jpeg]]]]><![CDATA[></filetype>
<dateline><![CDATA[1335819066]]]]><![CDATA[></dateline>
<contents><![CDATA[iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK==]]]]><![CDATA[></contents>
</kbattachment>
</kbattachments>
DELETE /Knowledgebase/Attachment/ListAll/$kbarticleid$/$id$
Delete a knowledgebase attachment identified by $id$.
Arguments
Red = required
Name |
Descriptionn |
$kbarticleid$ | The unique numeric identifier of the article |
$id$ | The unique numeric identifier of the attachment |