Introduction
The endpoint allows adding projects based on a project template.
Adding projects via a project template is defined by various attributes that can be transmitted in XML format in the request.
Each endpoint requires the use of a personalized token, which can be obtained from the Admin Center and must be set in the header. More information about the header.
Endpoint
**POST** `https://WORKSPACENAME.smenso.cloud/skyisland/api/Integration/template/project/create/{templateId}`
(Remove curly braces after inserting the template ID)
Fields
The following fields can be addressed when creating a project from a project template via the smenso API.
Main Fields
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 <date> |
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.
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 |
Request Data
The request contains information for creating a project using a project template in XML format:
<create>
<ProjectBase>
<IsPrivate>false</IsPrivate>
<StartDate>0001-01-01T01:00:00+01:00</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>
Response
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>
Note
There is an earlier version of this endpoint (.../Integration/template/createproject/{templateid}). This will continue to be supported for the time being but will be deactivated in the medium term. For new requests, the above endpoint should be used.
Comments
0 comments
Please sign in to leave a comment.