Deletes the comment for the given comment ID
DELETE /api/sync/v1/todos/comments/{commentId}
Operation id: deleteComment
Description
This API deletes a comment specified by the commentId path parameter. The commentId can be obtained from the response of the "/comments/api/v1/todos/{recordId}" GET API.
These fields are mandatory:
- commentId
- active
delete comment action can be reverted/undo within 15 seconds after deleting. if active field's value is false comment will be deleted. if active field's value is true comment will become active again.
Permission Required:
- WCSTASK_TASK_DELETE_COMMENT OR should be creator of comment
Tags: Comment APIs
Parameters
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
commentId | integer (int32) | Yes |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
active | boolean | Yes |
Security
- Bearer (http / bearer)
- enter the client service token value.
Responses
200 — Comment List
Content type: application/json
400 — Bad Request
401 — Unauthorized Access
403 — Forbidden
422 — Unprocessable Entity
500 — Internal Server Error
Response models
200 — Comment List
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
message | string | No | |
status | string | No | |
statusCode | integer (int32) | No | |
debugErrorMessage | string | No | |
messageCode | string | No | message codes |
messageParams | array | No | |
id | integer (int32) | No | |
active | boolean | No |
{
"type": "object",
"properties": {
"message": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"SUCCESS",
"FAIL",
"BAD_REQUEST",
"NO_CONTENT",
"UNAUTHORIZED",
"FORBIDDEN",
"NOT_FOUND",
"INTERNAL_SERVER_ERROR",
"UNSUPPORTED_MEDIA_TYPE",
"UNPROCESSABLE_ENTITY"
]
},
"statusCode": {
"type": "integer",
"format": "int32"
},
"debugErrorMessage": {
"type": "string"
},
"messageCode": {
"type": "string",
"description": "message codes",
"items": {
"type": "string",
"example": [
"ERROR-401 user doesn't have authorized permission"
]
}
},
"messageParams": {
"type": "array",
"items": {
"type": "string"
}
},
"id": {
"type": "integer",
"format": "int32"
},
"active": {
"type": "boolean"
}
}
}