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

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

Translate natural language to a UDM instances.search query.

### HTTP request

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

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 request. Format: projects/{project}/locations/{location}/instances/{instance} |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "text": string, "queryLanguage": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.users.searchQueries#QueryLanguage`) } ``` |

| Fields ||
|---|---|
| `text` | `string` Required. Natural language text to be translated to a UDM instances.search query. |
| `queryLanguage` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.users.searchQueries#QueryLanguage`)`` Optional. The instances.search query language to translate the text to. |

### Response body

Response message for instances.translateUdmQuery.

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

| JSON representation |
|---|
| ``` { "query": string, "timeRange": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/Shared.Types/Interval`) }, "message": string } ``` |

| Fields ||
|---|---|
| `query` | `string` Translated UDM instances.search query (if successful). |
| `timeRange` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/Shared.Types/Interval`)`` Optional. Translated timerange (if the user specified a time range). |
| `message` | `string` Optional. Message to be shown to the user, e.g. if the translation was unsuccessful or if confidence is low. |

### 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.ais.translateUdmQuery`

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