# ApiWorkflowDefinitionDataModel

- [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowDefinitionDataModel#SCHEMA_REPRESENTATION)
- [PlaybookType](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowDefinitionDataModel#PlaybookType)
- [PermissionAccessLevel](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowDefinitionDataModel#PermissionAccessLevel)
- [ExecutionScope](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowDefinitionDataModel#ExecutionScope)

ApiWorkflowDefinitionDataModel represents a workflow definition.

| JSON representation |
|---|
| ``` { "id": string, "identifier": string, "version": string, "name": string, "creator": string, "modifiedBy": string, "priority": string, "description": string, "environments": [ string ], "categoryName": string, "categoryId": integer, "originalPlaybookIdentifier": string, "creationTimeUnixTimeInMs": string, "modificationTimeUnixTimeInMs": string, "trigger": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowTriggerDataModel`) }, "steps": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowStepDataModel`) } ], "stepsRelations": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowStepRelationDataModel`) } ], "templateName": string, "playbookType": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowDefinitionDataModel#PlaybookType`), "debugData": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowDebugDataModel`) }, "entityAccessLevel": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowDefinitionDataModel#PermissionAccessLevel`), "defaultAccessLevel": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowDefinitionDataModel#PermissionAccessLevel`), "permissions": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/LegacyPlaybookWorkflowAccessPermissions`) } ], "overviewTemplates": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/LegacyPlaybookOverviewTemplateData`) } ], "creationSource": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/PlaybookCreationSourceEnum`), "isEnabled": boolean, "isDebugMode": boolean, "hasRestrictedEnvironments": boolean, "executionScope": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowDefinitionDataModel#ExecutionScope`) } ``` |

| Fields ||
|---|---|
| `id` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. Id is the unique identifier of the workflow. |
| `identifier` | `string` Required. Identifier is the unique identifier of the workflow. |
| `version` | `string` Required. Version is the version of the workflow. |
| `name` | `string` Required. Name is the name of the workflow. |
| `creator` | `string` Required. Creator is the creator of the workflow. |
| `modifiedBy` | `string` Required. ModifiedBy is the user who last modified the workflow. |
| `priority` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. Priority is the priority of the workflow. |
| `description` | `string` Optional. Description is the description of the workflow. |
| `environments[]` | `string` Optional. Environments is a list of environments the workflow is enabled on. |
| `categoryName` | `string` Optional. CategoryName is the name of the category. |
| `categoryId` | `integer` Optional. CategoryId is the identifier of the category. |
| `originalPlaybookIdentifier` | `string` Required. OriginalPlaybookIdentifier is the identifier of the original playbook. |
| `creationTimeUnixTimeInMs` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. CreationTimeUnixTimeInMs is the creation time of the workflow. Represents DateTime CreationTimeUnixTimeInMs as unix time |
| `modificationTimeUnixTimeInMs` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. ModificationTimeUnixTimeInMs is the modification time of the workflow. Represents DateTime ModificationTimeUnixTimeInMs as unix time |
| `trigger` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowTriggerDataModel`)`` Required. Trigger is the trigger of the workflow. |
| `steps[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowStepDataModel`)`` Optional. Steps is a list of steps in the workflow. |
| `stepsRelations[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowStepRelationDataModel`)`` Optional. StepsRelations is a list of step relations in the workflow. |
| `templateName` | `string` Optional. TemplateName is the name of the template. |
| `playbookType` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowDefinitionDataModel#PlaybookType`)`` Required. PlaybookType is the type of playbook. |
| `debugData` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowDebugDataModel`)`` Optional. DebugData is the debug data for the workflow. |
| `entityAccessLevel` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowDefinitionDataModel#PermissionAccessLevel`)`` Required. EntityAccessLevel is the access level for entities. |
| `defaultAccessLevel` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowDefinitionDataModel#PermissionAccessLevel`)`` Required. DefaultAccessLevel is the default access level for the workflow. |
| `permissions[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/LegacyPlaybookWorkflowAccessPermissions`)`` Optional. Permissions is a list of permissions for the workflow. |
| `overviewTemplates[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/LegacyPlaybookOverviewTemplateData`)`` Optional. LegacyPlaybookOverviewTemplates is a list of overview templates for the workflow. |
| `creationSource` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/PlaybookCreationSourceEnum`)`` Optional. CreationSource is the source of the workflow. |
| `isEnabled` | `boolean` Optional. IsEnabled indicates if the workflow is enabled. |
| `isDebugMode` | `boolean` Optional. IsDebugMode indicates if debug mode is enabled for the workflow. |
| `hasRestrictedEnvironments` | `boolean` Optional. HasRestrictedEnvironments indicates if the workflow has restricted environments. |
| `executionScope` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowDefinitionDataModel#ExecutionScope`)`` Optional. The execution scope of playbook. |

## PlaybookType

Playbook types to filter the workflow menu cards by.

| Enums ||
|---|---|
| `PLAYBOOK_TYPE_UNSPECIFIED` | Unspecified playbook type. |
| `REGULAR` | Regular playbook type. |
| `NESTED` | Nested playbook type. |

## PermissionAccessLevel

PermissionAccessLevel is the access level of the permission.

| Enums ||
|---|---|
| `PERMISSION_ACCESS_LEVEL_UNSPECIFIED` | The access level is unspecified. |
| `NO_ACCESS` | The access level is no access. |
| `VIEW` | The access level is view. |
| `EDIT` | The access level is edit. |
| `EXECUTE` | The access level is execute. |

## ExecutionScope

Defines the scope for which a playbook is designed to be executed.

| Enums ||
|---|---|
| `EXECUTION_SCOPE_UNSPECIFIED` | The scope is unspecified. |
| `ALERT` | The playbook is attached to an alert. |
| `CASE` | The playbook is attached to a case. |