API · v1 · estable
CODEMETA OSDeveloper Center
ES
Abrir la consola
Entidad · task_templates

Task Template Schema

ID del esquema
task_template
Colección
task_templates
Permisos
  • Leertask_template_view
  • Creartask_template_create
  • Modificartask_template_edit
  • Eliminartask_template_delete

Campos

Task Template Schema

task_templates4 permisos

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.

namestringobligatorio
1–120 caracteres
slugstringopcional

Stable URL slug, unique per tenant

1–80 caracteresPatrónadmite null
descriptionstringopcional
máx. 4000 caracteresadmite null
categorystringobligatorio
onboardingrolloutwartungincidentcomplianceoffboardingallgemein
tagsstring[]opcional
Valor por defecto: []
usableInstring[]opcional

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.

elementos únicosadmite null
componentOnlybooleanopcional

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

admite null
ownerOrgUnitIduuidopcional
admite null
visibilitystringobligatorio
tenantorg_unitprivate
defaultAssigneeIdsuuid[]opcional

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

Valor por defecto: []
defaultOrgUnitIduuidopcional

Team the task created from this template is pinned to

admite null
assigneeRuleobjectopcional

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.

admite null
taskTypestringopcional

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

TASKSTORYBUGEPICSUBTASKMILESTONEnull
admite null
versionstringobligatorio
PatrónValor por defecto: "1.0.0"solo lectura
statusstringobligatorio
draftactivedeprecated
Valor por defecto: "draft"solo lectura
replacedByIduuidopcional
solo lecturaadmite null
changelogNotestringopcional
máx. 500 caracteresadmite null
versionFamilyIduuidopcional

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

solo lecturaadmite null
estimateModestringobligatorio
fixedpert
Valor por defecto: "fixed"
estimateMinutesintegeropcional
≥ 0admite null
pertOptimisticintegeropcional
≥ 0admite null
pertLikelyintegeropcional
≥ 0admite null
pertPessimisticintegeropcional
≥ 0admite null
bufferPercentintegeropcional
0 – 200Valor por defecto: 0
dueOffsetobjectopcional

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.

Valor por defecto: nulladmite null
valueintegerobligatorio
0 – 10000
unitstringobligatorio
mhdwmo
directionstringobligatorio
beforeafter
anchorstringobligatorio
startendcreatednow
anchorFieldstringopcional

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

máx. 100 caracteresPatrónValor por defecto: nulladmite null
requiredSkillsobject[]opcional
Valor por defecto: []
skillIduuidobligatorio
minLevelstringobligatorio
BEGINNERINTERMEDIATEADVANCEDEXPERT
mandatorybooleanopcional
Valor por defecto: true
helpfulSkillsobject[]opcional
Valor por defecto: []
skillIduuidobligatorio
minLevelstringobligatorio
BEGINNERINTERMEDIATEADVANCEDEXPERT
checklistTemplateIduuidopcional
admite null
inlineChecklistobject[]opcional
Valor por defecto: []
iduuidobligatorio
textstringobligatorio
1–300 caracteres
requiredbooleanopcional
Valor por defecto: false
orderintegeropcional
≥ 0
parentNodeIduuidopcional
Valor por defecto: nulladmite null
defaultAssigneeIduuidopcional
admite null
visibleIfobjectopcional

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

Valor por defecto: nulladmite null
answerKeystringopcional

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

máx. 40 caracteresPatrónValor por defecto: nulladmite null
choiceobjectopcional

Scenario selector; each option carries its own completion actions.

Valor por defecto: nulladmite null
modestringopcional
singlemulti
Valor por defecto: "single"
requiredbooleanopcional
Valor por defecto: falseadmite null
optionsobject[]obligatorio
Valor por defecto: []
optionIduuidobligatorio
labelstringobligatorio
1–200 caracteres
sortOrderintegeropcional
≥ 0admite null
injectobjectopcional

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.

Valor por defecto: nulladmite null
checklistTemplateIduuidobligatorio
groupedbooleanopcional

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

Valor por defecto: true
answerKeyPrefixstringopcional

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

máx. 40 caracteresPatrónadmite null
actionsobject[]opcional
Valor por defecto: []admite null
typestringobligatorio
1–64 caracteres
paramsobjectopcional
admite null
labelstringopcional
admite null
phasestringopcional
onEnteronExitnull
admite null
inputobjectopcional

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

Valor por defecto: nulladmite null
typestringobligatorio
textnumberdatebooleanselectentity_ref
entityTypestringopcional
máx. 64 caracteresadmite null
optionsstring[]opcional
Valor por defecto: []admite null
requiredbooleanopcional
Valor por defecto: false
unitstringopcional
máx. 20 caracteresadmite null
minnumberopcional
admite null
maxnumberopcional
admite null
dueOffsetobjectopcional

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

