API · v1 · stable
CODEMETA OSDeveloper Center
FR
Ouvrir la console
Entité · task_templates

Task Template Schema

ID du schéma
task_template
Collection
task_templates
Autorisations
  • Liretask_template_view
  • Créertask_template_create
  • Modifiertask_template_edit
  • Supprimertask_template_delete

Champs

Task Template Schema

task_templates4 autorisations

Reusable, versioned blueprint for repeating MSP workflows (ADR 0138). Sub-templates are referenced by id, not duplicated. Executions materialize as a tree of `tasks` carrying templateId/templateVersion.

namestringobligatoire
1–120 caractères
slugstringfacultatif

Stable URL slug, unique per tenant

1–80 caractèresMotifnullable
descriptionstringfacultatif
max. 4000 caractèresnullable
categorystringobligatoire
onboardingrolloutwartungincidentcomplianceoffboardingallgemein
tagsstring[]facultatif
Par défaut : []
usableInstring[]facultatif

Where the template is offered for selection (ticket/project/contract/task/vehicle). Empty or missing = everywhere. Only applies to the root template, never to sub-template references.

éléments uniquesnullable
componentOnlybooleanfacultatif

Building block: offered only as a sub-template inside other templates, never on its own. Missing = false.

nullable
ownerOrgUnitIduuidfacultatif
nullable
visibilitystringobligatoire
tenantorg_unitprivate
defaultAssigneeIdsuuid[]facultatif

Internal user ids pre-assigned to the task created from this template

Par défaut : []
defaultOrgUnitIduuidfacultatif

Team the task created from this template is pinned to

nullable
assigneeRuleobjectfacultatif

ADR 0561: role reference resolved to task.assigneeIds at instantiation and frozen there. Wins over defaultAssigneeIds on the same level; an explicit assigneeOverrides entry still wins over both.

nullable
taskTypestringfacultatif

Task type of the root task created from this template. Absent/null = TASK.

TASKSTORYBUGEPICSUBTASKMILESTONEnull
nullable
versionstringobligatoire
MotifPar défaut : "1.0.0"lecture seule
statusstringobligatoire
draftactivedeprecated
Par défaut : "draft"lecture seule
replacedByIduuidfacultatif
lecture seulenullable
changelogNotestringfacultatif
max. 500 caractèresnullable
versionFamilyIduuidfacultatif

Groups all versions of the same template. First version sets its own _id as familyId.

lecture seulenullable
estimateModestringobligatoire
fixedpert
Par défaut : "fixed"
estimateMinutesintegerfacultatif
≥ 0nullable
pertOptimisticintegerfacultatif
≥ 0nullable
pertLikelyintegerfacultatif
≥ 0nullable
pertPessimisticintegerfacultatif
≥ 0nullable
bufferPercentintegerfacultatif
0 – 200Par défaut : 0
dueOffsetobjectfacultatif

ADR 0831: due date of the root task relative to the target entity (start/end/created) or the instantiation instant (now). A caller-supplied dueDate wins.

Par défaut : nullnullable
valueintegerobligatoire
0 – 10000
unitstringobligatoire
mhdwmo
directionstringobligatoire
beforeafter
anchorstringobligatoire
startendcreatednow
anchorFieldstringfacultatif

Explicit dot path on the target entity that replaces the semantic anchor probing.

max. 100 caractèresMotifPar défaut : nullnullable
requiredSkillsobject[]facultatif
Par défaut : []
skillIduuidobligatoire
minLevelstringobligatoire
BEGINNERINTERMEDIATEADVANCEDEXPERT
mandatorybooleanfacultatif
Par défaut : true
helpfulSkillsobject[]facultatif
Par défaut : []
skillIduuidobligatoire
minLevelstringobligatoire
BEGINNERINTERMEDIATEADVANCEDEXPERT
checklistTemplateIduuidfacultatif
nullable
inlineChecklistobject[]facultatif
Par défaut : []
iduuidobligatoire
textstringobligatoire
1–300 caractères
requiredbooleanfacultatif
Par défaut : false
orderintegerfacultatif
≥ 0
parentNodeIduuidfacultatif
Par défaut : nullnullable
defaultAssigneeIduuidfacultatif
nullable
visibleIfobjectfacultatif

ADR 0511: this checklist row is only materialised when the condition holds. May reference `inputs[].key` and answers from earlier rows.

Par défaut : nullnullable
answerKeystringfacultatif

Stable key under which this step's answer is recorded in `answers`. Conditions reference this, never the item index.

max. 40 caractèresMotifPar défaut : nullnullable
choiceobjectfacultatif

