# ApiWorkflowInstanceDataModel

- [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#SCHEMA_REPRESENTATION)
- [PlaybookType](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#PlaybookType)
- [PermissionAccessLevel](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#PermissionAccessLevel)
- [WorkflowInstanceStatusValue](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#WorkflowInstanceStatusValue)
- [ApiWorkflowStepCardDataModel](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#ApiWorkflowStepCardDataModel)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#ApiWorkflowStepCardDataModel.SCHEMA_REPRESENTATION)
- [WorkflowStepCardType](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#WorkflowStepCardType)
- [ApiActionStatusEnum](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#ApiActionStatusEnum)
- [ApiLoopMaxIterationsResponse](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#ApiLoopMaxIterationsResponse)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#ApiLoopMaxIterationsResponse.SCHEMA_REPRESENTATION)

ApiWorkflowInstanceDataModel represents a workflow instance data model.

| JSON representation |
|---|
| ``` { "id": string, "identifier": string, "version": string, "name": string, "creator": string, "modifiedBy": string, "priority": integer, "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`) }, "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/ApiWorkflowInstanceDataModel#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/ApiWorkflowInstanceDataModel#PermissionAccessLevel`), "defaultAccessLevel": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#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`) } ], "instanceId": string, "caseId": string, "alertIdentifier": string, "status": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#WorkflowInstanceStatusValue`), "steps": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#ApiWorkflowStepCardDataModel`) } ], "positionInQueue": integer, "runCount": integer, "loopsMaxIterations": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#ApiLoopMaxIterationsResponse`) } ], "allStepsFlattened": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#ApiWorkflowStepCardDataModel`) } ], "creationSource": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/PlaybookCreationSourceEnum`), "pendingCompletionCards": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/PendingCompletionCard`) } ], "isEnabled": boolean, "isDebugMode": boolean, "hasRestrictedEnvironments": boolean } ``` |

| 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` | `integer` 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. |
| `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/ApiWorkflowInstanceDataModel#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/ApiWorkflowInstanceDataModel#PermissionAccessLevel`)`` Required. EntityAccessLevel is the access level for entities. |
| `defaultAccessLevel` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#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. |
| `instanceId` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. InstanceId is the unique identifier of the workflow instance. |
| `caseId` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. CaseId is the identifier of the case. |
| `alertIdentifier` | `string` Optional. AlertIdentifier is the identifier of the alert. |
| `status` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#WorkflowInstanceStatusValue`)`` Required. Status is the status of the workflow instance. |
| `steps[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#ApiWorkflowStepCardDataModel`)`` Optional. Steps is a list of steps in the workflow instance. |
| `positionInQueue` | `integer` Optional. PositionInQueue is the position of the workflow instance in the queue. |
| `runCount` | `integer` Optional. RunCount is the number of times the workflow instance has been run. |
| `loopsMaxIterations[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#ApiLoopMaxIterationsResponse`)`` Optional. LoopsMaxIterations is a list of max iterations for loops in the workflow instance. |
| `allStepsFlattened[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#ApiWorkflowStepCardDataModel`)`` Optional. AllStepsFlattened is a list of all steps flattened in the workflow instance. |
| `creationSource` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/PlaybookCreationSourceEnum`)`` Optional. CreationSource is the source of the workflow. |
| `pendingCompletionCards[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/PendingCompletionCard`)`` Optional. PendingCompletionCards is a list of pending completion cards. |
| `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. |

## 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. |

## WorkflowInstanceStatusValue

WorkflowInstanceStatusValue is the status of the workflow instance.

| Enums ||
|---|---|
| `WORKFLOW_INSTANCE_STATUS_VALUE_UNSPECIFIED` | The status of the workflow instance is unspecified. |
| `IN_PROGRESS` | The workflow instance is in progress. |
| `COMPLETED` | The workflow instance is completed. |
| `FAILED` | The workflow instance is failed. |
| `TERMINATED` | The workflow instance is terminated. |
| `PENDING_IN_QUEUE` | The workflow instance is pending in the queue. |
| `PENDING_FOR_USER` | The workflow instance is pending for the user. |
| `PENDING_PREVIOUS_COMPLETION` | The workflow instance is pending for the previous completion. |

## ApiWorkflowStepCardDataModel

ApiWorkflowStepCardDataModel represents a workflow step card.

| JSON representation |
|---|
| ``` { "id": string, "creationTimeUnixTimeInMs": string, "modificationTimeUnixTimeInMs": string, "additionalProperties": { string: string, ... }, "identifier": string, "originalStepIdentifier": string, "blockId": string, "instanceName": string, "integration": string, "actionName": string, "type": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#WorkflowStepCardType`), "status": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#ApiActionStatusEnum`), "workflowIdentifier": string, "parameters": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowStepParameterDataModel`) } ], "parentStepIdentifiers": [ string ], "previousResultConditions": { string: string, ... }, "resultJsonObject": string, "description": string, "parallelActions": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#ApiWorkflowStepCardDataModel`) } ], "parentStepContainerId": string, "loopIteration": integer, "startLoopStepIdentifier": string, "isTouchedByAi": boolean, "loopName": string, "isAutomatic": boolean, "isDebugMockData": boolean } ``` |

| Fields ||
|---|---|
| `id` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. Id is the unique identifier of the data model object. |
| `creationTimeUnixTimeInMs` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. CreationTimeUnixTimeInMs is the creation time of the data model object. 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 data model object. Represents DateTime ModificationTimeUnixTimeInMs as unix time |
| `additionalProperties` | `map (key: string, value: string)` Optional. AdditionalProperties is a map of additional properties for the data model object. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `identifier` | `string` Required. Identifier is the unique identifier of the step. |
| `originalStepIdentifier` | `string` Required. OriginalStepIdentifier is the original identifier of the step. |
| `blockId` | `string` Optional. BlockId is the identifier of the block. |
| `instanceName` | `string` Required. InstanceName is the name of the instance. |
| `integration` | `string` Required. Integration is the integration of the step. |
| `actionName` | `string` Required. ActionName is the name of the action. |
| `type` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#WorkflowStepCardType`)`` Required. Type is the type of the step. |
| `status` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#ApiActionStatusEnum`)`` Required. Status is the status of the action. |
| `workflowIdentifier` | `string` Required. WorkflowIdentifier is the identifier of the workflow. |
| `parameters[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowStepParameterDataModel`)`` Optional. Parameters is a list of parameters for the step. |
| `parentStepIdentifiers[]` | `string` Optional. ParentStepIdentifiers is a list of parent step identifiers. |
| `previousResultConditions` | `map (key: string, value: string)` Optional. PreviousResultConditions is a map of previous result conditions. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `resultJsonObject` | `string` Optional. ResultJsonObject is the result json object of the step. |
| `description` | `string` Optional. Description is the description of the step. |
| `parallelActions[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowInstanceDataModel#ApiWorkflowStepCardDataModel`)`` Optional. ParallelActions is a list of parallel actions for the step. |
| `parentStepContainerId` | `string` Optional. ParentStepContainerId is the identifier of the parent step container. |
| `loopIteration` | `integer` Optional. LoopIteration is the current loop iteration. |
| `startLoopStepIdentifier` | `string` Optional. StartLoopStepIdentifier is the identifier of the start loop step. |
| `isTouchedByAi` | `boolean` Optional. IsTouchedByAi indicates if the step is touched by AI. |
| `loopName` | `string` Optional. LoopName is the name of the loop. |
| `isAutomatic` | `boolean` Optional. IsAutomatic indicates if the step is automatic. |
| `isDebugMockData` | `boolean` Optional. IsDebugMockData indicates if debug mock data is enabled for the step. |

## WorkflowStepCardType

WorkflowStepCardType represents the type of a workflow step card.

| Enums ||
|---|---|
| `WORKFLOW_STEP_CARD_TYPE_UNSPECIFIED` | The workflow step card type is unspecified. |
| `ACTION` | The workflow step card type is action. |
| `MULTI_CHOICE_QUESTION` | The workflow step card type is multi choice question. |
| `PREVIOUS_ACTION` | The workflow step card type is previous action. |
| `CASE_DATA_CONDITION` | The workflow step card type is case data condition. |
| `CONDITION` | The workflow step card type is condition. |
| `BLOCK` | The workflow step card type is block. |
| `OUTPUT` | The workflow step card type is output. |
| `PARALLEL_ACTIONS_CONTAINER` | The workflow step card type is parallel actions container. |
| `FOR_EACH_START_LOOP` | The workflow step card type is for each start loop. |
| `FOR_EACH_END_LOOP` | The workflow step card type is for each end loop. |
| `FOR_EACH_LOOP_CONTAINER` | The workflow step card type is for each loop container. |

## ApiActionStatusEnum

ApiActionStatusEnum represents the status of an action.

| Enums ||
|---|---|
| `API_ACTION_STATUS_ENUM_UNSPECIFIED` | The status is unspecified. |
| `FAULTED` | The status is faulted. |
| `IN_PROGRESS` | The status is in progress. |
| `COMPLETED` | The status is completed. |
| `PENDING_USER_INPUT` | The status is pending user input. |
| `PENDING_PREVIOUS_STEPS` | The status is pending previous steps. |
| `STARTED` | The status is started. |
| `FAULTED_AND_SKIPPED` | The status is faulted and skipped. |
| `HANDLED_TIMEDOUT` | The status is handled timed out. |
| `UNHANDLED_TIMEDOUT` | The status is unhandled timed out. |
| `TERMINATED` | The status is terminated. |
| `NOT_RUN_AND_SKIPPED` | The status is not run and skipped. |
| `PENDING_ACTION_TIMEOUT` | The status is pending action timeout. |
| `PENDING_ACTION_TIMEOUT_AND_SKIPPED` | The status is pending action timeout and skipped. |
| `NO_STATUS` | The status is no status. |
| `PENDING_RETRY` | The status is pending retry. |

## ApiLoopMaxIterationsResponse

ApiLoopMaxIterationsResponse represents the max iterations for a loop.

| JSON representation |
|---|
| ``` { "startLoopStepIdentifier": string, "maxIterations": integer } ``` |

| Fields ||
|---|---|
| `startLoopStepIdentifier` | `string` Required. StartLoopStepIdentifier is the identifier of the start loop step. |
| `maxIterations` | `integer` Optional. MaxIterations is the max iterations for the loop. |