# Method: projects.locations.edgeCacheServices.invalidateCache

- [HTTP request](https://docs.cloud.google.com/media-cdn/docs/reference/rest/v1/projects.locations.edgeCacheServices/invalidateCache#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/media-cdn/docs/reference/rest/v1/projects.locations.edgeCacheServices/invalidateCache#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/media-cdn/docs/reference/rest/v1/projects.locations.edgeCacheServices/invalidateCache#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/media-cdn/docs/reference/rest/v1/projects.locations.edgeCacheServices/invalidateCache#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/media-cdn/docs/reference/rest/v1/projects.locations.edgeCacheServices/invalidateCache#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/media-cdn/docs/reference/rest/v1/projects.locations.edgeCacheServices/invalidateCache#body.aspect)

Sends a cache invalidation request.

### HTTP request

`POST https://networkservices.googleapis.com/v1/{edgeCacheService=projects/*/locations/*/edgeCacheServices/*}:invalidateCache`

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

### Path parameters

| Parameters ||
|---|---|
| `edgeCacheService` | `string` Required. The name of the `https://docs.cloud.google.com/media-cdn/docs/reference/rest/v1/projects.locations.edgeCacheServices#EdgeCacheService` resource to apply the invalidation request to. Must be in the format `projects/*/locations/global/edgeCacheServices/*`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `edgeCacheService`: - `networkservices.edgeCacheServices.invalidateCache` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "host": string, "path": string, "cacheTags": [ string ] } ``` |

| Fields ||
|---|---|
| `host` | `string` The hostname to invalidate against. You can specify an exact or wildcard host based on the host component. For example, `video.example.com` or `*.example.com`. |
| `path` | `string` The path to invalidate against. You can specify an exact or wildcard path based on the a path component. For example, `/videos/hls/139123.mp4` or `/manifests/*`. |
| `cacheTags[]` | `string` A list of cache tags used to identify cached objects. Cache tags are specified when the response is first cached, by setting the `Cache-Tag` response header at the origin. By default, all objects have a cache tag representing the HTTP status code of the response, the MIME content-type, and the origin. Multiple cache tags in the same revalidation request are treated as Boolean `OR` - for example, `tag1 OR tag2 OR tag3`. If a host and path are also specified, these are treated as Boolean `AND` with any tags. Up to 10 tags can be specified in a single invalidation request. |

### Response body

If successful, the response body is empty.

### Authorization scopes

Requires the following OAuth scope:

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

For more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).