- [HTTP request](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#body.LegacyPlaybookRunPlaybookInDebugResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#body.aspect_1)
- [TriggerEventChanges](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerEventChanges)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerEventChanges.SCHEMA_REPRESENTATION)
- [TriggerEventPropertyValue](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerEventPropertyValue)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerEventPropertyValue.SCHEMA_REPRESENTATION)
- [TriggerFieldChange](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerFieldChange)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerFieldChange.SCHEMA_REPRESENTATION)
- [TriggerAddedEntity](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerAddedEntity)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerAddedEntity.SCHEMA_REPRESENTATION)
- [AddedCaseComment](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#AddedCaseComment)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#AddedCaseComment.SCHEMA_REPRESENTATION)

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

Executes a playbook in a simulation environment using provided test data. Use this method to verify automation logic and identify potential issues before deploying a playbook to production.

### HTTP request

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

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 run the playbook in debug for. Format: projects/{project}/locations/{location}/instances/{instance} |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "workflow": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowDefinitionDataModel`) }, "testCaseId": string, "triggerEventChanges": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerEventChanges`) } } ``` |

| Fields ||
|---|---|
| `workflow` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ApiWorkflowDefinitionDataModel`)`` Required. The workflow to run the playbook in debug for. |
| `testCaseId` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. The test case id to run the playbook in debug for. |
| `triggerEventChanges` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerEventChanges`)`` Optional. Changes to the trigger event. |

### Response body

Response object that holds identifiers of a playbook simulation / debug mode run. Those identifiers are used to fetch results for this specific run

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

| JSON representation |
|---|
| ``` { "workflowInstanceId": string, "newTestCaseId": string, "alertGroupIdentifier": string, "alertIdentifier": string, "newWorkflowIdentifier": string, "parsedNestedInputParameters": { string: string, ... }, "triggerMatches": boolean } ``` |

| Fields ||
|---|---|
| `workflowInstanceId` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. Workflow instance id |
| `newTestCaseId` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. The new case id that this playbook will run on |
| `alertGroupIdentifier` | `string` Required. The group id for the alert |
| `alertIdentifier` | `string` Required. The alert identifier |
| `newWorkflowIdentifier` | `string` Required. The new workflow identifier |
| `parsedNestedInputParameters` | `map (key: string, value: string)` Optional. Dictionary of inner input parameters An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `triggerMatches` | `boolean` Required. Whether the trigger actually matched when we ran the simulation |

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

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

## TriggerEventChanges

TriggerEventChanges represents changes in a trigger event for playbook simulation.

| JSON representation |
|---|
| ``` { "caseAssignee": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerEventPropertyValue`) }, "alertPriority": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerEventPropertyValue`) }, "casePriority": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerEventPropertyValue`) }, "caseStage": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerEventPropertyValue`) }, "addedCaseTag": string, "caseCustomField": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerFieldChange`) }, "caseContextField": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerFieldChange`) }, "alertCustomField": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerFieldChange`) }, "alertContextField": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerFieldChange`) }, "addedEntity": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerAddedEntity`) }, "addedCaseComment": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#AddedCaseComment`) } } ``` |

| Fields ||
|---|---|
| `caseAssignee` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerEventPropertyValue`)`` Optional. Details about the change in case assignee. |
| `alertPriority` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerEventPropertyValue`)`` Optional. Details about the change in alert priority. |
| `casePriority` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerEventPropertyValue`)`` Optional. Details about the change in case priority. |
| `caseStage` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerEventPropertyValue`)`` Optional. Details about the change in case stage. |
| `addedCaseTag` | `string` Optional. The tag that was added to the case. |
| `caseCustomField` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerFieldChange`)`` Optional. Details about a change in a case custom field. |
| `caseContextField` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerFieldChange`)`` Optional. Details about a change in a case context field. |
| `alertCustomField` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerFieldChange`)`` Optional. Details about a change in an alert custom field. |
| `alertContextField` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerFieldChange`)`` Optional. Details about a change in an alert context field. |
| `addedEntity` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerAddedEntity`)`` Optional. The entity that was added to the case. |
| `addedCaseComment` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#AddedCaseComment`)`` Optional. Details about a comment that was added to the case. |

## TriggerEventPropertyValue

TriggerEventPropertyValue represents a property value transition.

| JSON representation |
|---|
| ``` { "oldValue": string, "newValue": string } ``` |

| Fields ||
|---|---|
| `oldValue` | `string` Optional. The old value before the change. |
| `newValue` | `string` Optional. The new value after the change. |

## TriggerFieldChange

TriggerFieldChange represents a change in a specific field.

| JSON representation |
|---|
| ``` { "property": string, "propertyValue": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerEventPropertyValue`) } } ``` |

| Fields ||
|---|---|
| `property` | `string` Required. The name of the property that changed. |
| `propertyValue` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/legacyRunPlaybookInDebug#TriggerEventPropertyValue`)`` Required. The original and new values of the property. |

## TriggerAddedEntity

TriggerAddedEntity represents an entity added to the case.

| JSON representation |
|---|
| ``` { "identifier": string, "type": string } ``` |

| Fields ||
|---|---|
| `identifier` | `string` Required. The unique identifier of the added entity. |
| `type` | `string` Required. The type of the added entity (e.g., Host, User, IP). |

## AddedCaseComment

AddedCaseComment represents a comment added to a case during simulation.

| JSON representation |
|---|
| ``` { "body": string, "attachment": string } ``` |

| Fields ||
|---|---|
| `body` | `string` Optional. The text content of the comment. |
| `attachment` | `string` Optional. The name of the attachment associated to comment. |