1. Core Substitution Context
  2. Template UUID

Core Substitution Context

Template UUID

Variable substitution for the template UUID of a stub.

One of the most common and useful substitutions in Stubber is referencing a template's unique internal identifier, commonly referred to as the templateuuid. This is the UUID of the template from which a stub is or will be created.

Using this substitution allows your actions to remain dynamic and reusable, without hardcoding specific template IDs. It's especially helpful when working with tasks that depend on the template UUID such as stub creation, stubmations, API calls, Heimdall registration/deregistration, or reporting.

Usage

Use the substitution ~~template.templateuuid in your action definitions to dynamically insert the UUID of the current template.

Example

Action definition:

Before substitution
        {
  "tasktype": "create_stub",
  "params": {
    "templateuuid": "~~template.templateuuid",
    "template_branch": "live",
    "template_context": "default"
  }
}

      
After substitution
        {
  "tasktype": "create_stub",
  "params": {
    "templateuuid": "408a7c3c-da48-5ac5-b3da-123c261e1ad35",
    "template_branch": "live",
    "template_context": "default"
  }
}

      

In the example above, the placeholder ~~template.templateuuid is automatically replaced with the actual UUID of the template (408a7c3c-da48-5ac5-b3da-123c261e1ad35) at runtime. This approach ensures that the correct template is referenced, without requiring manual edits to the task definition.