{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/atlassian/json-schema/atlassian-workflow-rules-search-details-schema.json",
  "title": "WorkflowRulesSearchDetails",
  "description": "Details of workflow transition rules.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/atlassian-app-migration-api-openapi.yml#/components/schemas/WorkflowRulesSearchDetails",
  "properties": {
    "invalidRules": {
      "description": "List of workflow rule IDs that do not belong to the workflow or can not be found.",
      "items": {
        "description": "Workflow rule ID.",
        "format": "uuid",
        "type": "string"
      },
      "type": "array"
    },
    "validRules": {
      "description": "List of valid workflow transition rules.",
      "items": {
        "$ref": "#/$defs/WorkflowTransitionRules"
      },
      "type": "array"
    },
    "workflowEntityId": {
      "description": "The workflow ID.",
      "format": "uuid",
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "AppWorkflowTransitionRule": {
      "additionalProperties": false,
      "description": "A workflow transition rule.",
      "properties": {
        "configuration": {
          "$ref": "#/$defs/RuleConfiguration"
        },
        "id": {
          "description": "The ID of the transition rule.",
          "type": "string"
        },
        "key": {
          "description": "The key of the rule, as defined in the Connect or the Forge app descriptor.",
          "readOnly": true,
          "type": "string"
        },
        "transition": {
          "allOf": [
            {
              "$ref": "#/$defs/WorkflowTransition"
            }
          ],
          "readOnly": true
        }
      },
      "required": [
        "configuration",
        "id",
        "key"
      ],
      "type": "object"
    },
    "RuleConfiguration": {
      "additionalProperties": false,
      "description": "A rule configuration.",
      "properties": {
        "disabled": {
          "default": false,
          "description": "Whether the rule is disabled.",
          "type": "boolean"
        },
        "tag": {
          "description": "A tag used to filter rules in [Get workflow transition rule configurations](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflow-transition-rules/#api-rest-api-3-workflow-rule-config-get).",
          "maxLength": 255,
          "type": "string"
        },
        "value": {
          "description": "Configuration of the rule, as it is stored by the Connect or the Forge app on the rule configuration page.",
          "type": "string"
        }
      },
      "required": [
        "value"
      ],
      "type": "object"
    },
    "WorkflowId": {
      "additionalProperties": false,
      "description": "Properties that identify a workflow.",
      "properties": {
        "draft": {
          "description": "Whether the workflow is in the draft state.",
          "type": "boolean"
        },
        "name": {
          "description": "The name of the workflow.",
          "type": "string"
        }
      },
      "required": [
        "draft",
        "name"
      ],
      "type": "object"
    },
    "WorkflowTransition": {
      "additionalProperties": false,
      "description": "A workflow transition.",
      "properties": {
        "id": {
          "description": "The transition ID.",
          "format": "int32",
          "type": "integer"
        },
        "name": {
          "description": "The transition name.",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ],
      "type": "object"
    },
    "WorkflowTransitionRules": {
      "additionalProperties": false,
      "description": "A workflow with transition rules.",
      "properties": {
        "conditions": {
          "description": "The list of conditions within the workflow.",
          "items": {
            "$ref": "#/$defs/AppWorkflowTransitionRule"
          },
          "type": "array"
        },
        "postFunctions": {
          "description": "The list of post functions within the workflow.",
          "items": {
            "$ref": "#/$defs/AppWorkflowTransitionRule"
          },
          "type": "array"
        },
        "validators": {
          "description": "The list of validators within the workflow.",
          "items": {
            "$ref": "#/$defs/AppWorkflowTransitionRule"
          },
          "type": "array"
        },
        "workflowId": {
          "$ref": "#/$defs/WorkflowId"
        }
      },
      "required": [
        "workflowId"
      ],
      "type": "object"
    }
  }
}