Module asana::apis::tasks_api[][src]

Enums

AddDependenciesForTaskError

struct for typed errors of method add_dependencies_for_task

AddDependentsForTaskError

struct for typed errors of method add_dependents_for_task

AddFollowersForTaskError

struct for typed errors of method add_followers_for_task

AddProjectForTaskError

struct for typed errors of method add_project_for_task

AddTagForTaskError

struct for typed errors of method add_tag_for_task

CreateSubtaskForTaskError

struct for typed errors of method create_subtask_for_task

CreateTaskError

struct for typed errors of method create_task

DeleteTaskError

struct for typed errors of method delete_task

DuplicateTaskError

struct for typed errors of method duplicate_task

GetDependenciesForTaskError

struct for typed errors of method get_dependencies_for_task

GetDependentsForTaskError

struct for typed errors of method get_dependents_for_task

GetSubtasksForTaskError

struct for typed errors of method get_subtasks_for_task

GetTaskError

struct for typed errors of method get_task

GetTasksError

struct for typed errors of method get_tasks

GetTasksForProjectError

struct for typed errors of method get_tasks_for_project

GetTasksForSectionError

struct for typed errors of method get_tasks_for_section

GetTasksForTagError

struct for typed errors of method get_tasks_for_tag

GetTasksForUserTaskListError

struct for typed errors of method get_tasks_for_user_task_list

RemoveDependenciesForTaskError

struct for typed errors of method remove_dependencies_for_task

RemoveDependentsForTaskError

struct for typed errors of method remove_dependents_for_task

RemoveFollowerForTaskError

struct for typed errors of method remove_follower_for_task

RemoveProjectForTaskError

struct for typed errors of method remove_project_for_task

RemoveTagForTaskError

struct for typed errors of method remove_tag_for_task

SearchTasksForWorkspaceError

struct for typed errors of method search_tasks_for_workspace

SetParentForTaskError

struct for typed errors of method set_parent_for_task

UpdateTaskError

struct for typed errors of method update_task

Functions

add_dependencies_for_task

Marks a set of tasks as dependencies of this task, if they are not already dependencies. A task can have at most 15 dependencies.

add_dependents_for_task

Marks a set of tasks as dependents of this task, if they are not already dependents. A task can have at most 30 dependents.

add_followers_for_task

Adds followers to a task. Returns an empty data block. Each task can be associated with zero or more followers in the system. Requests to add/remove followers, if successful, will return the complete updated task record, described above.

add_project_for_task

Adds the task to the specified project, in the optional location specified. If no location arguments are given, the task will be added to the end of the project. addProject can also be used to reorder a task within a project or section that already contains it. At most one of insert_before, insert_after, or section should be specified. Inserting into a section in an non-order-dependent way can be done by specifying section, otherwise, to insert within a section in a particular place, specify insert_before or insert_after and a task within the section to anchor the position of this task. Returns an empty data block.

add_tag_for_task

Adds a tag to a task. Returns an empty data block.

create_subtask_for_task

Creates a new subtask and adds it to the parent task. Returns the full record for the newly created subtask.

create_task

Creating a new task is as easy as POSTing to the /tasks endpoint with a data block containing the fields you’d like to set on the task. Any unspecified fields will take on default values. Every task is required to be created in a specific workspace, and this workspace cannot be changed once set. The workspace need not be set explicitly if you specify projects or a parent task instead.

delete_task

A specific, existing task can be deleted by making a DELETE request on the URL for that task. Deleted tasks go into the “trash” of the user making the delete request. Tasks can be recovered from the trash within a period of 30 days; afterward they are completely removed from the system. Returns an empty data record.

duplicate_task

Creates and returns a job that will asynchronously handle the duplication.

get_dependencies_for_task

Returns the compact representations of all of the dependencies of a task.

get_dependents_for_task

Returns the compact representations of all of the dependents of a task.

get_subtasks_for_task

Returns a compact representation of all of the subtasks of a task.

get_task

Returns the complete task record for a single task.

get_tasks

Returns the compact task records for some filtered set of tasks. Use one or more of the parameters provided to filter the tasks returned. You must specify a project or tag if you do not specify assignee and workspace. For more complex task retrieval, use workspaces/{workspace_gid}/tasks/search.

