provider Tasks POST /tasks/{task_gid}/addProject
@utdk/asana /tasks/{task_gid}/addProject
Add a project to a task
<b>Required scope: </b><code>tasks:write</code> 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. **Positioning the task:** - Use `insert_before` or `insert_after` with a task ID to position relative to another task - Use `section` alone to add the task to the end of a section - Use `section` with `insert_after: null` to add to the **beginning** of a section - Use `section` with `insert_before: null` to add to the **end** of a section - Use `section` with `insert_before` or `insert_after` (non-null) to position relative to a task within that section. The anchor task must be in the specified section. At most one of `insert_before` or `insert_after` should be specified (both cannot be used together). A task can have at most 20 projects multi-homed to it. Returns an empty data block.
task_gid path required
The task to operate on.
string
opt_pretty query
Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
boolean

Try it

Authentication
Configure credentials for Asana
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

addprojectfortask
POST/tasks/{task_gid}/addProject
<b>Required scope: </b><code>tasks:write</code> 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. **Positioning the task:** - Use `insert_before` or `insert_after` with a task ID to position relative to another task - Use `section` alone to add the task to the end of a section - Use `section` with `insert_after: null` to add to the **beginning** of a section - Use `section` with `insert_before: null` to add to the **end** of a section - Use `section` with `insert_before` or `insert_after` (non-null) to position relative to a task within that section. The anchor task must be in the specified section. At most one of `insert_before` or `insert_after` should be specified (both cannot be used together). A task can have at most 20 projects multi-homed to it. Returns an empty data block.

Parameters

required

The task to operate on.

Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.

Input

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import asana from '@utdk/asana';

await asana.addprojectfortask()