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

**Full name**: projects.locations.instances.legacy.legacyFindUdmEvents

Legacy endpoint for finding UDM/entity events using tokens or ids.

### HTTP request

`GET https://{endpoint}/v1alpha/{instance}/legacy:legacyFindUdmEvents`

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

### Query parameters

| Parameters ||
|---|---|
| `tokens[]` | `string` Optional. A list of tokens, with each token referring to a group of UDM/Entity events. |
| `ids[]` | `string (https://developers.google.com/discovery/v1/type-format format)` Optional. A list of UDM/Entity event ids that should be returned. If both tokens and ids are provided, tokens will be discarded. A base64-encoded string. |
| `returnUnenrichedData` | `boolean` Optional. Whether user wants unenriched data. Default value is false. |
| `returnAllEventsForLog` | `boolean` Optional. Whether to return all events generated from the ingested log. |

### Request body

The request body must be empty.

### Response body

All UDM events or entity events for a given list of tokens or ids.

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

| JSON representation |
|---|
| ``` { "udmEventGroups": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacyFindUdmEvents#UdmEventGroup`) } ], "entityGroups": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacyFindUdmEvents#EntityGroup`) } ] } ``` |

| Fields ||
|---|---|
| `udmEventGroups[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacyFindUdmEvents#UdmEventGroup`)`` Groups of UDM Events. Each group of UDM Events is associated with a single token or id in the request, and listed in the same order as tokens or ids in the request. |
| `entityGroups[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacy/legacyFindUdmEvents#EntityGroup`)`` Groups of UDM Entities. Each group of UDM Entities is associated with a single token or id in the request, and listed in the same order as tokens or ids in the request. |

### 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.legacies.legacyFindUdmEvents`

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

## UdmEventGroup

All UDM events associated with a token or id. There can be multiple events associated with a single token.

| JSON representation |
|---|
| ``` { "events": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/Shared.Types/Collection#UDM`) } ] } ``` |

| Fields ||
|---|---|
| `events[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/Shared.Types/Collection#UDM`)`` List of UDM Events associated with a token or id. |

## EntityGroup

All UDM entity events associated with a token or id.

| JSON representation |
|---|
| ``` { "entities": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/Shared.Types/Collection#Entity`) } ] } ``` |

| Fields ||
|---|---|
| `entities[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/Shared.Types/Collection#Entity`)`` List of Entity Events associated with a token or id. |