故障评论 创建¶
POST /api/v1/incidents/comment/{incident_uuid}/add
概述¶
路由参数¶
| 参数名 | 类型 | 必选 | 说明 |
|---|---|---|---|
| incident_uuid | string | Y | 故障uuid 允许为空: False |
Body 请求参数¶
| 参数名 | 类型 | 必选 | 说明 |
|---|---|---|---|
| comment | string | Y | 评论内容 允许为空: False 例子: comment_xxx |
| extend | json | 扩展信息 允许为空: False 例子: {} |
|
| attachmentUUIDs | array | 附件UUID列表 允许为空: False 例子: [] |
参数补充说明¶
基本参数说明
| 参数名 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
| attachmentUUIDs | array | N | 对应回复 issue 的附件列表 uuid,需先通过 /api/v1/attachment/upload 接口进行上传 |
| comment | string | Y | 评论内容 |
| extend | json | N | 扩展字段,默认传{} |
扩展字段 extend 说明
| 参数名 | 参数类型 | 是否必填 | 参数说明 |
|---|---|---|---|
| members | array | N | 期望故障通知的通知对象成员 |
| linkList | array | N | 添加链接 |
extend 字段示例:
{
"members": [
{
"type": "@",
"uuid": "acnt_xxxx32",
"exists": true
}
],
"linkList": [
{
"name": "测试",
"link": "https://xxxx",
}
]
}
请求例子¶
curl 'https://openapi.guance.com/api/v1/incidents/comment/incident_xxxx/add' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"comment":"<span class=\"mention-highlight\" data-mention=\"true\" data-uuid=\"acnt_xxx\" data-name=\"xxx\" contenteditable=\"false\">@xxxx</span> test","attachmentUUIDs":[],"extend":{"links":[],"members":[{"uuid":"acnt_xxxx","name":"xxxx","type":"@"}]}}'\
--compressed