Workflows
Perform an action on a workflow template
Performs an action on an existing workflow template. The only supported action is copy.
copy creates a new template in the caller's company from the source template and returns it. The copy is not an exact duplicate:
- the name is derived from the source as {sourceName}-{suffix}-copy, where {suffix} is generated until the name is free within the company;
- status is always UNPUBLISHED, regardless of the source status;
- isDefault is always false, so a copy of a platform template becomes an ordinary template owned by the caller's company;
- resource parameters, content, content parameters and tags are copied; tag keys that do not yet exist in the caller's company are created;
- values of non-secret content parameters are copied; values of secret parameters are not copied — such parameters arrive with hasDefaultValue = false and must be re-entered by the owner before the workflow can be executed;
- when workflow versioning is enabled, the copy starts its own history with a single active version v1; the source's version history is not copied.
post/v1/workflow-templates/{id}/actions
Request
- Base URLhttps://api.emma.ms/external
- AuthHTTP bearer
Path parameters
idinteger required
ID of the workflow template
Request body
Example request
{
"action": "copy"
}Response
Workflow template created successfully
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.