Overview
This article provides details about the REST - TicketAttachment API call that Kayako Classic uses, including its field types, arguments, and responses.
- GET /Tickets/TicketAttachment/ListAll/$ticketid$
- GET /Tickets/TicketAttachment/$ticketid$/$id$
- GET /Tickets/TicketPost/ListAll/$ticketid$/$ticketpostid$
- POST /Tickets/TicketAttachment
- DELETE /Tickets/TicketAttachment//$ticketid$/$id$
Information
GET /Tickets/TicketAttachment/ListAll/$ticketid$
Retrieve a list of a ticket's attachments.
Arguments
Red = required
Name |
Description |
$ticketid$ | The unique numeric identifier of the ticket. |
Response
<attachments>
<attachment>
<id>1</id>
<ticketid>1</ticketid>
<ticketpostid>1</ticketpostid>
<filename>icon_chart.gif</filename>
<filesize>541</filesize>
<filetype>image/gif</filetype>
<dateline>1296645496</dateline>
</attachment>
</attachments>
GET /Tickets/TicketAttachment/$ticketid$/$id$
Retrieve the attachment identified by $id$ that belongs to a ticket identified by $ticketid$.
The attachment contents are base64@wikipediaencoded.
Arguments
Red = required
Name |
Description |
$ticketid$ | The unique numeric identifier of the ticket |
$id$ | The unique numeric identifier of the attachment |
Response
<attachments>
<attachment>
<id>1</id>
<ticketid>1</ticketid>
<ticketpostid>1</ticketpostid>
<filename>icon_chart.gif</filename>
<filesize>541</filesize>
<filetype>image/gif</filetype>
<dateline>1296645496</dateline>
<contents><![CDATA[iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGvSURBVDjLpZO7alZREEbXiSdqJJDKYJNCkPBXYq12prHwBezSCpaidnY+graCYO0DpLRTQcR3EFLl8p+9525xgkRIJJApB2bN+gZmqCouU+NZzVef9isyUYeIRD0RTz482xouBBBNHi5u4JlkgUfx+evhxQ2aJRrJ/oFjUWysXeG45cUBy+aoJ90Sj0LGFY6anw2o1y/mK2ZS5pQ50+2XiBbdCvPk+mpw2OM/Bo92IJMhgiGCox+JeNEksIC11eLwvAhlzuAO37+BG9y9x3FTuiWTzhH61QFvdg5AdAZIB3Mw50AKsaRJYlGsX0tymTzf2y1TR9WwbogYY3ZhxR26gBmocrxMuhZNE435FtmSx1tP8QgiHEvj45d3jNlONouAKrjjzWaDv4CkmmNu/Pz9CzVh++Yd2rIz5tTnwdZmAzNymXT9F5AtMFeaTogJYkJfdsaaGpyO4E62pJ0yUCtKQFxo0hAT1JU2CWNOJ5vvP4AIcKeao17c2ljFE8SKEkVdWWxu42GYK9KE4c3O20pzSpyyoCx4v/6ECkCTCqccKorNxR5uSXgQnmQkw2Xf+Q+0iqQ9Ap64TwAAAABJRU5ErkJggg==]]]]><![CDATA[></contents>
</attachment>
</attachments>
GET /Tickets/TicketPost/ListAll/$ticketid$/$ticketpostid$
Retrieve a list of the ticket's attachments of the ticket post.
Arguments
Red = required
Name |
Description |
$ticketid$ | The unique numeric identifier of the ticket |
$ticketpostid$ | The unique numeric identifier of the ticket post |
Response
<attachments>
<attachment>
<id>1</id>
<ticketid>1</ticketid>
<ticketpostid>1</ticketpostid>
<filename>icon_chart.gif</filename>
<filesize>541</filesize>
<filetype>image/gif</filetype>
<dateline>1296645496</dateline>
<contents><![CDATA[iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGvSURBVDjLpZO7alZREEbXiSdqJJDKYJNCkPBXYq12prHwBezSCpaidnY+graCYO0DpLRTQcR3EFLl8p+9525xgkRIJJApB2bN+gZmqCouU+NZzVef9isyUYeIRD0RTz482xouBBBNHi5u4JlkgUfx+evhxQ2aJRrJ/oFjUWysXeG45cUBy+aoJ90Sj0LGFY6anw2o1y/mK2ZS5pQ50+2XiBbdCvPk+mpw2OM/Bo92IJMhgiGCox+JeNEksIC11eLwvAhlzuAO37+BG9y9x3FTuiWTzhH61QFvdg5AdAZIB3Mw50AKsaRJYlGsX0tymTzf2y1TR9WwbogYY3ZhxR26gBmocrxMuhZNE435FtmSx1tP8QgiHEvj45d3jNlONouAKrjjzWaDv4CkmmNu/Pz9CzVh++Yd2rIz5tTnwdZmAzNymXT9F5AtMFeaTogJYkJfdsaaGpyO4E62pJ0yUCtKQFxo0hAT1JU2CWNOJ5vvP4AIcKeao17c2ljFE8SKEkVdWWxu42GYK9KE4c3O20pzSpyyoCx4v/6ECkCTCqccKorNxR5uSXgQnmQkw2Xf+Q+0iqQ9Ap64TwAAAABJRU5ErkJggg==]]]]><![CDATA[></contents>
</attachment>
</attachments>
POST /Tickets/TicketAttachment
Add an attachment to a ticket post.
Arguments (POST variables)
Red = required
Name |
Description |
ticketid | The unique numeric identifier of the ticket. |
ticketpostid | The unique numeric identifier of the ticket post. |
filename | The file name for the attachment |
contents | The BASE64 encoded attachment contents |
Response
<attachments>
<attachment>
<id>1</id>
<ticketid>1</ticketid>
<ticketpostid>1</ticketpostid>
<filename>icon_chart.gif</filename>
<filesize>541</filesize>
<filetype>image/gif</filetype>
<dateline>1296645496</dateline>
</attachment>
</attachments>
DELETE /Tickets/TicketAttachment//$ticketid$/$id$
Delete an attachment identified by $id$ which belongs to a ticket identified by $ticketid$.
Argument
Red = required
Name |
Description |
$ticketid$ | The unique numeric identifier of the ticket. |
$id$ |
The unique numeric identifier of the attachment |