Project templates

Instantiate a project from a project template

<b>Required scope: </b><code>projects:write</code>

Creates and returns a job that will asynchronously handle the project instantiation.

To form this request, it is recommended to first make a request to get a project template. Then, from the response, copy the gid from the object in the requested_dates array. This gid should be used in requested_dates to instantiate a project.

Note: The body of this request will differ if your workspace is an organization. To determine if your workspace is an organization, use the is_organization parameter.

post/project_templates/{project_template_gid}/instantiateProject

Request

  • Base URL: https://app.asana.com/api/1.0
  • URL: https://app.asana.com/api/1.0/project_templates/{project_template_gid}/instantiateProject
  • 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:write)

Query parameters

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.

Request body

Example request

{
  "data": {
    "name": "New Project Name",
    "team": "12345",
    "public": true,
    "privacy_setting": "public_to_workspace",
    "is_strict": true,
    "requested_dates": [
      {
        "gid": "1",
        "value": "2022-01-01"
      }
    ],
    "requested_roles": [
      {
        "gid": "1",
        "value": "123"
      }
    ]
  }
}

Response

Successfully created the job to handle project instantiation.

Example response

{
  "data": {
    "gid": "12345",
    "resource_type": "job",
    "resource_subtype": "duplicate_task",
    "status": "in_progress",
    "dates_rollup_progress": {
      "updated_tasks": 12,
      "total_tasks": 40
    },
    "new_portfolio": {
      "gid": "12345",
      "resource_type": "portfolio",
      "name": "Bug Portfolio",
      "resource_subtype": "default_portfolio"
    },
    "new_project": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy",
      "resource_subtype": "default_project"
    },
    "new_task": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task",
      "created_by": {
        "gid": "1111",
        "resource_type": "user"
      }
    },
    "new_project_template": {
      "gid": "12345",
      "resource_type": "project_template",
      "name": "Packing list"
    },
    "new_graph_export": {
      "gid": "12345",
      "resource_type": "graph_export",
      "created_at": "2012-02-22T02:06:58.147Z",
      "download_url": "https://asana-export-us-east-1.s3.us-east-1.amazonaws.com/2563645399633793/domain_export/7588024658887731/download/ domain_export_2563645399633793_7588024658887731_2023018-201726.json.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256& X-Amz-Content-Sha256=xxxxxxxx&X-Amz-Date=xxxxxxxx&X-Amz-Expires=300&X-Amz-Security-Token=xxxxxxxx& X-Amz-Signature=xxxxxxxx&X-Amz-SignedHeaders=host&x-id=GetObject#_=_",
      "completed_at": "2012-02-22T03:06:58.147Z"
    },
    "new_resource_export": {
      "gid": "12345",
      "resource_type": "export_request",
      "created_at": "2012-02-22T02:06:58.147Z",
      "download_url": "https://asana-export-us-east-1.s3.us-east-1.amazonaws.com/2563645399633793/object_export/7588024658887731/download/ object_export_2563645399633793_7588024658887731_2023018-201726.jsonl.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256& X-Amz-Credential=xxxxxxxx&X-Amz-Date=xxxxxxxx&X-Amz-Expires=300&X-Amz-Security-Token=xxxxxxxx& X-Amz-Signature=xxxxxxxx&X-Amz-SignedHeaders=host",
      "completed_at": "2012-02-22T03:06:58.147Z"
    }
  }
}

Changes

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