Kantata Kantata OX Knowledge Base
Release Notes
Status Page

Project Templates

Project Templates are sets of tasks and attributes that can be applied to new or existing projects. A single template can be used on any number of projects. A project template's tasks are all stored in an attribute located on the project template object called raw_json. It is a JSON hash of all the stories that has been turned into a string and is stored on the object.

Project Template Stories (Tasks) - raw_json

A project template's tasks are all stored in an attribute located on the project template object called raw_json. It is a JSON hash of all the stories that has been turned into a string and is stored on the object.

Stories within the JSON have the following attributes:

  • title - The title of the task.

  • billable - The title of the project template.

  • relative_start_date - An integer that represents the start day of the task relative to the start of the project.

  • relative_due_date - An integer that represents the end day of the task relative to the start of the project.

  • duration - The number of days the task will take to complete.

  • temp_id - The unique reference ID for the task (used for dependencies).

  • description - The task description.

  • budget_estimate_in_cents - An integer (whole number) that represents the budget estimate, in cents, for the task.

  • time_estimate_in_minutes - An integer (whole number) that represents the time estimate, in minutes, for the task.

  • sub_stories - An nested array of sub-tasks that have the same structure as tasks.

  • checklist - An array of strings, each being a checklist item on the task. For example, "checklist":["item one", "item two"].

  • tag_list - A string with tags that are comma separated. For example, "design, engineering, this has spaces." This creates three tags: "design", "engineering", and "this has spaces."

  • assignments - An array of objects with key value pairs "assignee_id":id. For example, [{"assignee_id":100},{"assignee_id":101}] This task would have two resources assigned to it. These are the IDs of two associated project template assignments. Project template assignments are associated objects.

  • dependencies - An array of objects that represent a task's dependencies. A dependency is an object that connects two tasks, and is used in Gantt charts. A dependency object lives in the dependencies array on it's source task, not it's target.

Dependencies have the following attributes:

  • source_id - The temporary ID of the first task (source task) in the dependency.
  • target_id - The temporary ID of the second task (target task) in the dependency.
  • type - There are four types of dependencies, numbered zero through three.
    • 0 - From the beginning of the source task to the beginning of the target task.
    • 1 - From the beginning of the source task to the end of the target task.
    • 2 - From the end of the source task to beginning of the target task.
    • 3 - From the end of the source task to end of the target task.
  • lag - An integer that represents the number of days delay that occurs between the two tasks in the dependency.

raw_json example:

[ { "story_type":"task", "billable":true, "relative_start_date":1, "relative_due_date":2, "title":"Task One", "temp_id":1, "dependencies":[{"source_id":1, "target_id":2, "type":2, "lag":0}], "description":"this is a task", "assignments":[{"assignee_id":"26"}], "tag_list":"difficult,easy", "budget_estimate_in_cents":40000, "time_estimate_in_minutes":1200, "sub_stories": [ { "story_type":"task", "billable":true, "due_date":nil, "start_date":nil, "relative_start_date":1, "relative_due_date":3, "title":"Sub Task One", "description":"this is a sub task", "assignments":[{"assignee_id":"27"}], "budget_estimate_in_cents":20000, "time_estimate_in_minutes":300, "temp_id":3 } ] }, { "story_type":"deliverable", "billable":true, "endDay":4, "relative_start_date":1, "relative_due_date":4, "title":"Deliverable One", "temp_id":2, "description":"this is a deliverable", "sub_stories":[] }, { "story_type":"milestone", "billable":true, "title":"Milestone One", "description":"this is a milestone", "weight":100, "duration":0, "relative_start_date":5, "sub_stories":[], "checklist":["item one", "item two"], "temp_id":4 } ].

Fetching a list of Project Templates

This endpoint returns structured Project Template objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the project_templates top-level JSON key. Please see our Response Format section for more information.

Request
query Parameters
by_title
string

Only includes project templates where the title matches the specified search.

include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • project_template_additional_tabs (ProjectTemplateAdditionalTab) - Retrieves the additional tabs added to the template. The response will include project_template_additional_tab_ids, which references the data in the project_template_additional_tabs top-level key.
  • project_template_assignments (ProjectTemplateAssignment) - Project template assignments associated with the project template.
  • user (User) - The user who created the project template (referenced by user_id).
matching
string

Alias of by_title.

mine
boolean

Only includes project templates created by the requesting user.

only
string

Allows you to request one or more resources directly by ID. Multiple IDs can be supplied in a comma separated list, like GET /api/v1/workspaces.json?only=5,6,7.

optional_fields
Array of strings

Allows you to request one or more optional fields as an array.

Items Value: "raw_json"
order
string
Default: "updated_at:desc"

Supply order with the name of a valid sort field for the endpoint and a direction.

