Creates a clone for a given To-Do for editing

POST /api/sync/v1/todos/edit/{todoId}

Operation id: cloneTodoV2

Description

The API creates a clone for a Launched to-do. This API can be used to make changes to already LAUNCHED to-do. The user provides a to-do Id for which the clone needs to be created. It checks if the to-do is created by the same user. It will create a copy of the LAUNCHED to-do, if the condition passes and it will return the clone to-do ID and the details of the clone to-do with DRAFT status.

If there is already a clone to-do for a LAUNCHED to-do, then another clone to-do cannot be created. It either needs to be discarded using the DISCARD to-do API or merge the clone with the original to-do using the LAUNCH API. The details can be updated using the UPDATE to-do API.

Once the clone to-do is merged with original to-do, the clone to-do is marked inactive. To make more changes to the LAUNCHED to-do, CLONE API needs to be used again.

Tags: To-Do APIs

Parameters

Path parameters

NameTypeRequiredDescription
todoIdinteger (int32)Yes

Security

  • Bearer (http / bearer)
    • enter the client service token value.

Responses

200 — Task Cloned Successfully

Content type: application/json

400 — Bad Request

401 — Unauthorised Access

500 — Internal Server Error

Response models

200 — Task Cloned Successfully

Content type: application/json

Schema

PropertyTypeRequiredDescription
messagestringNoresponse message
statusstringNoresponse status
statusCodeinteger (int32)Noresponse status code
debugErrorMessagestringNoerror message
messageCodestringNomessage codes
messageParamsarrayNomessage Parameters
dataobjectNo
taskIdinteger (int32)Noidentifier of task
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "response message"
    },
    "status": {
      "type": "string",
      "description": "response status",
      "enum": [
        "SUCCESS",
        "FAIL",
        "BAD_REQUEST",
        "NO_CONTENT",
        "UNAUTHORIZED",
        "FORBIDDEN",
        "NOT_FOUND",
        "INTERNAL_SERVER_ERROR",
        "UNSUPPORTED_MEDIA_TYPE"
      ]
    },
    "statusCode": {
      "type": "integer",
      "format": "int32",
      "description": "response status code"
    },
    "debugErrorMessage": {
      "type": "string",
      "description": "error message"
    },
    "messageCode": {
      "type": "string",
      "description": "message codes",
      "items": {
        "type": "string",
        "example": [
          "ERROR01- Start date can not be in the past.",
          "ERROR02-Due date can not be in the past.",
          "ERROR03-Due date should be after the start date.",
          "ERROR04-Please add an assignee before [launching/submitting] To-Do",
          "ERROR05-Visible date can not be in the past.",
          "ERROR06-Title can not exceed 120 characters.",
          "ERROR07-File name can not exceed 120 characters.",
          "ERROR08-Please select a priority.",
          "ERROR09-Please select a due date.",
          "ERROR403_02-You do not have permission to perform this action.",
          "ERROR403_05-You do not have permission to perform this action.",
          "ERROR403_06-You do not have permission to perform this action.",
          "ERROR40-Error creating To-Do."
        ]
      }
    },
    "messageParams": {
      "type": "array",
      "description": "message Parameters",
      "items": {
        "type": "string"
      }
    },
    "data": {
      "type": "object"
    },
    "taskId": {
      "type": "integer",
      "format": "int32",
      "description": "identifier of task"
    }
  }
}