Deleting a Work Item Comment
Function
This API is used to delete a comment under a specified work item. Only the comment creator can delete it. After deletion, the comment content of the work item will be cleared.
This API triggers testman requirement notifications for cross-system data synchronization.
Calling Method
For details, see Calling APIs.
Authorization Information
No identity policy-based permission required for calling this API.
URI
DELETE /v2/workitem/issue-note
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User access credential. It can be obtained by calling the IAM API to obtain a user token (the value of X-Subject-Token in the response header). Constraints N/A Range 10 to 32,768 characters. Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| id | Yes | Integer | Definition Comment ID, identifying the unique record of the work item comment to be deleted. Constraints The comment must exist and the current user must be the creator of the comment. Range N/A Default Value N/A |
| projectId | Yes | String | Definition Project ID, identifying the project to which the comment belongs, used for permission verification and service availability verification. Constraints 32-character UUID string, which must be consistent with the project to which the corresponding work item of the comment belongs. Range 32 characters, consisting of lowercase letters and digits. Default Value N/A |
| type | No | String | Definition Work item type, identifying the work item type classification corresponding to the current operation. Constraints N/A Range Default Value N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| result | result object | Definition Business result returned by the deletion operation, including the deletion status flag. |
| status | String | Definition Overall response status of the API. Range |
Example Requests
Delete the comment with ID 13775504 under work item of scrum project 0e97bec7b32f4e0d8d9c1905e7274123.
GET https://{endpoint}/v2/workitem/issue-note
{
"id" : 13775504,
"projectId" : "0e97bec7b32f4e0d8d9c1905e7274123",
"type" : "scrum"
} Example Responses
None
Status Codes
| Status Code | Description |
|---|---|
| 200 | Deletion succeeded. |
| 401 | Unauthorized. The token is invalid or has expired. |
| 403 | Insufficient permissions. You are not the comment creator or a project member. |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot