The POST project from a template endpoint creates a new project by applying a predefined project template.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Request Body
The request body must be an XML document with root element create. The main input is provided inside ProjectBase.
<create>
<ProjectBase>
...
</ProjectBase>For date/time handling and time zone configuration, see Dates & Time zones.
Body Fields
The following fields can be addressed when creating a project from a project template via the smenso API.
| Name | Type | Description |
|---|---|---|
| TemplateId | GUID | The GUID of the project template (to be used in the endpoint URL) |
| IsPrivate | boolean | Determines whether the project is created as private or public. IsPrivate = true means the project is created privately. IsPrivate = false means the project is created publicly. Note: If true is selected here, the person who created the project via the API is authorized by default in the private project. In a subsequent step, it must be determined via the Project endpoint which other persons should have access to the private project in the UI. |
| Title* | string | Required Parameter The title of the project |
| StartDate | string | If a new start date is to be assigned to the project to be created (field If empty, the start date from the template is adopted. |
| StatusId | integer | Determines whether the project is created as "inactive" or "active". StatusId 1 = inactive StatusId 0 = active |
| ProjectType* | string | Required Parameter The field Note: The name of the project type can be used, which is resolved to the TypeId field. |
| Folder* | string | Required Parameter The field Note: The name of the project folder can be used, which is resolved to the PhaseId field. |
| Code | string | The field Project ID from the project master data. |
Optional Fields
In the project creation assistant, there is an optional possibility not to adopt individual project master data from the project template. These checkboxes can be selected and deselected in the user interface. By default, all checkboxes are active, i.e., all values are adopted from the project template.
Similarly, when creating a project with a project template via the API.
All optional fields are of type boolean and have default values (true/false). They only need to be specified in the request if a different value than the default is to be specified.
| Name | Type | Description |
|---|---|---|
| AdjustTaskDates | boolean | Checkbox in the project creation assistant to specify whether task dates should be adjusted to the new start date: Default value: True |
| Tasks | boolean | Checkbox to select whether tasks should be adopted from the project template. Default value: True |
| Flavors | boolean | Checkbox to select whether (project master data) flavors should be adopted from the project template. Default value: True |
| Labels | boolean | Checkbox to select whether (project master data) labels should be adopted from the project template. Default value: True |
| Manager | boolean | Checkbox to select whether the field Default value: True |
| TasksWorkflow | boolean | The custom workflow defined as the default for tasks in the project settings. Default value: True |
| TasksTemplate | boolean | The task template defined as the default for new tasks in the project settings. Default value: True |
| FolderTasksTemplate | boolean | The task template that can be set as the default for new tasks per folder in the folder settings. Default value: True |
| ViewSettings | boolean | Field is currently inactive / can be ignored. Preparation for the adoption of views from the project template. |
| Budget | boolean | The field Default value: True |
| Location | boolean | The field Default value: True |
| Description | boolean | The field Default value: True |
| HourlyRate | boolean | The field Default value: True |
| Goal | boolean | The field Default value: True |
| Benefit | boolean | The field Default value: True |
| Observers | boolean | The Default value: True |
| Permissions | boolean | The project setting Default value: True |
| BlockTimeRecording | boolean | The toggle Default value: False |
| MarkedColumns | boolean | Column markings (color/status) that can be set in columns of the project. Default value: True |
| ColumnDescriptions | boolean | Column descriptions that can be set in columns of the project. Default value: True |
Examples
Minimal request
<create>
<ProjectBase>
<IsPrivate>false</IsPrivate>
<StatusId>0</StatusId>
<Title><![CDATA[My Project]]></Title>
<ProjectType><![CDATA[Digitalisierung]]></ProjectType>
<Folder><![CDATA[Ideen]]></Folder>
</ProjectBase>
</create>Request with optional flags (example)
<create>
<ProjectBase>
<IsPrivate>false</IsPrivate>
<StartDate>05.09.2024</StartDate>
<StatusId>0</StatusId>
<Title /> <!-- Required Parameter -->
<ProjectType></ProjectType> <!-- Required Parameter -->
<Folder></Folder> <!-- Required Parameter -->
<Code />
</ProjectBase>
<!-- From here, specifications are only necessary if one of the values should *not* be adopted from the template. By default, all values are adopted from the template -->
<AdjustTaskDates>true</AdjustTaskDates>
<Tasks>true</Tasks>
<Flavors>true</Flavors>
<Labels>true</Labels>
<Manager>true</Manager>
<TasksWorkflow>true</TasksWorkflow>
<TasksTemplate>true</TasksTemplate>
<FolderTasksTemplate>true</FolderTasksTemplate>
<ViewSettings>true</ViewSettings>
<Budget>true</Budget>
<Location>true</Location>
<Description>true</Description>
<HourlyRate>true</HourlyRate>
<Goal>true</Goal>
<Benefit>true</Benefit>
<Observers>true</Observers>
<Permissions>true</Permissions>
<BlockTimeRecording>false</BlockTimeRecording>
<MarkedColumns>true</MarkedColumns>
<ColumnDescriptions>true</ColumnDescriptions>
</create>Ticket responses
Upon successful execution, the ProjectID of the created project is returned directly (e.g., a6862cba-5245-4af8-92b3-b43f12feb149).
<Result>
<HasErrors>false</HasErrors>
<ProjectId>a6862cba-5245-4af8-92b3-b43f12feb149</ProjectId>
</Result>In case of an error, details about the error are returned:
- e.g., due to an already existing project title:
<Result>
<HasErrors>true</HasErrors>
<Errors>
<ErrorDetail>A project with Title 'Preparing the Fall of Tom Riddle aka Lord Voldemort' already exists</ErrorDetail>
</Errors>
</Result>- or missing required field specifications:
<Result>
<HasErrors>true</HasErrors>
<Errors>
<ErrorDetail>The field PhaseId must be between 1 and 2147483647.</ErrorDetail>
<ErrorDetail>The Title field is required.</ErrorDetail>
</Errors>
</Result> 200OK
401Unauthorized
403Forbidden
