tasks.tasks.action

Transfers a task to another status.

Parameters

  • id POST

    Task ID.

  • action POST

    Action to be executed on a task: 'return' (returns a task to its previous status; does not allow to specify a certain status or assigned user), 'forward' (allows to specify a desired status and an assigned user), 'close' (closes a task by transferring it to the “Closed” status and cancels the assignment to a user), '' (executes the main action defined by the task’s status).

  • status_id POST Optional

    ID of the status to which a task must be transferred. Used only when the “action” parameter contains value 'forward' (provided that the new status allows specifying an assigned user).

  • text POST Optional

    Comment to the action if the new status allows adding a comment.

  • assigned_contact_id POST Optional

    ID of the user to whom the task must be assigned. Used only when the “action” parameter contains value 'forward' or '' (provided that the new status allows specifying an assigned user).

  • files_hash POST Optional

    The hash of files uploaded using the “tasks.attachments.add” method if they must be attached to the executed action on a task.

  • format GET Optional

    Sets response format. Available options: json (default), xml.

Return value

Array with the following keys:

  • action string Action performed an a task.
  • after_status_id int ID of the status in which the task had been before the action was executed.
  • assigned_contact array Information about the user, to which the task was assigned, with the following keys:
  • assigned_contact['id'] int User ID.
  • assigned_contact['name'] string User name.
  • assigned_contact['is_me'] bool Flag denoting whether the action was executed by the current user.
  • assigned_contact['photo_url'] string URL of a 96x96 pixels large user image.
  • assignment_changed bool Flag denoting whether the task was assigned to another user when the action was executed.
  • attachments array The list of files added during the action execution. Each array item is an array with the following keys:
  • attachments[]['id'] int File ID.
  • attachments[]['code'] string Random file code.
  • attachments[]['contact'] array The properties of the user, who executed the action, as an array with the following keys:
  • attachments[]['contact']['id'] int User ID.
  • attachments[]['contact']['is_me'] bool Flag denoting whether the action was executed by the current user.
  • attachments[]['contact']['name'] string User name.
  • attachments[]['contact']['photo_url'] string URL of a 96x96 pixels large user image.
  • attachments[]['create_datetime'] string Date and time of the action execution in the ISO 8601 format.
  • attachments[]['download_url'] string File URL.
  • attachments[]['ext'] string File name extension.
  • attachments[]['is_image'] bool Flag denoting whether the file contains an image.
  • attachments[]['log_id'] int ID of the entry about the added comment in the user actions log.
  • attachments[]['name'] string File name.
  • attachments[]['preview_url'] string URL of the file’s preview image.
  • attachments[]['size'] int File size in bytes.
  • before_status_id int ID of the status in which the task had been before the action execution.
  • contact array The properties of the user, who executed the action, with the following keys:
  • contact['id'] int User ID.
  • contact['name'] string User name.
  • contact['photo_url'] string URL of a 96x96 pixels large user image.
  • create_datetime string Date and time of the action execution in the ISO 8601 format.
  • project_id int ID of the project to which the task belongs.
  • status_changed bool Flag denoting whether the task status was changed during the action execution.
  • task_id int Task ID.
  • task_name string Task name.
  • task_number string Task’s number within its project.
  • text string Text entered by a user during the action execution.
  • text_stripped string Entered text without HTML tags, truncated to maximum 256 characters.