Scenario selector; each option carries its own completion actions.

Par défaut : nullnullable
modestringfacultatif
singlemulti
Par défaut : "single"
requiredbooleanfacultatif
Par défaut : falsenullable
optionsobject[]obligatoire
Par défaut : []
optionIduuidobligatoire
labelstringobligatoire
1–200 caractères
sortOrderintegerfacultatif
≥ 0nullable
injectobjectfacultatif

ADR 0511: picking this option inserts the referenced template's steps into THIS checklist (one record, one progress, one completion gate) instead of spawning a separate one.

Par défaut : nullnullable
checklistTemplateIduuidobligatoire
groupedbooleanfacultatif

Render the inserted steps as a collapsible block under a parent step.

Par défaut : true
answerKeyPrefixstringfacultatif

Namespace for the inserted template's answer keys, so inserting the same template twice cannot overwrite answers.

max. 40 caractèresMotifnullable
actionsobject[]facultatif
Par défaut : []nullable
typestringobligatoire
1–64 caractères
paramsobjectfacultatif
nullable
labelstringfacultatif
nullable
phasestringfacultatif
onEnteronExitnull
nullable
inputobjectfacultatif

Typed answer step (ADR 0511). Renders an input instead of a checkbox; the value lands in `answers[answerKey]`.

Par défaut : nullnullable
typestringobligatoire
textnumberdatebooleanselectentity_ref
entityTypestringfacultatif
max. 64 caractèresnullable
optionsstring[]facultatif
Par défaut : []nullable
requiredbooleanfacultatif
Par défaut : false
unitstringfacultatif
max. 20 caractèresnullable
minnumberfacultatif
nullable
maxnumberfacultatif
nullable
dueOffsetobjectfacultatif

ADR 0831: due date of this checklist row relative to the target entity; resolved into the checklist item at instantiation.

Par défaut : nullnullable
valueintegerobligatoire
0 – 10000
unitstringobligatoire
mhdwmo
directionstringobligatoire
beforeafter
anchorstringobligatoire
startendcreatednow
anchorFieldstringfacultatif

Explicit dot path on the target entity that replaces the semantic anchor probing.

max. 100 caractèresMotifPar défaut : nullnullable
knowledgeRefsobject[]facultatif
Par défaut : []
typestringobligatoire
kb_articlefileurlvideo
refIdstringobligatoire
max. 1000 caractères
labelstringobligatoire
max. 200 caractères
rolestringfacultatif
guidereferencetraining
Par défaut : "reference"
inlineTasksobject[]facultatif
Par défaut : []
iduuidobligatoire
titlestringobligatoire
1–200 caractères
descriptionstringfacultatif
max. 2000 caractèresnullable
orderintegerobligatoire
≥ 0
parentNodeIduuidfacultatif
Par défaut : nullnullable
taskTypestringfacultatif
TASKSTORYBUGEPICSUBTASKMILESTONEnull
nullable
optionalbooleanfacultatif
Par défaut : false
estimateMinutesintegerfacultatif
≥ 0nullable
dueOffsetobjectfacultatif

ADR 0831: due date of this inline sub-task relative to the target entity.

Par défaut : nullnullable
valueintegerobligatoire
0 – 10000
unitstringobligatoire
mhdwmo
directionstringobligatoire
beforeafter
anchorstringobligatoire
startendcreatednow
anchorFieldstringfacultatif

Explicit dot path on the target entity that replaces the semantic anchor probing.

max. 100 caractèresMotifPar défaut : nullnullable
defaultAssigneeIdsuuid[]facultatif
Par défaut : []
defaultOrgUnitIduuidfacultatif
nullable
assigneeRuleobjectfacultatif
nullable
blockedByNodeIdsuuid[]facultatif
Par défaut : nullnullable
visibleIfobjectfacultatif

ADR 0511: the sub-task is only created when this condition holds against the instantiation inputs.

Par défaut : nullnullable
subTemplatesobject[]facultatif
Par défaut : []
iduuidobligatoire
templateIduuidobligatoire
versionPinstringfacultatif
Par défaut : "latest"
orderintegerobligatoire
≥ 0
optionalbooleanfacultatif
Par défaut : false
parallelizablebooleanfacultatif
Par défaut : false
quantitystringfacultatif
1per_assetper_userper_seat
Par défaut : "1"
defaultAssigneeRolestringfacultatif
inheritproject_ownercustomer_contactunassigned
Par défaut : "inherit"
defaultAssigneeIdsuuid[]facultatif
Par défaut : []
defaultOrgUnitIduuidfacultatif
nullable
assigneeRuleobjectfacultatif
nullable
dueOffsetobjectfacultatif

