comparator One of the supported comparator: =, >, and <.fieldId The custom numeric field ID. Allowed field types:com.atlassian.jira.plugin.system.customfieldtypes:floatcom.pyxis.greenhopper.jira:jsw-story-pointsfieldValue The value for comparison.permissionKey The permission required to perform the transition. Allowed values: built-in or app defined permissions.previousStatus object, matches any previous issue status, unless:ignoreLoopTransitions is true, then loop transitions (from and to the same status) are ignored.includeCurrentStatus is true, then the current issue status is also checked.mostRecentStatusOnly is true, then only the issue's preceding status (the one immediately before the current status) is checked.reverseCondition is true, then the status must not be present.fromStatus OPTIONAL. An object containing the ID of the source status of the transition that is blocked. If omitted any transition to toStatus is blocked.toStatus An object containing the ID of the target status of the transition that is blocked.statuses A list of objects containing status IDs.groups A list of group names.projectRoles A list of objects containing project role IDs.allowUserInField If true only a user who is listed in fieldId can perform the transition, otherwise, only a user who is not listed in fieldId can perform the transition.fieldId The ID of the field containing the list of users.group The name of the group.fieldId The ID of the field. Allowed field types:com.atlassian.jira.plugin.system.customfieldtypes:multigrouppickercom.atlassian.jira.plugin.system.customfieldtypes:grouppickercom.atlassian.jira.plugin.system.customfieldtypes:selectcom.atlassian.jira.plugin.system.customfieldtypes:multiselectcom.atlassian.jira.plugin.system.customfieldtypes:radiobuttonscom.atlassian.jira.plugin.system.customfieldtypes:multicheckboxescom.pyxis.greenhopper.jira:gh-epic-statusprojectRole An object containing the ID of a project role.fieldId The ID of a field used in the comparison.fieldValue The expected value of the field.comparisonType The type of the comparison. Allowed values: STRING, NUMBER, DATE, DATE_WITHOUT_TIME, or OPTIONID.comparator One of the supported comparator: >, >=, =, <=, <, !=.STRING, only = and != are valid options.fieldValue empty when comparison type is != to indicate that a value is required in the field.yyyy-MM-dd, and for those with time as yyyy-MM-dd HH:mm. For example, for July 16 2021 use 2021-07-16, for 8:05 AM use 2021-07-16 08:05, and for 4 PM: 2021-07-16 16:00.comparator One of the supported comparator: >, >=, =, <=, <, or !=.date1 The date field to validate. Allowed field types:com.atlassian.jira.plugin.system.customfieldtypes:datepickercom.atlassian.jira.plugin.system.customfieldtypes:datetimecom.atlassian.jpo:jpo-custom-field-baseline-endcom.atlassian.jpo:jpo-custom-field-baseline-startduedatecreatedupdatedresolutiondatedate2 The second date field. Required, if expression is not passed. Allowed field types:com.atlassian.jira.plugin.system.customfieldtypes:datepickercom.atlassian.jira.plugin.system.customfieldtypes:datetimecom.atlassian.jpo:jpo-custom-field-baseline-endcom.atlassian.jpo:jpo-custom-field-baseline-startduedatecreatedupdatedresolutiondateexpression An expression specifying an offset. Required, if date2 is not passed. Offsets are built with a number, with - as prefix for the past, and one of these time units: d for day, w for week, m for month, or y for year. For example, -2d means two days into the past and 1w means one week into the future. The now keyword enables a comparison with the current date.includeTime If true, then the time part of the data is included for the comparison. If the field doesn't have a time part, 00:00:00 is used.date1 The date field to validate. Allowed field types:com.atlassian.jira.plugin.system.customfieldtypes:datepickercom.atlassian.jira.plugin.system.customfieldtypes:datetimecom.atlassian.jpo:jpo-custom-field-baseline-endcom.atlassian.jpo:jpo-custom-field-baseline-startduedatecreatedupdatedresolutiondatedate2 The reference date. Allowed field types:com.atlassian.jira.plugin.system.customfieldtypes:datepickercom.atlassian.jira.plugin.system.customfieldtypes:datetimecom.atlassian.jpo:jpo-custom-field-baseline-endcom.atlassian.jpo:jpo-custom-field-baseline-startduedatecreatedupdatedresolutiondatewindowsDays A positive integer indicating a number of days.ignoreContext If true, then the context is ignored and all the fields are validated.errorMessage OPTIONAL. The error message displayed when one or more fields are empty. A default error message is shown if an error message is not provided.fieldIds The list of fields to validate.fieldId The ID of a field.errorMessage OPTIONAL. The error message displayed if the field is not changed. A default error message is shown if the error message is not provided.exemptedGroups OPTIONAL. The list of groups.fieldId The ID of a field.excludeSubtasks If true, then values copied from subtasks are ignored.parentStatus The list of required parent issue statuses.permissionKey The permission required to perform the transition. Allowed values: built-in or app defined permissions.mostRecentStatusOnly If true, then only the issue's preceding status (the one immediately before the current status) is checked.previousStatus An object containing the ID of an issue status.regExpA regular expression.fieldId The ID of a field. Allowed field types:com.atlassian.jira.plugin.system.customfieldtypes:selectcom.atlassian.jira.plugin.system.customfieldtypes:multiselectcom.atlassian.jira.plugin.system.customfieldtypes:radiobuttonscom.atlassian.jira.plugin.system.customfieldtypes:multicheckboxescom.atlassian.jira.plugin.system.customfieldtypes:textareacom.atlassian.jira.plugin.system.customfieldtypes:textfieldcom.atlassian.jira.plugin.system.customfieldtypes:urlcom.atlassian.jira.plugin.system.customfieldtypes:floatcom.pyxis.greenhopper.jira:jsw-story-pointscom.pyxis.greenhopper.jira:gh-epic-statusdescriptionsummarypermissionKey The permission to be validated. Allowed values: built-in or app defined permissions.nullAllowed If true, allows the transition when username is empty.username The username to validate against the permissionKey.FireIssueEventFunction. Can be included once in a transition.event An object containing the ID of the issue event.ASSIGNABLE_USER permission.fieldId The ID of the field.sourceFieldId The ID of the source field.destinationFieldId The ID of the destination field.copyType Use same to copy the value from a field inside the issue, or parent to copy the value from the parent issue.projectRole An object containing the ID of the project role.issueSecurityLevel OPTIONAL. The object containing the ID of the security level. If not passed, then the security level is set to none.webhook An object containing the ID of the webhook listener to trigger.mode Use replace to override the field content with fieldValue or append to add fieldValue to the end of the field content.fieldId The ID of the field.fieldValue The update content.fieldId The ID of the field. Allowed field types:assigneedescriptionenvironmentpriorityresolutionsummarytimeoriginalestimatetimeestimatetimespentfieldValue The update value.fieldId is assignee, the fieldValue should be one of these values:automatic.unassigned.type A Connect rule key in a form of appKey__moduleKey.value The stringified JSON configuration of a Connect rule.curl --location --request POST '/rest/api/3/workflow' \
--header 'Content-Type: application/json' \
--data-raw '{
    "description": "This is a workflow used for Stories and Tasks",
    "name": "Workflow 1",
    "statuses": [
        {
            "id": "1",
            "properties": {
                "jira.issue.editable": "false"
            }
        },
        {
            "id": "2"
        },
        {
            "id": "3"
        }
    ],
    "transitions": [
        {
            "from": [],
            "name": "Created",
            "to": "1",
            "type": "initial"
        },
        {
            "from": [
                "1"
            ],
            "name": "In progress",
            "properties": {
                "custom-property": "custom-value"
            },
            "rules": {
                "conditions": {
                    "conditions": [
                        {
                            "type": "RemoteOnlyCondition"
                        },
                        {
                            "configuration": {
                                "groups": [
                                    "developers",
                                    "qa-testers"
                                ]
                            },
                            "type": "UserInAnyGroupCondition"
                        }
                    ],
                    "operator": "AND"
                },
                "postFunctions": [
                    {
                        "type": "AssignToCurrentUserFunction"
                    }
                ]
            },
            "screen": {
                "id": "10001"
            },
            "to": "2",
            "type": "directed"
        },
        {
            "name": "Completed",
            "rules": {
                "postFunctions": [
                    {
                        "configuration": {
                            "fieldId": "assignee"
                        },
                        "type": "ClearFieldValuePostFunction"
                    }
                ],
                "validators": [
                    {
                        "configuration": {
                            "parentStatuses": [
                                {
                                    "id": "3"
                                }
                            ]
                        },
                        "type": "ParentStatusValidator"
                    },
                    {
                        "configuration": {
                            "permissionKey": "ADMINISTER_PROJECTS"
                        },
                        "type": "PermissionValidator"
                    }
                ]
            },
            "to": "3",
            "type": "global"
        }
    ]
}'{"entityId":"d7178e8d-bf6c-4c0c-9e90-758a0b965b67","name":"Workflow 1"}