Valid values: budget:asc, budget:desc, description:asc, description:desc, duration:asc, duration:desc, full_name:asc, full_name:desc, is_budgeted:asc, is_budgeted:desc, title:asc, title:desc, updated_at:asc, and updated_at:desc.

page
integer <int32>
Default: 1
per_page
integer <int32> <= 200
Default: 20
Responses
200

A list of Project Templates have been retrieved.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

get/project_templates
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "project_templates": {
    },
  • "users": {
    },
  • "project_template_assignments": {
    },
  • "project_template_additional_tabs": {
    }
}

Creating a new Project Template

This endpoint returns structured Project Template objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the project_templates top-level JSON key. Please see our Response Format section for more information.

Request
query Parameters
include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • project_template_additional_tabs (ProjectTemplateAdditionalTab) - Retrieves the additional tabs added to the template. The response will include project_template_additional_tab_ids, which references the data in the project_template_additional_tabs top-level key.
  • project_template_assignments (ProjectTemplateAssignment) - Project template assignments associated with the project template.
  • user (User) - The user who created the project template (referenced by user_id).
optional_fields
Array of strings

Allows you to request one or more optional fields as an array.

Items Value: "raw_json"
Request Body schema: application/json
required
object
title
required
string

The title of the project template.

sharing
string

The sharing setting for the template. Viewable and editable templates can be seen by users on the account other than the creator.

Enum: "private_template" "viewable_template" "editable_template"
is_budgeted
boolean

The project template has financial attributes including overall budget, task budgets, and task time estimates.

budget
integer <int32>

The estimated overall budget of the project associated with the template.

duration
integer <int32>

The estimated number of days that the associated project will take.

currency
required
string

The currency of the project template.

description
string

A description of the project template which does not carry over to the project description when applied.

raw_json
string

A JSON hash that contains all project templates' tasks.

Responses
200

Project Template has been created.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

post/project_templates
Request samples
application/json
{
  • "project_template": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "project_templates": {
    },
  • "users": {
    },
  • "project_template_assignments": {
    },
  • "project_template_additional_tabs": {
    }
}

Fetching a single Project Template

This endpoint returns structured Project Template objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the project_templates top-level JSON key. Please see our Response Format section for more information.

Request
path Parameters
id
required
integer

The ID of the Model.

query Parameters
include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • project_template_additional_tabs (ProjectTemplateAdditionalTab) - Retrieves the additional tabs added to the template. The response will include project_template_additional_tab_ids, which references the data in the project_template_additional_tabs top-level key.
  • project_template_assignments (ProjectTemplateAssignment) - Project template assignments associated with the project template.
  • user (User) - The user who created the project template (referenced by user_id).
optional_fields
Array of strings

Allows you to request one or more optional fields as an array.

Items Value: "raw_json"
Responses
200

The Project Template has been retrieved.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

get/project_templates/{id}
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "project_templates": {
    },
  • "users": {
    },
  • "project_template_assignments": {
    },
  • "project_template_additional_tabs": {
    }
}

Updating an existing Project Template

This endpoint returns structured Project Template objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the project_templates top-level JSON key. Please see our Response Format section for more information.

Request
path Parameters
id
required
integer

The ID of the Model.

query Parameters
include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • project_template_additional_tabs (ProjectTemplateAdditionalTab) - Retrieves the additional tabs added to the template. The response will include project_template_additional_tab_ids, which references the data in the project_template_additional_tabs top-level key.
  • project_template_assignments (ProjectTemplateAssignment) - Project template assignments associated with the project template.
  • user (User) - The user who created the project template (referenced by user_id).
optional_fields
Array of strings

Allows you to request one or more optional fields as an array.

Items Value: "raw_json"
Request Body schema: application/json
required
object
title
required
string

The title of the project template.

sharing
string

The sharing setting for the template. Viewable and editable templates can be seen by users on the account other than the creator.

Enum: "private_template" "viewable_template" "editable_template"
is_budgeted
boolean

The project template has financial attributes including overall budget, task budgets, and task time estimates.

budget
integer <int32>

The estimated overall budget of the project associated with the template.

duration
integer <int32>

The estimated number of days that the associated project will take to complete.

currency
string

The currency of the project template.

description
string

A description of the project template which does not carry over to the project description when applied.

raw_json
string

A JSON hash that contains all project templates' tasks.

Responses
200

Project Template has been updated.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

put/project_templates/{id}
Request samples
application/json
{
  • "project_template": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "project_templates": {
    },
  • "users": {
    },
  • "project_template_assignments": {
    },
  • "project_template_additional_tabs": {
    }
}

Deleting an existing Project Template

The response will contain no content and an HTTP 204 status code if the request was successful, or a standard Kantata OX error message explaining why the object could not be deleted.

Request
path Parameters
id
required
integer

The ID of the Model.

Responses
204

Project Template has been deleted.

400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

delete/project_templates/{id}
Request samples
Response samples
application/json
{
  • "errors": [
    ]
}