- [HTTP request](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/LegacyPlaybookApplyApprovalLink#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/LegacyPlaybookApplyApprovalLink#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/LegacyPlaybookApplyApprovalLink#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/LegacyPlaybookApplyApprovalLink#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/LegacyPlaybookApplyApprovalLink#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/LegacyPlaybookApplyApprovalLink#body.LegacyPlaybookApprovalLinkResult.SCHEMA_REPRESENTATION)
- [ApprovalLinkStatusValue](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/LegacyPlaybookApplyApprovalLink#ApprovalLinkStatusValue)
- [ApprovalLinkActionTypeValue](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/LegacyPlaybookApplyApprovalLink#ApprovalLinkActionTypeValue)

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

Processes an analyst's decision from a manual approval link. Use this method to record the outcome of a manual action and continue the playbook's execution.

### HTTP request

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

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 apply the approval link for. Format: projects/{project}/locations/{location}/instances/{instance} |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "encryptedData": string, "hashedEncryptedData": string, "isApproved": boolean } ``` |

| Fields ||
|---|---|
| `encryptedData` | `string` Required. The encrypted data. |
| `hashedEncryptedData` | `string` Required. The hashed encrypted data. |
| `isApproved` | `boolean` Optional. Indicates if the link is approved. |

### Response body

LegacyPlaybookApprovalLinkResult represents the result of an approval link.

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

| JSON representation |
|---|
| ``` { "status": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/LegacyPlaybookApplyApprovalLink#ApprovalLinkStatusValue`), "caseId": string, "actionName": string, "approvalLinkActionType": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/LegacyPlaybookApplyApprovalLink#ApprovalLinkActionTypeValue`) } ``` |

| Fields ||
|---|---|
| `status` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/LegacyPlaybookApplyApprovalLink#ApprovalLinkStatusValue`)`` Required. The status of the approval link. |
| `caseId` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. The case id. |
| `actionName` | `string` Required. The action name. |
| `approvalLinkActionType` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPlaybooks/LegacyPlaybookApplyApprovalLink#ApprovalLinkActionTypeValue`)`` Required. The type of the approval link action. |

## ApprovalLinkStatusValue

ApprovalLinkStatusValue represents the status of an approval link.

| Enums ||
|---|---|
| `APPROVAL_LINK_STATUS_VALUE_UNSPECIFIED` | The status is unspecified. |
| `SUCCESS` | The status is success. |
| `STEP_NOT_FOUND` | Step not found status. |
| `STEP_ALREADY_EXECUTED` | Step already executed status. |
| `STEP_TIME_TO_RESPONSE_EXPIRED` | Step time to response expired status. |
| `STEP_NOT_PENDING` | Step not pending status. |
| `CLICK_REQUIRED` | Click required status. |

## ApprovalLinkActionTypeValue

ApprovalLinkActionTypeValue represents the type of an approval link action.

| Enums ||
|---|---|
| `APPROVAL_LINK_ACTION_TYPE_VALUE_UNSPECIFIED` | The action type is unspecified. |
| `APPROVE` | The action type is approve. |
| `DECLINE` | The action type is decline. |
| `MULTI_CHOICE_ANSWER` | The action type is multi choice answer. |