Tasks
Get Template
Task to retrieve a Template or a specific path within the Template
Basic usage
The below task retrieves a template of the current stub.
Parameters
templateuuid required if descname is not provided string
UUID of the template to retrieve : ~~stub.program.templateuuid
descname required if templateuuid is not provided string
Allows retrieving a template by details.descname instead of templateuuid.
path optional string
Specific path within the template to return. If provided, only the data at this path will be returned instead of the full template
Example: branches.draft.contexts.default.parts.flow.actions
filters optional object
Filters to apply when retrieving the template.
filters.depth optional number
The depth to which data should be populated in the template.
filters.nullify_leaves optional boolean
When filters.depth is specified, sets leaf nodes beyond the populated depth to null.
Result
Properties
template
Template object retrieved. If a path parameter was provided, only the data at that specific path will be returned. Otherwise, the full template structure is returned.
Examples
Get template.data only
Result
Get template with filters
If you would just like to get the current template, specifically the built template, it may be easier to use savedata task instead with a savevalue of ~~program.