---
title: "POST /v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel"
method: POST
path: "/v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel"
tags: ["projects"]
---

# POST /v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel

`POST /v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel`

## Request

- Base URL: `https://container.googleapis.com`
- URL: `https://container.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel`
- Auth: one of:
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-platform`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/container`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/container`

Cancels the specified operation.

## Path parameters

- `projectsId` string, required
- `locationsId` string, required
- `operationsId` string, required

## Request body

- CancelOperationRequest: CancelOperationRequest cancels a single operation.
  - `name` string: The name (project, location, operation id) of the operation to cancel. Specified in the format `projects/*/locations/*/operations/*`.
  - `operationId` string: Deprecated. The server-assigned `name` of the operation. This field has been deprecated and replaced by the name field.
  - `projectId` string: Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.
  - `zone` string: Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the operation resides. This field has been deprecated and replaced by the name field.

## Response `200`

Successful response

- Empty: A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

## Changes

- **2026-11-03** `649eae563481`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/container` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/container` was removed from the endpoint's security scheme `Oauth2c`

[Operation history](https://skmtc.dev/google/apis/container/changes/v1/projects/:projectsId/locations/:locationsId/operations/:operationsId:cancel/post.md)

---

[API](https://skmtc.dev/google/apis/container.md) - [All operations](https://skmtc.dev/google/apis/container/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/container/revisions/649eae563481?raw)
