Mavenlink

Project Template Assignments (Resources)

Project Template Assignments are used in Project Templates and act as placeholders for story assignees. These assignments are mapped to project template stories and are switched out for real users when the template is applied.

Project Template Assignments objects have the following readable attributes:

  • name - the name of the project template assignment

Fetching Project Template Assignments

You can access all of the project template assignments for a specific project template through the API as follows:

curl "https://app.mavenlink.com/api/v1/project_template_assignments?project_template_id=18"

Or request the template and include its project template assignments

curl "https://app.mavenlink.com/api/v1/project_templates/18?include=project_template_assignments"

The resulting JSON will be a hash of project template assignments that are associated with the project template that has an id of 18.

Getting a Single Project Template Assignment

You can access a single project template assignment on a project template through the API as follows:

curl "https://app.mavenlink.com/api/v1/project_template_assignments/1"

The resulting JSON will be the project template assignment that has an id of 1

Creating a new Project Template Assignment

Project Template Assignments belong to a Project Template and take the following parameters:

  • project_template_id - (required) the internal id of the associated project template
  • name - (required) the name of the project template assignment

You can create Project Template Assignments as follows:

curl -d "project_template_assignment[project_template_id]=5" -d "project_template_assignment[name]=designer" "https://app.mavenlink.com/api/v1/project_template_assignments/1"

Updating an existing Project Template Assignment

You can edit Project Template Assignment as follows:

curl -X PUT -d "project_template_assignment[name]=My Edited Assignment Name" -d "https://api.mavenlink.com/project_template_assignments/1.json"

The response will contain the JSON representation of the updated Project Template Assignment or an error message indicating which arguments are missing or erroneous.

You can only edit the name of a Project Template Assignment once it has been created.

Destroying an existing Project Template Assignment

You can delete Project Template Assignments as follows:

curl -X DELETE "https://api.mavenlink.com/api/v1/project_template_assignments/1.json"

The response will have no content and HTTP 204 status code if the Project Template Assignment has been successfully deleted, or a JSON error message indicating why the Project Template Assignment could not be deleted.