Get projects a task is in
Changed on<b>Required scope: </b><code>projects:read</code>
Returns a compact representation of all of the projects the task is in.
Request
- Base URL: https://app.asana.com/api/1.0
- URL: https://app.asana.com/api/1.0/tasks/{task_gid}/projects
- 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: projects:read)
Query parameters
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 the projects for the given task.
Example response
{
"data": [
{
"gid": "12345",
"resource_type": "project",
"name": "Stuff to buy",
"resource_subtype": "default_project"
}
],
"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
- info
added the enum value
custom_field_settings.parent.resource_subtypeto the propertyitems/of thequeryrequest parameteropt_fields - info
added the enum value
custom_field_settings.project.resource_subtypeto the propertyitems/of thequeryrequest parameteropt_fields - info
added the enum value
custom_typeto the propertyitems/of thequeryrequest parameteropt_fields - info
added the enum value
custom_type.asana_created_type_identifierto the propertyitems/of thequeryrequest parameteropt_fields - info
added the enum value
custom_type.nameto the propertyitems/of thequeryrequest parameteropt_fields - info
added the enum value
resource_subtypeto the propertyitems/of thequeryrequest parameteropt_fields - info
added the optional property
//to the response with the status
- info
- info
added the new optional
queryrequest parameterinclude_inherited_projectsto all path's operations
- info