更新工单
PUT /apiv2/tickets/{id}.json调用权限
agent
curl示例
curl https://{subdomain}.kf5.com/apiv2/tickets/{id}.json \
-H "Content-Type: application/json" \
-d '{"ticket":{"status":"solved", \
"comment":{"public":true, "content": "Thanks, this is now solved!"}}}' \
-v -u {email_address}:{password} -X PUT返回示例
Status: 200 OK{
"ticket": {
"id": 123,
"title": "Let's create ticket",
"status": "solved",
... }}请求参数
| Name | Type | Description |
|---|---|---|
| title | string | 标题 |
| comment | object | 工单回复,请参考 Ticket Comments API |
| assignee_id | integer | 受理客服id |
| group_id | integer | 受理客服组id |
| type | string | 可选值:"problem", "incident", "question", "task" |
| status | string | 可选值:"new","open", "pending", "solved", "closed" |
| priority | string | 可选值:"low", "medium", "high", "urgent" |
| problem_id | integer | 类型为incident时,关联的故障工单id |
| due_at | date | 类型为task时,截止日期 |
| tags | array | 要给工单添加的标签数组 |
| collaborator_ids | array | 副本用户数组 |
| custom_fields | array | 工单自定义字段 [{"name":"field_788","value":"自定义字段"}] |
示例请求
{
"ticket":{
"status": "solved",
"comment":{
"content": "the content",
"html_content": "the content",
"public": true,
"uploads": {"token":"0015ce392ec1919d564e63a46e54eb8"}
},
"custom_fields":[
{"name":"field_1014099","value":"技术支持申请/"},
{"name":"field_1014205","value":"[\"服务器品牌\",\"DELL\"]"}
],
"tags":["t3","t4"],
"due_at":"2019-04-09 18:00:10",
"collaborator_ids":["60058513"]
}
}