get_tasks_for_project

Returns the compact task records for all tasks within the given project, ordered by their priority within the project. Tasks can exist in more than one project at a time.

get_tasks_for_section

Board view only: Returns the compact section records for all tasks within the given section.

get_tasks_for_tag

Returns the compact task records for all tasks with the given tag. Tasks can have more than one tag at a time.

get_tasks_for_user_task_list

Returns the compact list of tasks in a user’s My Tasks list. Note: Access control is enforced for this endpoint as with all Asana API endpoints, meaning a user’s private tasks will be filtered out if the API-authenticated user does not have access to them. Note: Both complete and incomplete tasks are returned by default unless they are filtered out (for example, setting completed_since=now will return only incomplete tasks, which is the default view for “My Tasks” in Asana.)

remove_dependencies_for_task

Unlinks a set of dependencies from this task.

remove_dependents_for_task

Unlinks a set of dependents from this task.

remove_follower_for_task

Removes each of the specified followers from the task if they are following. Returns the complete, updated record for the affected task.

remove_project_for_task

Removes the task from the specified project. The task will still exist in the system, but it will not be in the project anymore. Returns an empty data block.

remove_tag_for_task

Removes a tag from a task. Returns an empty data block.

search_tasks_for_workspace

To mirror the functionality of the Asana web app’s advanced search feature, the Asana API has a task search endpoint that allows you to build complex filters to find and retrieve the exact data you need. #### Premium access Like the Asana web product’s advance search feature, this search endpoint will only be available to premium Asana users. A user is premium if any of the following is true: - The workspace in which the search is being performed is a premium workspace - The user is a member of a premium team inside the workspace Even if a user is only a member of a premium team inside a non-premium workspace, search will allow them to find data anywhere in the workspace, not just inside the premium team. Making a search request using credentials of a non-premium user will result in a 402 Payment Required error. #### Pagination Search results are not stable; repeating the same query multiple times may return the data in a different order, even if the data do not change. Because of this, the traditional pagination available elsewhere in the Asana API is not available here. However, you can paginate manually by sorting the search results by their creation time and then modifying each subsequent query to exclude data you have already seen. Page sizes are limited to a maximum of 100 items, and can be specified by the limit query parameter. #### Eventual consistency Changes in Asana (regardless of whether they’re made though the web product or the API) are forwarded to our search infrastructure to be indexed. This process can take between 10 and 60 seconds to complete under normal operation, and longer during some production incidents. Making a change to a task that would alter its presence in a particular search query will not be reflected immediately. This is also true of the advanced search feature in the web product. #### Rate limits You may receive a 429 Too Many Requests response if you hit any of our rate limits. #### Custom field parameters | Parameter name | Custom field type | Accepted type | |—|—|—| | custom_fields.{gid}.is_set | All | Boolean | | custom_fields.{gid}.value | Text | String | | custom_fields.{gid}.value | Number | Number | | custom_fields.{gid}.value | Enum | Enum option ID | | custom_fields.{gid}.starts_with | Text only | String | | custom_fields.{gid}.ends_with | Text only | String | | custom_fields.{gid}.contains | Text only | String | | custom_fields.{gid}.less_than | Number only | Number | | custom_fields.{gid}.greater_than | Number only | Number | For example, if the gid of the custom field is 12345, these query parameter to find tasks where it is set would be custom_fields.12345.is_set=true. To match an exact value for an enum custom field, use the gid of the desired enum option and not the name of the enum option: custom_fields.12345.value=67890. Searching for multiple exact matches of a custom field is not supported. Note: If you specify projects.any and sections.any, you will receive tasks for the project and tasks for the section. If you’re looking for only tasks in a section, omit the projects.any from the request.

set_parent_for_task

parent, or no parent task at all. Returns an empty data block. When using insert_before and insert_after, at most one of those two options can be specified, and they must already be subtasks of the parent.

update_task

A specific, existing task can be updated by making a PUT request on the URL for that task. Only the fields provided in the data block will be updated; any unspecified fields will remain unchanged. When using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the task. Returns the complete updated task record.