How can I create a connect workflow via REST API?

Hi,

I’ve noticed you can update pre-existing connect workflows via REST using https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflow-transition-rules/#api-group-workflow-transition-rules

Is there any way I can create a brand new connect workflow configuration via REST?

It is very difficult at this point to write any testing as you have to setup something like selenium to go and manually create custom workflow configurations

Thanks!
Ben

Yes, you can create a new workflow configuration in Jira Cloud using the REST API.

To do this, you will need to use the POST /rest/api/3/workflowscheme endpoint of the Jira Cloud Workflow Scheme REST API. This endpoint allows you to create a new workflow scheme and associate it with a project.

Here is an example of how you can use this endpoint to create a new workflow scheme in Jira Cloud using the axios library:

axios.post("https://your-domain.atlassian.net/rest/api/3/workflowscheme", {
  name: "My Workflow Scheme",
  defaultWorkflow: "jira",
  projectIds: [10000],
});

This example creates a new workflow scheme with the name “My Workflow Scheme” and associates it with the project with the ID 10000. The default workflow for the scheme is set to “jira”.

You can also use this endpoint to create a new workflow scheme with custom workflows and transition rules. To do this, you will need to include additional properties in the request body, such as workflowMappings and transitionMappings.

For more information about creating workflow schemes in Jira Cloud using the REST API, you can refer to the documentation at: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflow-scheme/

Note that you will need to have the correct permissions to create workflow schemes in Jira Cloud. You will also need to provide your API key in the request headers to authenticate the request.