Ticket Comments 工单回复接口

JSON格式

NameTypeRead-onlyComment
idintegeryes回复id,由系统自动分配
contentstringyes工单回复文本内容
html_contentstringyes工单回复html内容
voice_urlstringyes语音回复的url链接
publicbooleanyes私密性,false则只有客服可见
author_idintegeryes回复的用户id
author_namestringyes回复的用户名称
author_photostringyes回复的用户头像图片的url地址
created_atdateyes回复的时间
attachmentsarrayyes回复所带的附件,请参照 Attachments API

JSON 示例

{
  "id": 2060,
  "content": "the content",
  "html_content": "the content",
  "public": true,
  "created_at": "2014-03-05 18:40:33",
  "author_id": 733,
  "attachments": [
    {
     "id": 1743,
     "url": "https://support.kf5.com/apiv2/attachments/1743.json",
     "name": "测试.jpg",
     "size": 577,
     "content_url": "https://support.kf5.com/attachments/download/1743/d82e779e28719c5623af75c6fd2966b/",
     "token": "d82e779e28719c5623af75c6fd2966b"
    }
   ]
}

工单回复列表

GET /apiv2/tickets/{ticket_id}/comments.json

Note:默认按创建时间先后顺序排列,可添加排序参数:

sort_order:排序规则,可选值:asc,desc (默认为asc)

调用权限

agents

curl 示例
curl https://{subdomain}.kf5.com/apiv2/tickets/{ticket_id}/comments.json \
 -v -u {email_address}:{password}
返回示例
Status: 200 OK
{
  "comments": [
    {
      "id": 100,
      "content": "My ticket comment",
      ...
    },
    {
      "id": 101,
      "content": "My other ticket comment",
      ...
    }
  ]
}