{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"<b>Required scope: </b><code>projects:write</code>\n\nCreates and returns a job that will asynchronously handle the project instantiation.\n\nTo form this request, it is recommended to first make a request to [get a project template](/reference/getprojecttemplate). 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.\n\n_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](/reference/workspaces) parameter._","properties":{"path":{"type":"object","properties":{"project_template_gid":{"type":"string","examples":["1331"],"description":"Globally unique identifier for the project template."}},"required":["project_template_gid"],"additionalProperties":false},"query":{"type":"object","properties":{"opt_pretty":{"type":"boolean","examples":[true],"description":"Provides “pretty” output.\nProvides 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."},"opt_fields":{"type":"array","items":{"type":"string","enum":["dates_rollup_progress","dates_rollup_progress.total_tasks","dates_rollup_progress.updated_tasks","new_graph_export","new_graph_export.completed_at","new_graph_export.created_at","new_graph_export.download_url","new_portfolio","new_portfolio.name","new_portfolio.resource_subtype","new_project","new_project.name","new_project.resource_subtype","new_project_template","new_project_template.name","new_resource_export","new_resource_export.completed_at","new_resource_export.created_at","new_resource_export.download_url","new_task","new_task.created_by","new_task.name","new_task.resource_subtype","resource_subtype","status"]},"examples":[["dates_rollup_progress","dates_rollup_progress.total_tasks","dates_rollup_progress.updated_tasks","new_graph_export","new_graph_export.completed_at","new_graph_export.created_at","new_graph_export.download_url","new_portfolio","new_portfolio.name","new_portfolio.resource_subtype","new_project","new_project.name","new_project.resource_subtype","new_project_template","new_project_template.name","new_resource_export","new_resource_export.completed_at","new_resource_export.created_at","new_resource_export.download_url","new_task","new_task.created_by","new_task.name","new_task.resource_subtype","resource_subtype","status"]],"description":"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](/docs/inputoutput-options#selecting-nested-fields)."}},"required":[],"additionalProperties":false},"body":{"type":"object","properties":{"data":{"$ref":"#/definitions/ProjectTemplateInstantiateProjectRequest"}}}},"required":["path"],"additionalProperties":false,"definitions":{"ProjectTemplateInstantiateProjectRequest":{"type":"object","required":["name"],"properties":{"name":{"description":"The name of the new project.","type":"string","examples":["New Project Name"]},"team":{"description":"*Optional*. Sets the team of the new project. If the project template exists in an _organization_, you may specify a value for `team`. If no value is provided then it defaults to the same team as the project template.","type":"string","examples":["12345"]},"public":{"description":"*Deprecated:* new integrations use `privacy_setting` instead.","type":"boolean","examples":[true]},"privacy_setting":{"description":"The privacy setting of the project. *Note: Administrators in your organization may restrict the values of `privacy_setting`.* The value `private_to_team` is deprecated. Use `POST /memberships` to share a project with a team after creation.","type":"string","enum":["public_to_workspace","private_to_team","private"],"examples":["public_to_workspace"]},"is_strict":{"description":"*Optional*. If set to `true`, the endpoint returns an \"Unprocessable Entity\" error if you fail to provide a calendar date value for any date variable. If set to `false`, a default date is used for each unfulfilled date variable (e.g., the current date is used as the Start Date of a project).","type":"boolean","examples":[true]},"requested_dates":{"description":"*Conditional*. Array of mappings of date variables to calendar dates. This property is required in the instantiation request if the project template includes dates (e.g., a start date on a task).","type":"array","items":{"$ref":"#/definitions/DateVariableRequest"}},"requested_roles":{"description":"Array of mappings of template roles to users.","type":"array","items":{"$ref":"#/definitions/RequestedRoleRequest"}}}},"DateVariableRequest":{"type":"object","properties":{"gid":{"description":"Globally unique identifier of the date field in the project template. A value of `1` refers to the project start date, while `2` refers to the project due date.","type":"string","examples":["1"]},"value":{"description":"The date with which the date variable should be replaced when instantiating a project. This takes a date with `YYYY-MM-DD` format.","type":["string","null"],"format":"date-time","examples":["2022-01-01"]}}},"RequestedRoleRequest":{"type":"object","properties":{"gid":{"description":"Globally unique identifier of the template role in the project template.","type":"string","examples":["1"]},"value":{"description":"A string identifying a user that should be assigned to the template role. This can either be the string \"me\", an email, or the gid of a user.","type":"string","examples":["123"]}}}}},"name":"Instantiate a project from a project template","id":"asana.instantiateproject","example":{"path":{"project_template_gid":"1331"}},"maxRequests":1,"summary":false}}