Valor por defecto: nulladmite null
valueintegerobligatorio
0 – 10000
unitstringobligatorio
mhdwmo
directionstringobligatorio
beforeafter
anchorstringobligatorio
startendcreatednow
anchorFieldstringopcional

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

máx. 100 caracteresPatrónValor por defecto: nulladmite null
knowledgeRefsobject[]opcional
Valor por defecto: []
typestringobligatorio
kb_articlefileurlvideo
refIdstringobligatorio
máx. 1000 caracteres
labelstringobligatorio
máx. 200 caracteres
rolestringopcional
guidereferencetraining
Valor por defecto: "reference"
inlineTasksobject[]opcional
Valor por defecto: []
iduuidobligatorio
titlestringobligatorio
1–200 caracteres
descriptionstringopcional
máx. 2000 caracteresadmite null
orderintegerobligatorio
≥ 0
parentNodeIduuidopcional
Valor por defecto: nulladmite null
taskTypestringopcional
TASKSTORYBUGEPICSUBTASKMILESTONEnull
admite null
optionalbooleanopcional
Valor por defecto: false
estimateMinutesintegeropcional
≥ 0admite null
dueOffsetobjectopcional

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

Valor por defecto: nulladmite null
valueintegerobligatorio
0 – 10000
unitstringobligatorio
mhdwmo
directionstringobligatorio
beforeafter
anchorstringobligatorio
startendcreatednow
anchorFieldstringopcional

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

máx. 100 caracteresPatrónValor por defecto: nulladmite null
defaultAssigneeIdsuuid[]opcional
Valor por defecto: []
defaultOrgUnitIduuidopcional
admite null
assigneeRuleobjectopcional
admite null
blockedByNodeIdsuuid[]opcional
Valor por defecto: nulladmite null
visibleIfobjectopcional

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

Valor por defecto: nulladmite null
subTemplatesobject[]opcional
Valor por defecto: []
iduuidobligatorio
templateIduuidobligatorio
versionPinstringopcional
Valor por defecto: "latest"
orderintegerobligatorio
≥ 0
optionalbooleanopcional
Valor por defecto: false
parallelizablebooleanopcional
Valor por defecto: false
quantitystringopcional
1per_assetper_userper_seat
Valor por defecto: "1"
defaultAssigneeRolestringopcional
inheritproject_ownercustomer_contactunassigned
Valor por defecto: "inherit"
defaultAssigneeIdsuuid[]opcional
Valor por defecto: []
defaultOrgUnitIduuidopcional
admite null
assigneeRuleobjectopcional
admite null
dueOffsetobjectopcional

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

Valor por defecto: nulladmite null
valueintegerobligatorio
0 – 10000
unitstringobligatorio
mhdwmo
directionstringobligatorio
beforeafter
anchorstringobligatorio
startendcreatednow
anchorFieldstringopcional

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

máx. 100 caracteresPatrónValor por defecto: nulladmite null
conditionobjectopcional
admite null
fieldstringobligatorio
1–100 caracteres
opstringobligatorio
eqneqinningtlt
valueanyobligatorio
visibleIfobjectopcional

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

Valor por defecto: nulladmite null
blockedByNodeIdsuuid[]opcional
Valor por defecto: nulladmite null
inputsobject[]opcional
Valor por defecto: []
keystringobligatorio
máx. 40 caracteresPatrón
labelstringobligatorio
1–100 caracteres
helperTextstringopcional
máx. 200 caracteresadmite null
typestringobligatorio
stringnumberselectasset_refparty_refdate
optionsstring[]opcional
admite null
requiredbooleanopcional
Valor por defecto: false
defaultanyopcional
deliverablesobject[]opcional
Valor por defecto: []
typestringobligatorio
screenshotdocumentconfigsignoffasset_change
labelstringobligatorio
1–200 caracteres
requiredbooleanopcional
Valor por defecto: false
billableByDefaultbooleanopcional
Valor por defecto: true
defaultBillingModestringopcional
tmfixedflat
Valor por defecto: "tm"
serviceArticleIduuidopcional
admite null
riskLevelstringopcional
lowmediumhigh
Valor por defecto: "low"
requiresApprovalbooleanopcional
Valor por defecto: false
approverRolestringopcional
máx. 60 caracteresadmite null
complianceTagsstring[]opcional
Valor por defecto: []
recurringRulestringopcional

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

máx. 200 caracteresadmite null
recurringModestringopcional

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
admite null
recurrenceobjectopcional

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

Valor por defecto: nulladmite null
rrulestringobligatorio

iCal RRULE string.

1–300 caracteres
timezonestringopcional

IANA TZ; null = tenant TZ.

máx. 64 caracteresadmite null
targetobjectopcional
kindstringobligatorio
singularper_assetper_customer
Valor por defecto: "singular"
assetFilterobjectopcional

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

