- [HTTP request](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.identityMappingStores/purgeIdentityMappings#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.identityMappingStores/purgeIdentityMappings#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.identityMappingStores/purgeIdentityMappings#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.identityMappingStores/purgeIdentityMappings#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.identityMappingStores/purgeIdentityMappings#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.identityMappingStores/purgeIdentityMappings#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.identityMappingStores/purgeIdentityMappings#body.aspect_1)
- [InlineSource](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.identityMappingStores/purgeIdentityMappings#InlineSource)
  - [JSON representation](https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.identityMappingStores/purgeIdentityMappings#InlineSource.SCHEMA_REPRESENTATION)

Purges specified or all Identity Mapping Entries from an Identity Mapping Store.

### HTTP request

Choose an endpoint:
global us   
`POST https://discoveryengine.googleapis.com/v1beta/{identityMappingStore=projects/*/locations/*/identityMappingStores/*}:purgeIdentityMappings`

<br />

The URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `identityMappingStore` | `string` Required. The name of the Identity Mapping Store to purge Identity Mapping Entries from. Format: `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "filter": string, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "inlineSource": { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.identityMappingStores/purgeIdentityMappings#InlineSource`) } // End of mutually exclusive fields. "force": boolean } ``` |

| Fields ||
|---|---|
| `filter` | `string` Filter matching identity mappings to purge. The eligible field for filtering is: - `updateTime`: in ISO 8601 "zulu" format. - `externalId` Examples: - Deleting all identity mappings updated in a time range: `updateTime > "2012-04-23T18:25:43.511Z" AND updateTime < "2012-04-23T18:30:43.511Z"` - Deleting all identity mappings for a given externalId: `externalId = "id1"` - Deleting all identity mappings inside an identity mapping store: `*` The filtering fields are assumed to have an implicit AND. Should not be used with source. An error will be thrown, if both are provided. |
| The source of the input. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `inlineSource` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/projects.locations.identityMappingStores/purgeIdentityMappings#InlineSource`)`` The inline source to purge identity mapping entries from. |
| End of mutually exclusive fields. ||
| `force` | `boolean` Actually performs the purge. If `force` is set to false, return the expected purge count without deleting any identity mappings. This field is only supported for purge with filter. For input source this field is ignored and data will be purged regardless of the value of this field. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `https://www.googleapis.com/auth/discoveryengine.readwrite`
- `https://www.googleapis.com/auth/discoveryengine.serving.readwrite`

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 `identityMappingStore` resource:

- `discoveryengine.identityMappingStores.purgeIdentityMappings`

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

## InlineSource

The inline source to purge identity mapping entries from.

| JSON representation |
|---|
| ``` { "identityMappingEntries": [ { object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/IdentityMappingEntry`) } ] } ``` |

| Fields ||
|---|---|
| `identityMappingEntries[]` | ``object (`https://docs.cloud.google.com/gemini/enterprise/docs/reference/rest/v1beta/IdentityMappingEntry`)`` A maximum of 10000 entries can be purged at one time |