ADR 0831: due date of this step relative to the target entity. Wins over the root rule of the referenced sub-template.

Par défaut : nullnullable
valueintegerobligatoire
0 – 10000
unitstringobligatoire
mhdwmo
directionstringobligatoire
beforeafter
anchorstringobligatoire
startendcreatednow
anchorFieldstringfacultatif

Explicit dot path on the target entity that replaces the semantic anchor probing.

max. 100 caractèresMotifPar défaut : nullnullable
conditionobjectfacultatif
nullable
fieldstringobligatoire
1–100 caractères
opstringobligatoire
eqneqinningtlt
valueanyobligatoire
visibleIfobjectfacultatif

ADR 0511: full AND/OR/NOT condition for this sub-template. Supersedes the single-leaf `condition`, which stays supported.

Par défaut : nullnullable
blockedByNodeIdsuuid[]facultatif
Par défaut : nullnullable
inputsobject[]facultatif
Par défaut : []
keystringobligatoire
max. 40 caractèresMotif
labelstringobligatoire
1–100 caractères
helperTextstringfacultatif
max. 200 caractèresnullable
typestringobligatoire
stringnumberselectasset_refparty_refdate
optionsstring[]facultatif
nullable
requiredbooleanfacultatif
Par défaut : false
defaultanyfacultatif
deliverablesobject[]facultatif
Par défaut : []
typestringobligatoire
screenshotdocumentconfigsignoffasset_change
labelstringobligatoire
1–200 caractères
requiredbooleanfacultatif
Par défaut : false
billableByDefaultbooleanfacultatif
Par défaut : true
defaultBillingModestringfacultatif
tmfixedflat
Par défaut : "tm"
serviceArticleIduuidfacultatif
nullable
riskLevelstringfacultatif
lowmediumhigh
Par défaut : "low"
requiresApprovalbooleanfacultatif
Par défaut : false
approverRolestringfacultatif
max. 60 caractèresnullable
complianceTagsstring[]facultatif
Par défaut : []
recurringRulestringfacultatif

DEPRECATED (ADR 0224): legacy iCal RRULE string. Use `recurrence.rrule`. The worker prefers `recurrence` and falls back to this for old templates.

max. 200 caractèresnullable
recurringModestringfacultatif

Feedback 01a10bde: 'fixed' (default when absent) = a new root task per due occurrence. 'afterCompletion' = the recurring materializer skips a due occurrence while a root task it generated earlier is still open.

fixedafterCompletionnull
nullable
recurrenceobjectfacultatif

ADR 0224: template-level recurring schedule with fan-out target. Supersedes recurringRule.

Par défaut : nullnullable
rrulestringobligatoire

iCal RRULE string.

1–300 caractères
timezonestringfacultatif

IANA TZ; null = tenant TZ.

max. 64 caractèresnullable
targetobjectfacultatif
kindstringobligatoire
singularper_assetper_customer
Par défaut : "singular"
assetFilterobjectfacultatif

per_asset: materialize one task per matching asset (linked via assetIds).

nullable
manufacturersstring[]facultatif
Par défaut : []
schemaPatternsstring[]facultatif
Par défaut : []
tagsstring[]facultatif
Par défaut : []
customerFilterobjectfacultatif

per_customer: materialize one task per matching customer.

nullable
tagsstring[]facultatif
Par défaut : []
contractIdsuuid[]facultatif
Par défaut : []
maintenanceWindowobjectfacultatif
nullable
respectContractSlabooleanfacultatif
Par défaut : false
earliestHourintegerfacultatif
0 – 23nullable
latestHourintegerfacultatif
0 – 23nullable
weekdaysOnlybooleanfacultatif
Par défaut : false
healthTriggerobjectfacultatif

Optional asset-health/RMM trigger (Octoja) in addition to the calendar rule.

nullable
enabledbooleanfacultatif
Par défaut : false
alertTypestringfacultatif
max. 80 caractèresnullable
assetMetricstringfacultatif
max. 80 caractèresnullable
lastMaterializedOccurrencedatefacultatif

Server-managed: YYYY-MM-DD of the last materialized occurrence (idempotency cursor).

nullable
assignmentRuleobjectfacultatif

ADR 0224: who gets assigned when a task is materialized from this template.

Par défaut : nullnullable
strategystringobligatoire
rotationai_dispatchai_suggestfixed
poolobjectfacultatif

Candidate pool filter. Empty/absent → whole tenant (rotation) or global dispatch (ai_*).

