REST-KnowledgebaseAttachment
This topic provides details about the REST - KnowledgebaseAttachment API call that GFI HelpDesk uses, including its field types, arguments, and responses.
Retrieve a list of all the attachments that belong to a given knowledgebase article ID.
Arguments
Name | Description |
---|---|
$kbarticleid$ | The unique numeric identifier of the knowledgebase article |
Response
<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>
Retrieve an attachment identified by $id$
.
Arguments
Name | Description |
---|---|
$kbarticleid$ | The unique numeric identifier of the knowledgebase article |
$id$ | The unique numeric identifier of the attachment |
Response
<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>
Create a new knowledgebase attachment.
Arguments (POST variables)
Name | Description |
---|---|
kbarticleid | The knowledgebase article ID |
filename | The uploaded file name |
contents | TheBASE64 encodedattachment contents |
Response
<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 a knowledgebase attachment identified by $id$
.
Arguments
Name | Description |
---|---|
$kbarticleid$ | The unique numeric identifier of the article |
$id$ | The unique numeric identifier of the attachment |