Asana
  1. Tasks
Asana
  • Attachments
    • Delete an attachment
      DELETE
    • Get an attachment
      GET
    • Get attachments for a task
      GET
    • Upload an attachment
      POST
  • Batch API
    • Submit parallel requests
  • Custom Fields
    • Create a custom field
    • Delete a custom field
    • Get a custom field
    • Update a custom field
    • Create an enum option
    • Reorder a custom field's enum
    • Update an enum option
    • Get a workspace's custom fields
  • Events
    • Get events on a resource
  • Goals
    • Get goals
    • Create a goal
    • Delete a goal
    • Get a goal
    • Update a goal
    • Add a collaborator to a goal
    • Add a subgoal to a parent goal
    • Add a project/portfolio as supporting work for a goal.
    • Get parent goals from a goal
    • Remove a collaborator from a goal
    • Remove a subgoal from a goal
    • Remove a project/portfolio as supporting work for a goal.
    • Create a goal metric
    • Update a goal metric
    • Get subgoals from a goal
    • Get supporting work from a goal
  • Jobs
    • Get a job by id
  • Organization Exports
    • Create an organization export request
    • Get details on an org export request
  • Teams
    • Get teams in an organization
    • Create a team
    • Get a team
    • Add a user to a team
    • Remove a user from a team
    • Get teams for a user
  • Portfolio Memberships
    • Get multiple portfolio memberships
    • Get a portfolio membership
    • Get memberships from a portfolio
  • Portfolios
    • Get multiple portfolios
    • Create a portfolio
    • Delete a portfolio
    • Get a portfolio
    • Update a portfolio
    • Add a custom field to a portfolio
    • Add a portfolio item
    • Add users to a portfolio
    • Get portfolio items
    • Remove a custom field from a portfolio
    • Remove a portfolio item
    • Remove users from a portfolio
  • Custom Field Settings
    • Get a portfolio's custom fields
    • Get a project's custom fields
  • Project Memberships
    • Get a project membership
    • Get memberships from a project
  • Project Statuses
    • Delete a project status
    • Get a project status
    • Get statuses from a project
    • Create a project status
  • Projects
    • Get multiple projects
    • Create a project
    • Delete a project
    • Get a project
    • Update a project
    • Add a custom field to a project
    • Add followers to a project
    • Add users to a project
    • Duplicate a project
    • Remove a custom field from a project
    • Remove followers from a project
    • Remove users from a project
    • Get task count of a project
    • Get projects a task is in
    • Get a team's projects
    • Create a project in a team
    • Get all projects in a workspace
    • Create a project in a workspace
  • Sections
    • Get sections in a project
    • Create a section in a project
    • Move or Insert sections
    • Delete a section
    • Get a section
    • Update a section
    • Add task to section
  • Tasks
    • Get tasks from a project
      GET
    • Get tasks from a section
      GET
    • Get tasks from a tag
      GET
    • Get multiple tasks
      GET
    • Create a task
      POST
    • Delete a task
      DELETE
    • Get a task
      GET
    • Update a task
      PUT
    • Set dependencies for a task
      POST
    • Set dependents for a task
      POST
    • Add followers to a task
      POST
    • Add a project to a task
      POST
    • Add a tag to a task
      POST
    • Get dependencies from a task
      GET
    • Get dependents from a task
      GET
    • Duplicate a task
      POST
    • Unlink dependencies from a task
      POST
    • Unlink dependents from a task
      POST
    • Remove followers from a task
      POST
    • Remove a project from a task
      POST
    • Remove a tag from a task
      POST
    • Set the parent of a task
      POST
    • Get subtasks from a task
      GET
    • Create a subtask
      POST
    • Get tasks from a user task list
      GET
    • Search tasks in a workspace
      GET
  • Stories
    • Delete a story
    • Get a story
    • Update a story
    • Get stories from a task
    • Create a story on a task
  • Tags
    • Get multiple tags
    • Create a tag
    • Delete a tag
    • Get a tag
    • Update a tag
    • Get a task's tags
    • Get tags in a workspace
    • Create a tag in a workspace
  • Team Memberships
    • Get team memberships
    • Get a team membership
    • Get memberships from a team
    • Get memberships from a user
  • Users
    • Get users in a team
    • Get multiple users
    • Get a user
    • Get a user's favorites
    • Get users in a workspace or organization
  • Time Periods
    • Get time periods
    • Get a time period
  • User Task Lists
    • Get a user task list
    • Get a user's task list
  • Workspace Memberships
    • Get workspace memberships for a user
    • Get a workspace membership
    • Get the workspace memberships for a workspace
  • Webhooks
    • Get multiple webhooks
    • Establish a webhook
    • Delete a webhook
    • Get a webhook
  • Workspaces
    • Get multiple workspaces
    • Get a workspace
    • Update a workspace
    • Add a user to a workspace or organization
    • Remove a user from a workspace or organization
  • Typeahead
    • Get objects via typeahead
  1. Tasks

Get a task

