Tasks

Get multiple tasks

<b>Required scope: </b><code>tasks:read</code>

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

Request

  • Base URL: https://app.asana.com/api/1.0
  • URL: https://app.asana.com/api/1.0/tasks
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.asana.com/-/oauth_authorize, token URL https://app.asana.com/-/oauth_token, scopes: tasks:read)

Query parameters

limitinteger

Results per page. The number of objects to return per page. The value must be between 1 and 100.

offsetstring

Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. Note: You can only pass in an offset that was returned to you via a previously paginated request.

assigneestring

The assignee to filter tasks on. If searching for unassigned tasks, assignee.any = null can be specified. Note: If you specify assignee, you must also specify the workspace to filter on.

projectstring

The project to filter tasks on.

sectionstring

The section to filter tasks on.

workspacestring

The workspace to filter tasks on. Note: If you specify workspace, you must also specify the assignee to filter on.

completed_sincestring date-time
Example:2012-02-22T02:06:58.158Z

Only return tasks that are either incomplete or that have been completed since this time.

modified_sincestring date-time

Only return tasks that have been modified since the given time.

Note: A task is considered “modified” if any of its properties change, or associations between it and other objects are modified (e.g. a task being added to a project). A task is not considered modified just because another object it is associated with (e.g. a subtask) is modified. Actions that count as modifying the task include assigning, renaming, completing, and adding stories.

custom_typestring

Filter results by custom type. Provide a custom type GID to return only objects of that custom type (an unknown GID returns 400). Provide an empty string to return only objects with no custom type assigned. If this parameter is omitted, results are not filtered by custom type.

opt_fieldsstring[]

This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. Properties can include nested fields. To learn more, see the input/output options guide.

Response

Successfully retrieved requested tasks.

Example response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task",
      "created_by": {
        "gid": "1111",
        "resource_type": "user"
      }
    }
  ],
  "next_page": {
    "offset": "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9",
    "path": "/tasks/12345/attachments?limit=2&offset=eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9",
    "uri": "https://app.asana.com/api/1.0/tasks/12345/attachments?limit=2&offset=eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9"
  }
}

Changes

No recorded changes to this operation across all 2 revisions of this API.