// Step Templates

Create a step template

Define a new reusable step template.

POST/api/step-template

Description

Creates a step template. propertiesRaw is a JSON-encoded array describing the user-facing inputs the template exposes (name, label, type, default, etc.).

Step templates are the building blocks projects pick from when defining steps.

Parameters

NameInTypeRequiredDescription
workspaceId body string yes ID of the workspace.
name body string yes Template name.
description body string no Optional description.
supportedRunModes body array<string> no See below.
script body string yes Body of the script.
scriptLanguage body string no powershell (default), bash, etc.
propertiesRaw body string no JSON-encoded array of property definitions. Defaults to "[]".

Supported run modes

Each supportedRunModes entry must be TargetMachine, Worker, or WorkerToCloudTargets. Values that cannot be parsed are ignored; if no valid entries remain, the request returns 400.

Errors

StatusMeaning
400 Invalid workspaceId, invalid scriptLanguage, or validation failure.
401 Missing or invalid Basic auth credentials, or the service account lacks the required role.