GET
/tasks/{task_gid}
Tasks
Returns the complete task record for a single task.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://app.asana.com/api/1.0/tasks/'
Response Response Example
200 - Example 1
{
  "data": {
    "gid": "12345",
    "resource_type": "task",
    "name": "Buy catnip",
    "approval_status": "pending",
    "assignee_status": "upcoming",
    "completed": false,
    "completed_at": "2012-02-22T02:06:58.147Z",
    "completed_by": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Greg Sanchez"
    },
    "created_at": "2012-02-22T02:06:58.147Z",
    "dependencies": [
      {
        "gid": "12345",
        "resource_type": "task"
      }
    ],
    "dependents": [
      {
        "gid": "12345",
        "resource_type": "task"
      }
    ],
    "due_at": "2019-09-15T02:06:58.147Z",
    "due_on": "2019-09-15",
    "external": {
      "data": "A blob of information",
      "gid": "my_gid"
    },
    "hearted": true,
    "hearts": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "task",
          "name": "Greg Sanchez"
        }
      }
    ],
    "html_notes": "<body>Mittens <em>really</em> likes the stuff from Humboldt.</body>",
    "is_rendered_as_separator": false,
    "liked": true,
    "likes": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "task",
          "name": "Greg Sanchez"
        }
      }
    ],
    "memberships": [
      {
        "project": {
          "gid": "12345",
          "resource_type": "task",
          "name": "Stuff to buy"
        },
        "section": {
          "gid": "12345",
          "resource_type": "task",
          "name": "Next Actions"
        }
      }
    ],
    "modified_at": "2012-02-22T02:06:58.147Z",
    "notes": "Mittens really likes the stuff from Humboldt.",
    "num_hearts": 5,
    "num_likes": 5,
    "num_subtasks": 3,
    "resource_subtype": "default_task",
    "start_on": "2019-09-14",
    "assignee": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Greg Sanchez"
    },
    "assignee_section": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Next Actions"
    },
    "custom_fields": [
      {
        "gid": "12345",
        "resource_type": "task",
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "task",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text",
        "currency_code": "EUR",
        "custom_label": "gold pieces",
        "custom_label_position": "suffix",
        "description": "Development team priority",
        "format": "custom",
        "has_notifications_enabled": true,
        "is_global_to_workspace": true,
        "precision": 2,
        "created_by": {
          "gid": "12345",
          "resource_type": "task",
          "name": "Greg Sanchez"
        },
        "enum_value": {
          "gid": "12345",
          "resource_type": "task",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "task",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ]
      }
    ],
    "followers": [
      {
        "gid": "12345",
        "resource_type": "task",
        "name": "Greg Sanchez"
      }
    ],
    "parent": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "projects": [
      {
        "gid": "12345",
        "resource_type": "task",
        "name": "Stuff to buy"
      }
    ],
    "tags": [
      {
        "gid": "59746",
        "name": "Grade A"
      }
    ],
    "workspace": {
      "gid": "12345",
      "resource_type": "task",
      "name": "My Company Workspace"
    }
  }
}

Request

Path Params
task_gid
string 
required

Responses

