Change a template at its version; key and project type stay (desk:admin)
PUT /api/desk/v1/project-templates/{id}
Module: Desk · operationId: updateProjectTemplate · Tag: Projects · Auth: access token (Authorization: Bearer <accessToken>)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string (uuid) | yes |
Request body
application/json (required)
key(string, required): Key of the template, unique in the tenantname(string, required): Name of the template (max length 200)typeId(string, required): Project type (id or key on input); fixedarchived(boolean): Archived: the template is kept for existing data but no longer offered in pickersblueprint(object): What a project made from the template getsdependencies(array of object): Finish-to-start between tasks (keys); no cyclesfrom(string, required): Key of the task that has to end firstto(string, required): Key of the task that starts after itlagDays(integer): Days between the end of from and the start of to (max 365)
fields(object): Custom field values of new projectsmilestones(array of object): Milestones of the new projectkey(string, required): Key of the milestone in the templatetitle(string, required): Title of the milestonecompletion(string): manual: achieved by hand; items: reached once all its items are done (one ofmanual,items)offsetDays(integer): Due this many days after the project start (max 3650)
payments(array of object): The payment plan of new projects (one final payment)amount(number, required): Net amount or percentage (amountKind)role(string, required): interim payment or the final payment (one ofinterim,final)title(string, required): Title of the paymentamountKind(string): fixed: amount is net EUR; percent: amount is a percentage of the project's budgetAmount (one offixed,percent)milestoneKey(string): A milestone of the template that makes it duetaxRate(number): VAT rate in percent
tasks(array of BlueprintTask): Tasks: items of the new projectkey(string, required): Key of the task in the template (referenced by dependencies) (max length 64)title(string, required): Title of the item the task creates (max length 200)description(string): Description of the item the task createsdurationDays(integer): Calendar days including the first; 0 and 1 are one day (max 3650)estimateMinutes(integer, nullable): Estimate of the created item in minutesmilestoneKey(string): A milestone of the template the task counts foroffsetDays(integer): Days after the project start (max 3650)parentKey(string): An earlier task; its type is on a higher level than this task'stypeId(string): Item type (id or key); empty uses the project type's task type
description(string): Description of the templateid(string, read-only): Id of the templateversion(integer): Version of the template; send it back on change (409 version_conflict when it is outdated)
Example:
{
"archived": false,
"blueprint": {
"dependencies": [
{
"from": "server",
"lagDays": 0,
"to": "software"
},
{
"from": "software",
"lagDays": 4,
"to": "start"
}
],
"fields": {},
"milestones": [
{
"completion": "items",
"key": "basis",
"offsetDays": 2,
"title": "Grundinstallation abgeschlossen"
},
{
"completion": "manual",
"key": "live",
"offsetDays": 20,
"title": "Go-live"
}
],
"payments": [
{
"amount": 30,
"amountKind": "percent",
"milestoneKey": "basis",
"role": "interim",
"title": "Abschlag nach Grundinstallation"
},
{
"amount": 70,
"amountKind": "percent",
"milestoneKey": "live",
"role": "final",
"title": "Schlussrechnung"
}
],
"tasks": [
{
"durationDays": 3,
"key": "installation",
"offsetDays": 0,
"title": "Grundinstallation",
"typeId": "5d2e3f4a-6b7c-4d8e-9f0a-2b3c4d5e6f06"
},
{
"durationDays": 2,
"key": "server",
"milestoneKey": "basis",
"offsetDays": 0,
"parentKey": "installation",
"title": "Server und Datenbank einrichten",
"typeId": "5d2e3f4a-6b7c-4d8e-9f0a-2b3c4d5e6f07"
},
{
"durationDays": 1,
"key": "software",
"milestoneKey": "basis",
"offsetDays": 2,
"parentKey": "installation",
"title": "Software installieren und lizenzieren",
"typeId": "5d2e3f4a-6b7c-4d8e-9f0a-2b3c4d5e6f07"
},
{
"durationDays": 1,
"key": "start",
"milestoneKey": "live",
"offsetDays": 18,
"title": "Produktivstart",
"typeId": "5d2e3f4a-6b7c-4d8e-9f0a-2b3c4d5e6f07"
}
]
},
"description": "Vier Wochen: Installation, Konfiguration, Datenübernahme, Schnittstellen, Schulung und Go-live.",
"id": "9f6a7b8c-0d1e-4f2a-9b4c-6d7e8f9a0b01",
"key": "erp-einfuehrung",
"name": "ERP-Einführung",
"typeId": "6e3f4a5b-7c8d-4e9f-8a1b-3c4d5e6f7a01",
"version": 2
}
Responses
- 200 Template (
application/json) - 409 Version conflict
Fields of the 200 answer:
key(string, required): Key of the template, unique in the tenantname(string, required): Name of the template (max length 200)typeId(string, required): Project type (id or key on input); fixedarchived(boolean): Archived: the template is kept for existing data but no longer offered in pickersblueprint(object): What a project made from the template getsdependencies(array of object): Finish-to-start between tasks (keys); no cyclesfrom(string, required): Key of the task that has to end firstto(string, required): Key of the task that starts after itlagDays(integer): Days between the end of from and the start of to (max 365)
fields(object): Custom field values of new projectsmilestones(array of object): Milestones of the new projectkey(string, required): Key of the milestone in the templatetitle(string, required): Title of the milestonecompletion(string): manual: achieved by hand; items: reached once all its items are done (one ofmanual,items)offsetDays(integer): Due this many days after the project start (max 3650)
payments(array of object): The payment plan of new projects (one final payment)amount(number, required): Net amount or percentage (amountKind)role(string, required): interim payment or the final payment (one ofinterim,final)title(string, required): Title of the paymentamountKind(string): fixed: amount is net EUR; percent: amount is a percentage of the project's budgetAmount (one offixed,percent)milestoneKey(string): A milestone of the template that makes it duetaxRate(number): VAT rate in percent
tasks(array of BlueprintTask): Tasks: items of the new projectkey(string, required): Key of the task in the template (referenced by dependencies) (max length 64)title(string, required): Title of the item the task creates (max length 200)description(string): Description of the item the task createsdurationDays(integer): Calendar days including the first; 0 and 1 are one day (max 3650)estimateMinutes(integer, nullable): Estimate of the created item in minutesmilestoneKey(string): A milestone of the template the task counts foroffsetDays(integer): Days after the project start (max 3650)parentKey(string): An earlier task; its type is on a higher level than this task'stypeId(string): Item type (id or key); empty uses the project type's task type
description(string): Description of the templateid(string, read-only): Id of the templateversion(integer): Version of the template; send it back on change (409 version_conflict when it is outdated)
Example 200 answer:
{
"archived": false,
"blueprint": {
"dependencies": [
{
"from": "server",
"lagDays": 0,
"to": "software"
},
{
"from": "software",
"lagDays": 4,
"to": "start"
}
],
"fields": {},
"milestones": [
{
"completion": "items",
"key": "basis",
"offsetDays": 2,
"title": "Grundinstallation abgeschlossen"
},
{
"completion": "manual",
"key": "live",
"offsetDays": 20,
"title": "Go-live"
}
],
"payments": [
{
"amount": 30,
"amountKind": "percent",
"milestoneKey": "basis",
"role": "interim",
"title": "Abschlag nach Grundinstallation"
},
{
"amount": 70,
"amountKind": "percent",
"milestoneKey": "live",
"role": "final",
"title": "Schlussrechnung"
}
],
"tasks": [
{
"durationDays": 3,
"key": "installation",
"offsetDays": 0,
"title": "Grundinstallation",
"typeId": "5d2e3f4a-6b7c-4d8e-9f0a-2b3c4d5e6f06"
},
{
"durationDays": 2,
"key": "server",
"milestoneKey": "basis",
"offsetDays": 0,
"parentKey": "installation",
"title": "Server und Datenbank einrichten",
"typeId": "5d2e3f4a-6b7c-4d8e-9f0a-2b3c4d5e6f07"
},
{
"durationDays": 1,
"key": "software",
"milestoneKey": "basis",
"offsetDays": 2,
"parentKey": "installation",
"title": "Software installieren und lizenzieren",
"typeId": "5d2e3f4a-6b7c-4d8e-9f0a-2b3c4d5e6f07"
},
{
"durationDays": 1,
"key": "start",
"milestoneKey": "live",
"offsetDays": 18,
"title": "Produktivstart",
"typeId": "5d2e3f4a-6b7c-4d8e-9f0a-2b3c4d5e6f07"
}
]
},
"description": "Vier Wochen: Installation, Konfiguration, Datenübernahme, Schnittstellen, Schulung und Go-live.",
"id": "9f6a7b8c-0d1e-4f2a-9b4c-6d7e8f9a0b01",
"key": "erp-einfuehrung",
"name": "ERP-Einführung",
"typeId": "6e3f4a5b-7c8d-4e9f-8a1b-3c4d5e6f7a01",
"version": 2
}
Example request
curl -X PUT 'https://api.mbcom.cloud/api/desk/v1/project-templates/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
--data '{"archived":false,"blueprint":{"dependencies":[{"from":"server","lagDays":0,"to":"software"},{"from":"software","lagDays":4,"to":"start"}],"fields":{},"milestones":[{"completion":"items","key":"basis","offsetDays":2,"title":"Grundinstallation abgeschlossen"},{"completion":"manual","key":"live","offsetDays":20,"title":"Go-live"}],"payments":[{"amount":30,"amountKind":"percent","milestoneKey":"basis","role":"interim","title":"Abschlag nach Grundinstallation"},{"amount":70,"amountKind":"percent","milestoneKey":"live","role":"final","title":"Schlussrechnung"}],"tasks":[{"durationDays":3,"key":"installation","offsetDays":0,"title":"Grundinstallation","typeId":"5d2e3f4a-6b7c-4d8e-9f0a-2b3c4d5e6f06"},{"durationDays":2,"key":"server","milestoneKey":"basis","offsetDays":0,"parentKey":"installation","title":"Server und Datenbank einrichten","typeId":"5d2e3f4a-6b7c-4d8e-9f0a-2b3c4d5e6f07"},{"durationDays":1,"key":"software","milestoneKey":"basis","offsetDays":2,"parentKey":"installation","title":"Software installieren und lizenzieren","typeId":"5d2e3f4a-6b7c-4d8e-9f0a-2b3c4d5e6f07"},{"durationDays":1,"key":"start","milestoneKey":"live","offsetDays":18,"title":"Produktivstart","typeId":"5d2e3f4a-6b7c-4d8e-9f0a-2b3c4d5e6f07"}]},"description":"Vier Wochen: Installation, Konfiguration, Datenübernahme, Schnittstellen, Schulung und Go-live.","id":"9f6a7b8c-0d1e-4f2a-9b4c-6d7e8f9a0b01","key":"erp-einfuehrung","name":"ERP-Einführung","typeId":"6e3f4a5b-7c8d-4e9f-8a1b-3c4d5e6f7a01","version":2}'