Workflow templates

Create workflow template

POST
/api/v2/templates

Workflows are in maintenance mode

The workflows feature is in maintenance mode, and is planned for future deprecation at a date not yet specified. We will work with existing customers using workflows to migrate to a replacement solution when deprecation occurs.

Create a template for a feature flag workflow.

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Request Body

application/json

key*string
name?string
description?string
workflowId?FeatureWorkflowId
stages?array<>
projectKey?string
environmentKey?string
flagKey?string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v2/templates" \  -H "Content-Type: application/json" \  -d '{    "key": "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\": [{ \"kind\": \"turnFlagOn\"}] }",      "_execution": "{ \"status\": \"completed\" }"    }  ]}