🟢200Successfully retrieved the specified task.
application/json
Body
data
object (TaskResponse) 
optional
The task is the basic object around which many operations in Asana are centered.
assignee
null  | allOf {1} 
optional
assignee_section
null  | allOf {2} 
optional
custom_fields
array[object (CustomFieldResponse) {21}] 
read-onlyoptional
Array of custom field values applied to the task. These represent the custom field values recorded on this project for a particular custom field. For example, these custom field values will contain an enum_value property for custom fields of type enum, a text_value property for custom fields of type text, and so on. Please note that the gid returned on each custom field value is identical to the gid of the custom field, which allows referencing the custom field metadata through the /custom_fields/custom_field-gid endpoint.
followers
array[object (UserCompact) {3}] 
read-onlyoptional
Array of users following this task.
parent
object 
read-onlyoptional
The parent of this task, or null if this is not a subtask. This property cannot be modified using a PUT request but you can change it with the setParent endpoint. You can create subtasks by using the subtasks endpoint.
permalink_url
string 
read-onlyoptional
A url that points directly to the object within Asana.
Example:
https://app.asana.com/0/resource/123456789/list
projects
array[object (ProjectCompact) {3}] 
read-onlyoptional
Create-only. Array of projects this task is associated with. At task creation time, this array can be used to add the task to many projects at once. After task creation, these associations can be modified using the addProject and removeProject endpoints.
tags
array[object (TagCompact) {3}] 
read-onlyoptional
Array of tags associated with this task. In order to change tags on an existing task use addTag and removeTag.
Example:
[{"gid":"59746","name":"Grade A"}]
workspace
object 
read-onlyoptional
Create-only. The workspace this task is associated with. Once created, task cannot be moved to a different workspace. This attribute can only be specified at creation time.
approval_status
enum<string> 
optional
Conditional Reflects the approval status of this task. This field is kept in sync with completed, meaning pending translates to false while approved, rejected, and changes_requested translate to true. If you set completed to true, this field will be set to approved.
Allowed values:
pendingapprovedrejectedchanges_requested
Example:
pending
assignee_status
enum<string> 
optional
Deprecated Scheduling status of this task for the user it is assigned to. This field can only be set if the assignee is non-null. Setting this field to "inbox" or "upcoming" inserts it at the top of the section, while the other options will insert at the bottom.
Allowed values:
todayupcominglaternewinbox
Example:
upcoming
completed
boolean 
optional
True if the task is currently marked complete, false if not.
Example:
false
completed_at
string <date-time> | null 
read-onlyoptional
The time at which this task was completed, or null if the task is incomplete.
Example:
2012-02-22T02:06:58.147Z
completed_by
object 
UserCompact
optional
A user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
created_at
string <date-time>
read-onlyoptional
The time at which this resource was created.
Example:
2012-02-22T02:06:58.147Z
dependencies
array[object (AsanaResource) {2}] 
read-onlyoptional
Opt In. Array of resources referencing tasks that this task depends on. The objects contain only the gid of the dependency.
dependents
array[object (AsanaResource) {2}] 
read-onlyoptional
Opt In. Array of resources referencing tasks that depend on this task. The objects contain only the ID of the dependent.
due_at
string <date> | null 
optional
The UTC date and time on which this task is due, or null if the task has no due time. This takes an ISO 8601 date string in UTC and should not be used together with due_on.
Example:
2019-09-15T02:06:58.147Z
due_on
string <date> | null 
optional
The localized date on which this task is due, or null if the task has no due date. This takes a date with YYYY-MM-DD format and should not be used together with due_at.
Example:
2019-09-15
external
object 
optional
OAuth Required. Conditional. This field is returned only if external values are set or included by using [Opt In] (/docs/input-output-options).
The external field allows you to store app-specific metadata on tasks, including a gid that can be used to retrieve tasks and a data blob that can store app-specific character strings. Note that you will need to authenticate with Oauth to access or modify this data. Once an external gid is set, you can use the notation external:custom_gid to reference your object anywhere in the API where you may use the original object gid. See the page on Custom External Data for more details.
Example:
{"data":"A blob of information","gid":"my_gid"}
hearted
boolean 
read-onlyoptional
Deprecated - please use liked instead True if the task is hearted by the authorized user, false if not.
Example:
true
hearts
array[object (Like) {2}] 
read-onlyoptional
Deprecated - please use likes instead Array of likes for users who have hearted this task.
html_notes
string 
optional
Opt In. The notes of the text with formatting as HTML.
Example:
<body>Mittens <em>really</em> likes the stuff from Humboldt.</body>
is_rendered_as_separator
boolean 
read-onlyoptional
Opt In. In some contexts tasks can be rendered as a visual separator; for instance, subtasks can appear similar to sections without being true section objects. If a task object is rendered this way in any context it will have the property is_rendered_as_separator set to true.
Example:
false
liked
boolean 
optional
True if the task is liked by the authorized user, false if not.
Example:
true
likes
array[object (Like) {2}] 
read-onlyoptional
Array of likes for users who have liked this task.
memberships
array [object {2}] 
read-onlyoptional
Create-only. Array of projects this task is associated with and the section it is in. At task creation time, this array can be used to add the task to specific sections. After task creation, these associations can be modified using the addProject and removeProject endpoints. Note that over time, more types of memberships may be added to this property.
modified_at
string <date-time>
read-onlyoptional
The time at which this task was last modified.
Note: This does not currently reflect any changes in
associations such as projects or comments that may have been
added or removed from the task.
Example:
2012-02-22T02:06:58.147Z
name
string 
optional
The name of the task.
Example:
null
notes
string 
optional
Free-form textual information associated with the task (i.e. its description).
Example:
Mittens really likes the stuff from Humboldt.
num_hearts
integer 
read-onlyoptional
Deprecated - please use likes instead The number of users who have hearted this task.
Example:
5
num_likes
integer 
read-onlyoptional
The number of users who have liked this task.
Example:
5
num_subtasks
integer 
read-onlyoptional
Opt In. The number of subtasks on this task.
Example:
3
resource_subtype
enum<string> 
optional
The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
The resource_subtype milestone represent a single moment in time. This means tasks with this subtype cannot have a start_date.
Allowed values:
default_taskmilestonesectionapproval
Example:
default_task
start_on
string <date> | null 
optional
The day on which work begins for the task , or null if the task has no start date. This takes a date with YYYY-MM-DD format.
Note: due_on or due_at must be present in the request when setting or unsetting the start_on parameter.
Example:
2019-09-14
gid
string 
read-onlyoptional
Globally unique identifier of the resource, as a string.
Example:
12345
resource_type
string 
read-onlyoptional
The base type of this resource.
Example:
task
🟠400400
🟠401401
🟠403403
🟠404404
🔴500500
Modified at 2022-09-13 02:00:32
Previous
Delete a task
Next
Update a task
Built with