admite null
manufacturersstring[]opcional
Valor por defecto: []
schemaPatternsstring[]opcional
Valor por defecto: []
tagsstring[]opcional
Valor por defecto: []
customerFilterobjectopcional

per_customer: materialize one task per matching customer.

admite null
tagsstring[]opcional
Valor por defecto: []
contractIdsuuid[]opcional
Valor por defecto: []
maintenanceWindowobjectopcional
admite null
respectContractSlabooleanopcional
Valor por defecto: false
earliestHourintegeropcional
0 – 23admite null
latestHourintegeropcional
0 – 23admite null
weekdaysOnlybooleanopcional
Valor por defecto: false
healthTriggerobjectopcional

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

admite null
enabledbooleanopcional
Valor por defecto: false
alertTypestringopcional
máx. 80 caracteresadmite null
assetMetricstringopcional
máx. 80 caracteresadmite null
lastMaterializedOccurrencedateopcional

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

admite null
assignmentRuleobjectopcional

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

Valor por defecto: nulladmite null
strategystringobligatorio
rotationai_dispatchai_suggestfixed
poolobjectopcional

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

admite null
orgUnitIdsuuid[]opcional
Valor por defecto: []
teamIdsuuid[]opcional
Valor por defecto: []
roleIdsuuid[]opcional
Valor por defecto: []
employmentTypesstring[]opcional
Valor por defecto: []
apprenticesOnlybooleanopcional
Valor por defecto: false
requiredSkillIdsuuid[]opcional
Valor por defecto: []
explicitUserIdsuuid[]opcional
Valor por defecto: []
freeTextInstructionsstringopcional

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

máx. 4000 caracteresadmite null
weightsOverrideobjectopcional

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

admite null
skillMatchnumberopcional
0 – 100
availabilitynumberopcional
0 – 100
workloadnumberopcional
0 – 100
customerAffinitynumberopcional
0 – 100
slaUrgencynumberopcional
0 – 100
customerTiernumberopcional
0 – 100
geoProximitynumberopcional
0 – 100
languageMatchnumberopcional
0 – 100
rotationobjectopcional
admite null
balanceBystringopcional
countminutes
Valor por defecto: "count"
avoidConsecutivebooleanopcional
Valor por defecto: true
onUnavailablestringopcional
skipqueue
Valor por defecto: "skip"
teachingPairobjectopcional

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

admite null
enabledbooleanopcional
Valor por defecto: false
shadowApprenticesOnlybooleanopcional
Valor por defecto: true
shadowSkillBelowLevelstringopcional
BEGINNERINTERMEDIATEADVANCEDEXPERT
admite null
xpToShadowbooleanopcional
Valor por defecto: true
autoAssignModestringopcional

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

AI_FULLAI_SUGGEST
admite null
fixedobjectopcional
admite null
assigneeRolestringopcional
máx. 60 caracteresadmite null
userIduuidopcional
admite null
rewardsobjectopcional

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

Valor por defecto: nulladmite null
karmaRewardintegeropcional
0 – 100000Valor por defecto: 0
xpRewardsobject[]opcional

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

Valor por defecto: []
skillIduuidobligatorio
xpintegerobligatorio
0 – 10000
requireVerifiedCompletionbooleanopcional

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

Valor por defecto: false
prerequisiteTemplateIdsuuid[]opcional

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

Valor por defecto: nulladmite null
blockedByTemplateIdsuuid[]opcional

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

Valor por defecto: nulladmite null
driftBaselineobjectopcional

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

Valor por defecto: nulladmite null
mediannumberobligatorio
≥ 0
q25numberobligatorio
≥ 0
q75numberobligatorio
≥ 0
computedAtdatetimeobligatorio
markedKnownAtdatetimeopcional
admite null
executionCountintegeropcional
≥ 0Valor por defecto: 0solo lectura
avgActualMinutesCachenumberopcional
≥ 0solo lecturaadmite null
p50ActualMinutesCachenumberopcional
≥ 0solo lecturaadmite null
p90ActualMinutesCachenumberopcional
≥ 0solo lecturaadmite null
lastExecutedAtdatetimeopcional
solo lecturaadmite null
lastStatsComputedAtdatetimeopcional
solo lecturaadmite null

Endpoints estándar

Este recurso sigue el contrato CRUD genérico de la plataforma. Lea las convenciones sobre paginación, idempotencia, bloqueo optimista y auditoría. Los endpoints principales:

  • GET /api/v1/task_templates — Lista, paginada y filtrable
  • GET /api/v1/task_templates/<id> — Una entidad
  • POST /api/v1/task_templates — Crear
  • PATCH /api/v1/task_templates/<id> — Actualización parcial
  • DELETE /api/v1/task_templates/<id> — Eliminación lógica
  • GET /api/v1/task_templates/<id>/timeline — Auditoría y actividades

Búsqueda