- [HTTP request](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyGetWorkflowInstancesCards#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyGetWorkflowInstancesCards#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyGetWorkflowInstancesCards#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyGetWorkflowInstancesCards#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyGetWorkflowInstancesCards#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyGetWorkflowInstancesCards#body.LegacyPlaybookGetWorkflowInstancesCardsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyGetWorkflowInstancesCards#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyGetWorkflowInstancesCards#body.aspect_1)
- [ApiWorkflowInstanceCardDataModel](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyGetWorkflowInstancesCards#ApiWorkflowInstanceCardDataModel)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyGetWorkflowInstancesCards#ApiWorkflowInstanceCardDataModel.SCHEMA_REPRESENTATION)
- [WorkflowInstanceStatusValue](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyGetWorkflowInstancesCards#WorkflowInstanceStatusValue)

**Full name**: projects.locations.instances.legacyPlaybooks.legacyGetWorkflowInstancesCards

Returns the menu cards for all playbook instances associated with a specific case and alert combination. Use this method to browse the history of workflows run on an investigation entity.

### HTTP request

`POST https://{endpoint}/v1alpha/{instance}/legacyPlaybooks:legacyGetWorkflowInstancesCards`

Where `{endpoint}` is one of the [supported service endpoints](https://docs.cloud.google.com/chronicle/docs/reference/rest#rest_endpoints).

### Path parameters

| Parameters ||
|---|---|
| `instance` | `string` Required. The instance to get the workflow instances cards for. Format: projects/{project}/locations/{location}/instances/{instance} |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "caseId": string, "alertIdentifier": string, "alertIdentifiers": [ string ] } ``` |

| Fields ||
|---|---|
| `caseId` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. The case id. |
| `alertIdentifier` | `string` Optional. The alert identifier. Returns the cards of this alert. Must be empty when `alertIdentifiers` is set. When both are empty, returns the cards of the case. |
| `alertIdentifiers[]` | `string` Optional. When set, returns the cards of all the given alerts in the case. Must be empty when `alertIdentifier` is set. |

### Response body

LegacyPlaybookGetWorkflowInstancesCardsResponse is a response for getting workflow instances cards.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "payload": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyGetWorkflowInstancesCards#ApiWorkflowInstanceCardDataModel`) } ] } ``` |

| Fields ||
|---|---|
| `payload[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyGetWorkflowInstancesCards#ApiWorkflowInstanceCardDataModel`)`` Optional. The workflow instances cards. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `
  https://www.googleapis.com/auth/chronicle`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `instance` resource:

- `chronicle.legacyPlaybooks.get`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).

## ApiWorkflowInstanceCardDataModel

ApiWorkflowInstanceCardDataModel represents a workflow instance card.

| JSON representation |
|---|
| ``` { "status": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyGetWorkflowInstancesCards#WorkflowInstanceStatusValue`), "name": string, "definitionIdentifier": string, "description": string, "positionInQueue": integer, "runCount": string, "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`) } ], "alertIdentifier": string, "originalWorkflowDefinitionIdentifier": string, "isDebugMode": boolean } ``` |

| Fields ||
|---|---|
| `status` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyGetWorkflowInstancesCards#WorkflowInstanceStatusValue`)`` Required. Status is the status of the workflow instance. |
| `name` | `string` Required. Name is the name of the workflow instance. |
| `definitionIdentifier` | `string` Required. DefinitionIdentifier is the identifier of the workflow definition. |
| `description` | `string` Optional. Description is the description of the workflow instance. |
| `positionInQueue` | `integer` Required. PositionInQueue is the position of the workflow instance in the queue. |
| `runCount` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. RunCount is the number of times the workflow instance has been run. |
| `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. |
| `alertIdentifier` | `string` Optional. The identifier of the alert the workflow instance is attached to. Empty for case scope workflow instances. |
| `originalWorkflowDefinitionIdentifier` | `string` Optional. OriginalWorkflowDefinitionIdentifier is the original identifier of the workflow definition. |
| `isDebugMode` | `boolean` Optional. IsDebugMode indicates if debug mode is enabled for the workflow instance. |

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