- [HTTP request](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/generateThreatDetectionOpportunity#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/generateThreatDetectionOpportunity#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/generateThreatDetectionOpportunity#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/generateThreatDetectionOpportunity#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/generateThreatDetectionOpportunity#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/generateThreatDetectionOpportunity#body.GenerateThreatDetectionOpportunityResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/generateThreatDetectionOpportunity#body.aspect)

**Full name**: projects.locations.instances.generateThreatDetectionOpportunity

instances.generateThreatDetectionOpportunity generates a Threat Detection Opportunity (TDO).

### HTTP request

`POST https://{endpoint}/v1alpha/{instance}:generateThreatDetectionOpportunity`

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 Chronicle instance associated with the Threat Detection Opportunity. Format: projects/{project}/locations/{location}/instances/{instance} |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "threat": string } ``` |

| Fields ||
|---|---|
| `threat` | `string` Required. The threat to generate a Threat Detection Opportunity for - free-form user input. |

### Response body

Response message for instances.generateThreatDetectionOpportunity.

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

| JSON representation |
|---|
| ``` { "instance": string, "threatDetectionOpportunities": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ThreatDetectionOpportunity`) } ] } ``` |

| Fields ||
|---|---|
| `instance` | `string` The Chronicle instance associated with the Threat Detection Opportunity. Format: projects/{project}/locations/{location}/instances/{instance} |
| `threatDetectionOpportunities[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/ThreatDetectionOpportunity`)`` The generated Threat Detection Opportunities. |

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