nullable
orgUnitIdsuuid[]facultatif
Par défaut : []
teamIdsuuid[]facultatif
Par défaut : []
roleIdsuuid[]facultatif
Par défaut : []
employmentTypesstring[]facultatif
Par défaut : []
apprenticesOnlybooleanfacultatif
Par défaut : false
requiredSkillIdsuuid[]facultatif
Par défaut : []
explicitUserIdsuuid[]facultatif
Par défaut : []
freeTextInstructionsstringfacultatif

Free-text rule appended to the LLM prompt. Only used by ai_* strategies (never by rotation).

max. 4000 caractèresnullable
weightsOverrideobjectfacultatif

Per-template override of the tenant dispatch weights (ai_dispatch only).

nullable
skillMatchnumberfacultatif
0 – 100
availabilitynumberfacultatif
0 – 100
workloadnumberfacultatif
0 – 100
customerAffinitynumberfacultatif
0 – 100
slaUrgencynumberfacultatif
0 – 100
customerTiernumberfacultatif
0 – 100
geoProximitynumberfacultatif
0 – 100
languageMatchnumberfacultatif
0 – 100
rotationobjectfacultatif
nullable
balanceBystringfacultatif
countminutes
Par défaut : "count"
avoidConsecutivebooleanfacultatif
Par défaut : true
onUnavailablestringfacultatif
skipqueue
Par défaut : "skip"
teachingPairobjectfacultatif

Pair a junior shadow with the matched senior. XP to junior, karma to both.

nullable
enabledbooleanfacultatif
Par défaut : false
shadowApprenticesOnlybooleanfacultatif
Par défaut : true
shadowSkillBelowLevelstringfacultatif
BEGINNERINTERMEDIATEADVANCEDEXPERT
nullable
xpToShadowbooleanfacultatif
Par défaut : true
autoAssignModestringfacultatif

ai_* only: AI_FULL auto-assigns, AI_SUGGEST leaves unassigned with a suggestion.

AI_FULLAI_SUGGEST
nullable
fixedobjectfacultatif
nullable
assigneeRolestringfacultatif
max. 60 caractèresnullable
userIduuidfacultatif
nullable
rewardsobjectfacultatif

ADR 0224: karma + skill-XP granted on completion of tasks from this template.

Par défaut : nullnullable
karmaRewardintegerfacultatif
0 – 100000Par défaut : 0
xpRewardsobject[]facultatif

Explicit per-skill XP override. Empty → fall back to the requiredSkills-derived XP.

Par défaut : []
skillIduuidobligatoire
xpintegerobligatoire
0 – 10000
requireVerifiedCompletionbooleanfacultatif

Anti-gaming: only grant rewards when deliverables/approval are satisfied, not on a bare status click.

Par défaut : false
prerequisiteTemplateIdsuuid[]facultatif

Templates that must have a recent successful execution before instantiating this one (Pre-Flight v2 check).

Par défaut : nullnullable
blockedByTemplateIdsuuid[]facultatif

ADR 0218: at instantiation into a project, this template’s root task is blocked by existing same-project root tasks of these templates.

Par défaut : nullnullable
driftBaselineobjectfacultatif

Frozen baseline for drift detection. Set via /drift/apply-baseline or /drift/acknowledge.

Par défaut : nullnullable
mediannumberobligatoire
≥ 0
q25numberobligatoire
≥ 0
q75numberobligatoire
≥ 0
computedAtdatetimeobligatoire
markedKnownAtdatetimefacultatif
nullable
executionCountintegerfacultatif
≥ 0Par défaut : 0lecture seule
avgActualMinutesCachenumberfacultatif
≥ 0lecture seulenullable
p50ActualMinutesCachenumberfacultatif
≥ 0lecture seulenullable
p90ActualMinutesCachenumberfacultatif
≥ 0lecture seulenullable
lastExecutedAtdatetimefacultatif
lecture seulenullable
lastStatsComputedAtdatetimefacultatif
lecture seulenullable

Endpoints standard

Cette ressource suit le contrat CRUD générique de la plateforme. Lisez les conventions pour la pagination, l'idempotence, le verrouillage optimiste et l'audit. Les endpoints principaux :

  • GET /api/v1/task_templates — Liste, paginée et filtrable
  • GET /api/v1/task_templates/<id> — Une entité
  • POST /api/v1/task_templates — Créer
  • PATCH /api/v1/task_templates/<id> — Mise à jour partielle
  • DELETE /api/v1/task_templates/<id> — Suppression logique
  • GET /api/v1/task_templates/<id>/timeline — Audit et activités

Recherche