Delete a draft To-Do
DELETE /api/sync/v1/todos/{todoId}
Operation id: deleteTodo
Description
This API deletes a to-do created using CREATE API when in DRAFT state. The API takes in undo parameter which is optional and by default is false. If the deletion for the DRAFT to-do needs to be reverted, use the API with the to-do ID and undo value true, to make the DRAFT to-do active again.
Permissions Required:
- Creator of the draft to-do
Tags: To-Do APIs
Parameters
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
todoId | integer (int32) | Yes |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
undo | boolean | No | whether to make deleted To-Do active |
Security
- Bearer (http / bearer)
- enter the client service token value.
Responses
200 — Draft To-Do deleted successfully
Content type: application/json
400 — Bad request
404 — To-Do not found
500 — Internal server error
Response models
200 — Draft To-Do deleted successfully
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 | |
messageParams | array | No | |
taskId | integer (int32) | No | |
undo | 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"
]
},
"statusCode": {
"type": "integer",
"format": "int32"
},
"debugErrorMessage": {
"type": "string"
},
"messageCode": {
"type": "string"
},
"messageParams": {
"type": "array",
"items": {
"type": "string"
}
},
"taskId": {
"type": "integer",
"format": "int32"
},
"undo": {
"type": "boolean"
}
}
}