发送评论到工作项
POSThttps://your-domain/openapi/v2/project/issues/:issueID/comments
发送评论到工作项
History
Version | Changes |
---|---|
v3.14.117, v3.15.26 | Added in: v3.14.117, v3.15.26 |
v6.30.0, v6.18.14 | 修改参考例子中body为非数组形式 |
Request
Path Parameters
issueID stringrequired
工作项ID
Query Parameters
teamID stringrequired
团队ID
- application/json
Body
required
要发送的评论信息
text stringrequired
Possible values: non-empty
and <= 128 characters
评论信息
repliedMessageID string
本次评论所回复评论的ID
Responses
- 200
- 401
- 403
- 404
- 500
请求成功
- application/json
- Schema
- Example (from schema)
Schema
result stringrequired
本次请求结果,SUCCESS|FAIL
errorCode string
本次请求错误码
errorMsg string
本次请求错误信息
errorData object
本次请求错误元数据
[
{
"result": "SUCCESS"
},
{
"result": "FAIL",
"errorCode": "NotFound",
"errorMsg": "NotFound issueComment"
},
{
"result": "FAIL",
"errorCode": "NotFound",
"errorMsg": "NotFound issue"
},
{
"result": "FAIL",
"errorCode": "Internal server error",
"errorMsg": "Internal server error"
},
{
"result": "FAIL",
"errorCode": "InvalidParameter",
"errorMsg": "InvalidParameter text maximum length of 65535"
},
{
"result": "FAIL",
"errorCode": "PermissionDenied",
"errorMsg": "PermissionDenied view_tasks"
},
{
"result": "FAIL",
"errorCode": "InvalidParameter",
"errorMsg": "InvalidParameter issueComment text empty"
},
{
"result": "FAIL",
"errorCode": "InvalidParameter",
"errorMsg": "InvalidParameter issueComment text tooLong"
}
]
如果身份验证凭据不正确或丢失,则返回
- application/json
- Schema
- Example (from schema)
Schema
result string
本次请求结果,SUCCESS|FAIL
errorCode string
本次请求错误码
errorMsg string
本次请求错误信息
{
"result": "FAIL",
"errorCode": "Unauthorized",
"errorMsg": "Access token is invalid"
}
如果scope检验不通过,则返回
- application/json
- Schema
- Example (from schema)
Schema
result string
本次请求结果,SUCCESS|FAIL
errorCode string
本次请求错误码
errorMsg string
本次请求错误信息
{
"result": "FAIL",
"errorCode": "Forbidden",
"errorMsg": "Scope is invalid"
}
如果未找到资源对象,则返回
- application/json
- Schema
- Example (from schema)
Schema
result string
本次请求结果,SUCCESS|FAIL
errorCode string
本次请求错误码
errorMsg string
本次请求错误信息
{
"result": "FAIL",
"errorCode": "NotFound",
"errorMsg": "Not Found"
}
内部服务器错误
- application/json
- Schema
- Example (from schema)
Schema
result string
本次请求结果,SUCCESS|FAIL
errorCode string
本次请求错误码
errorMsg string
本次请求错误信息
{
"result": "FAIL",
"errorCode": "Internal Server Error",
"errorMsg": "Internal Server Error"
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L 'https://your-domain/openapi/v2/project/issues/:issueID/comments' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"text": "评论内容",
"repliedMessageID": "5f1b0b3b"
}'
ResponseClear