{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cisco-xdr/json-schema/cisco-xdr-workflow-definition-post-request-schema.json",
  "title": "WorkflowDefinitionPostRequest ...",
  "description": "Either ViewSchemaID or Type or both can be provided to create a Workflow.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cisco-xdr-workflows-api-openapi.yml#/components/schemas/workflowDefinitionPostRequest",
  "required": [
    "name",
    "properties"
  ],
  "type": "object",
  "properties": {
    "categories": {
      "type": "array",
      "description": "Categories associated with the workflow",
      "items": {
        "type": "string"
      },
      "x-go-name": "Categories"
    },
    "description": {
      "type": "string",
      "description": "Description of the Wrokflow",
      "x-go-name": "Description"
    },
    "metadata": {
      "$ref": "#/$defs/WorkflowMetadata"
    },
    "name": {
      "type": "string",
      "description": "Name of the Workflow",
      "x-go-name": "Name"
    },
    "properties": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {}
      },
      "description": "Properties of the workflow",
      "x-go-name": "Properties"
    },
    "schema_id": {
      "type": "string",
      "description": "View SchemaID of the workflow",
      "x-go-name": "ViewSchemaID"
    },
    "title": {
      "type": "string",
      "description": "Title of the Workflow",
      "x-go-name": "Title"
    },
    "type": {
      "type": "string",
      "description": "Type",
      "x-go-name": "Type"
    },
    "unique_name": {
      "type": "string",
      "description": "Uniquename",
      "x-go-name": "UniqueName"
    },
    "valid": {
      "type": "boolean",
      "description": "value of Valid",
      "x-go-name": "Valid"
    },
    "variables": {
      "type": "array",
      "description": "WFVariables of the workflow\n\nin: body",
      "items": {
        "$ref": "#/$defs/Variable"
      },
      "x-go-name": "WFVariables"
    }
  },
  "x-go-name": "WorkflowDefinitionPostRequest",
  "x-go-package": "bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/ao-libs/api/models",
  "$defs": {
    "CourseOfAction": {
      "title": "WorkflowMetaData ...",
      "required": [
        "observable_types"
      ],
      "type": "object",
      "properties": {
        "actuator": {
          "type": "string",
          "description": "Actuator.\nin: body",
          "x-go-name": "Actuator"
        },
        "observable_types": {
          "type": "array",
          "description": "list of observable types to get for.\nin: body",
          "items": {
            "type": "string"
          },
          "x-go-name": "ObservableTypes"
        }
      },
      "x-go-package": "bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models"
    },
    "GitInfo": {
      "type": "object",
      "properties": {
        "commit_hash": {
          "type": "string",
          "x-go-name": "CommitHash"
        },
        "commit_message": {
          "type": "string",
          "x-go-name": "CommitMessage"
        },
        "commited_by": {
          "type": "string",
          "x-go-name": "CommitedBy"
        },
        "commited_on": {
          "type": "string",
          "format": "date-time",
          "x-go-name": "CommitedOn"
        },
        "file_name": {
          "type": "string",
          "x-go-name": "FileName"
        },
        "target_id": {
          "type": "string",
          "x-go-name": "TargetID"
        }
      },
      "description": "nolint: misspell\nGitInfo maintains information about the last Git Import",
      "x-go-package": "bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models"
    },
    "LHObjType": {
      "title": "LHObjType generated on 2024-06-14T11:01:04+05:30. DO NOT EDIT.",
      "type": "string",
      "x-go-package": "bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/mdb-maps/entity"
    },
    "Variable": {
      "title": "Variable ...",
      "required": [
        "schema_id"
      ],
      "type": "object",
      "properties": {
        "base_type": {
          "type": "string",
          "x-go-name": "BaseType"
        },
        "created_by": {
          "type": "string",
          "x-go-name": "CreatedBy"
        },
        "created_on": {
          "type": "string",
          "format": "date-time",
          "x-go-name": "CreatedOn"
        },
        "id": {
          "type": "string",
          "description": "ID of variable",
          "x-go-name": "VariableID"
        },
        "object_type": {
          "$ref": "#/$defs/LHObjType"
        },
        "owner": {
          "type": "string",
          "x-go-name": "Owner"
        },
        "properties": {
          "$ref": "#/$defs/VariableContent"
        },
        "schema_id": {
          "type": "string",
          "description": "View schema ID of variable, the value can be TargetTypeID for Table variables",
          "x-go-name": "ViewSchemaID"
        },
        "table_id": {
          "type": "string",
          "description": "ID of table",
          "x-go-name": "TableID"
        },
        "type": {
          "type": "string",
          "x-go-name": "Type"
        },
        "unique_name": {
          "type": "string",
          "x-go-name": "UniqueName"
        },
        "updated_by": {
          "type": "string",
          "x-go-name": "UpdatedBy"
        },
        "updated_on": {
          "type": "string",
          "format": "date-time",
          "x-go-name": "UpdatedOn"
        },
        "variable_def_id": {
          "type": "string",
          "description": "ID of variable",
          "x-go-name": "VariableDefID"
        },
        "version": {
          "type": "string",
          "x-go-name": "Version"
        }
      },
      "x-go-package": "bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/ao-libs/api/models"
    },
    "VariableContent": {
      "title": "VariableContent ...",
      "type": "object",
      "properties": {
        "description": {
          "type": "string",
          "description": "Description of variable",
          "x-go-name": "Description"
        },
        "display_on_wizard": {
          "type": "boolean",
          "description": "Should the variable be shown on wizard\nUsed in input scope variables, if it is true, then variable is displayed on wizard",
          "x-go-name": "DisplayOnWizard"
        },
        "is_invisible": {
          "type": "boolean",
          "x-go-name": "IsInvisible"
        },
        "is_required": {
          "type": "boolean",
          "description": "Is the variable Required\nUsed in input string and secure string variable, if it is true, then string can't be emptly",
          "x-go-name": "IsRequired"
        },
        "name": {
          "type": "string",
          "description": "Name of variable",
          "x-go-name": "Name"
        },
        "scope": {
          "type": "string",
          "description": "Scope of variable. Scope can be 'input', 'global', 'local', 'static' or 'workflow'",
          "x-go-name": "Scope"
        },
        "type": {
          "type": "string",
          "description": "Type of variable. Type can be 'datatype.boolean', 'datatype.string', 'datatype.number' or 'datatype.table'",
          "x-go-name": "Type"
        },
        "value": {
          "type": "object",
          "properties": {},
          "description": "Value of variable. Value can be a string, boolean, number or array",
          "x-go-name": "Value"
        }
      },
      "x-go-package": "bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/ao-libs/api/models"
    },
    "WorkflowLock": {
      "type": "object",
      "properties": {
        "locked": {
          "type": "boolean",
          "x-go-name": "Locked"
        },
        "locked_by": {
          "type": "string",
          "x-go-name": "LockedBy"
        },
        "message": {
          "type": "string",
          "x-go-name": "Message"
        }
      },
      "x-go-package": "bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models"
    },
    "WorkflowMetadata": {
      "type": "object",
      "properties": {
        "coa": {
          "$ref": "#/$defs/CourseOfAction"
        },
        "flags": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "x-go-name": "Flags"
        },
        "git_info": {
          "$ref": "#/$defs/GitInfo"
        },
        "lock": {
          "$ref": "#/$defs/WorkflowLock"
        }
      },
      "description": "WorkflowMetadata maintains miscellaneous metadata for the workflow",
      "x-go-package": "bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lib-data/models"
    }
  }
}