Workflow templates is an Enterprise feature
Workflow templates are available to customers on an Enterprise plan. To learn more, read about our pricing. To upgrade your plan, contact Sales.
Workflow templates allow you to define a set of workflow stages that you can use as a starting point for new workflows. You can create these workflows for any flag in any environment and any project, and you can create as many workflows as you like from a given template.
You can create workflow templates in two ways:
stages
property of the request bodyworkflowId
property of the request bodyYou can use templates to create a workflow in any project, environment, or flag. However, when you create a template, you must specify a particular project, environment, and flag. This means that when you create a template using the stages
property, you must also include projectKey
, environmentKey
, and flagKey
properties in the request body. When you create a template from an existing workflow, it will use the project, environment, and flag of the existing workflow, so those properties can be omitted from the request body.
To learn more, read Workflows documentation and Workflows API documentation.
Get workflow templates belonging to an account, or can optionally return templates_endpoints.workflowTemplateSummariesListingOutputRep when summary query param is true
Workflow templates list response JSON
Invalid access token
Invalid resource identifier
Rate limited
{- "items": [
- {
- "_id": "string",
- "_key": "string",
- "name": "string",
- "_creationDate": 0,
- "_ownerId": "string",
- "_maintainerId": "string",
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "description": "string",
- "stages": [
- {
- "_id": "12ab3c45de678910abc12345",
- "name": "10% rollout on day 1",
- "conditions": [
- {
- "_execution": {
- "status": "completed"
}, - "id": "12ab3c45de678910abc12345",
- "kind": "schedule",
- "scheduleKind": "relative",
- "waitDuration": 2,
- "waitDurationUnit": "calendarDay"
}
], - "action": {
- "kind": "patch",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
]
}, - "_execution": {
- "status": "completed",
- "stopDate": 0
}
}
]
}
]
}
Create a template for a feature flag workflow
Workflow template response JSON
Invalid request
Invalid access token
Forbidden
Rate limited
{- "key": "string",
- "name": "string",
- "description": "string",
- "workflowId": "string",
- "stages": [
- {
- "name": "10% rollout on day 1",
- "executeConditionsInSequence": true,
- "conditions": [
- {
- "kind": "schedule",
- "scheduleKind": "relative",
- "waitDuration": 2,
- "waitDurationUnit": "calendarDay"
}
], - "action": {
- "instructions": "{\"instructions\": [{ \"kind\": \"turnFlagOn\"}]}"
}
}
], - "projectKey": "string",
- "environmentKey": "string",
- "flagKey": "string"
}
{- "_id": "string",
- "_key": "string",
- "name": "string",
- "_creationDate": 0,
- "_ownerId": "string",
- "_maintainerId": "string",
- "_links": {
- "property1": {
- "href": "string",
- "type": "string"
}, - "property2": {
- "href": "string",
- "type": "string"
}
}, - "description": "string",
- "stages": [
- {
- "_id": "12ab3c45de678910abc12345",
- "name": "10% rollout on day 1",
- "conditions": [
- {
- "_execution": {
- "status": "completed"
}, - "id": "12ab3c45de678910abc12345",
- "kind": "schedule",
- "scheduleKind": "relative",
- "waitDuration": 2,
- "waitDurationUnit": "calendarDay"
}
], - "action": {
- "kind": "patch",
- "instructions": [
- {
- "property1": null,
- "property2": null
}
]
}, - "_execution": {
- "status": "completed",
- "stopDate": 0
}
}
]
}
Delete a workflow template
Action completed successfully
Invalid request
Invalid access token
Forbidden
Invalid resource identifier
Rate limited
{- "code": "invalid_request",
- "message": "Invalid request body"
}