Workflows

Get a workflow template by ID

This method retrieves a workflow template by its ID. A workflow template is a predefined blueprint for a workflow that includes a set of tasks and their dependencies. It serves as a starting point for creating workflows, allowing users to quickly set up and execute common processes without having to define each task from scratch.

get/v1/workflow-templates/{id}

Request

  • Base URL
    https://api.emma.ms/external
  • Auth
    HTTP bearer

Path parameters

idinteger required

ID of the workflow template

Response

Successful operation

idinteger required

ID of the workflow template

namestring required

Name of the workflow template

descriptionstring nullable

Description of the workflow template

createdAtstring required

Date and time of the workflow template creation (ISO-8601, UTC, with milliseconds)

createdByNamestring required

Name of the user who created the workflow template

createdByIdinteger required

ID of the user who created the workflow template

modifiedAtstring required

Date and time when the workflow template was last edited (ISO-8601, UTC, with milliseconds)

modifiedByNamestring required

Name of the user who last edited the workflow template

modifiedByIdinteger required

ID of the user who last edited the workflow template

isDeletedboolean required

Indicates whether the workflow template is deleted

status'PUBLISHED' | 'UNPUBLISHED' required

Status of the workflow template. Can be PUBLISHED or UNPUBLISHED

resourceTypesstring[] required

Types of the resource.

resourceType'COMPUTE' | 'SPOT_COMPUTE' nullable

Deprecated — use resourceTypes. Mirrors the first resource type; present for backward compatibility. Null when no resource type is set.

activeVersionIdinteger nullable

ID of the active workflow version. null when the template has no versions — permanently so for built-in default templates (isDefault = true), which are excluded from versioning, and until the one-off backfill covers templates created before versioning was enabled.

activeVersionNamestring nullable

Name of the active workflow version. null under the same conditions as activeVersionId.

contentType'Shell' required

Format of the content field, only Shell is supported for now

contentstring required

Content of the workflow template. For Shell contentType, it includes shell commands to execute.

isContentValidboolean required

Indicates whether the content of the workflow template is valid. The content is validated against the contentType, e.g. for Shell contentType, the content is validated to be correct shell commands.

contentExecutionTimeoutinteger required

Maximum script execution time in minutes (1–30). Defaults to 10 when omitted on create/update.

isDefaultboolean required

Indicates whether this is a built-in default (system-provided) workflow template.

Example response

{
  "id": 123,
  "name": "Sample Workflow Template",
  "description": "This is a sample workflow template for demonstration purposes.",
  "createdAt": "2026-06-26T21:44:05.345Z",
  "createdByName": "Automation User",
  "createdById": 123,
  "modifiedAt": "2026-07-07T07:38:16.285Z",
  "modifiedByName": "Automation User",
  "modifiedById": 123,
  "status": "PUBLISHED",
  "resourceTypes": [
    "COMPUTE"
  ],
  "resourceType": "COMPUTE",
  "activeVersionId": 123,
  "activeVersionName": "v1",
  "resourceParams": [
    {
      "name": "minCpuCores",
      "value": "4"
    }
  ],
  "tags": [
    {
      "key": "env",
      "value": "dev"
    }
  ],
  "contentType": "Shell",
  "content": "echo Hello, World!",
  "isContentValid": true,
  "contentParams": [
    {
      "name": "command1",
      "defaultValue": "echo Hello, World!",
      "mandatory": true,
      "description": "Database password used by the deployment script.",
      "hasDefaultValue": true,
      "vaultVersion": 1
    }
  ],
  "contentExecutionTimeout": 10
}

Changes

No recorded changes to this operation across all 1 revision of this API.