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

**Full name**: projects.locations.instances.threatCollections.fetchEntityMetadata

Gets a list of entity metadata for a threat collection.

### HTTP request

`GET https://{endpoint}/v1alpha/{name}:fetchEntityMetadata`

Where `{endpoint}` is one of the [supported service endpoints](https://docs.cloud.google.com/chronicle/docs/reference/rest#rest_endpoints).

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The resource name of the ThreatCollection to fetch entity metadata for. Format: projects/{project}/locations/{location}/instances/{instance}/threatCollections/{threatCollection} |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` Optional. The page size for the number of entities to return. Default and maximum size is 1000. |
| `pageToken` | `string` Optional. A page token, received from a previous `FetchEntityMetadata` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `FetchEntityMetadata` must match the call that provided the page token. |

### Request body

The request body must be empty.

### Response body

Response containing a list of entity metadata.

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

| JSON representation |
|---|
| ``` { "entityMetadata": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.threatCollections/fetchEntityMetadata#ThreatCollectionEntityMetadata`) } ], "nextPageToken": string, "totalSize": integer } ``` |

| Fields ||
|---|---|
| `entityMetadata[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.threatCollections/fetchEntityMetadata#ThreatCollectionEntityMetadata`)`` Output only. A list of entity risks scores with information typing them to the threat collection. Ordered by entity.risk_score. |
| `nextPageToken` | `string` Output only. A token that can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| `totalSize` | `integer` Output only. The total number of entities that match the request. The size of the `entityMetadata` returned by pagination may be less than the `totalSize` that matches. |

### 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 `name` resource:

- `chronicle.threatCollections.fetchEntityMetadata`

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

## ThreatCollectionEntityMetadata

Entity metadata for a threat collection.

| JSON representation |
|---|
| ``` { "entity": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.entities#Entity`) }, "references": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.threatCollections/fetchEntityMetadata#ThreatCollectionEntityMetadataReference`) } ] } ``` |

| Fields ||
|---|---|
| `entity` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.entities#Entity`)`` An Asset or User entity which contains an entity indicator and riskScore data associated with it. |
| `references[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.threatCollections/fetchEntityMetadata#ThreatCollectionEntityMetadataReference`)`` A list of references associated with the entity. |

## ThreatCollectionEntityMetadataReference

A link between a threat collection and an Asset or User entity in a threat collection's entity metadata.

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "ioc": string // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| Possible reference types. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `ioc` | `string` The resource name of the Ioc associated with the entity. Format: projects/{project}/locations/{location}/instances/{instance}/iocs/{ioc} |
| End of mutually exclusive fields. ||