Operations: cancel Stay organized with collections Save and categorize content based on your preferences.
Starts asynchronous cancellation on a long-running operation. The server makes a best effort tocancel the operation, but success is not guaranteed. If the server doesn't support this method, itreturnsgoogle.rpc.Code.UNIMPLEMENTED.
Users can useOperations: get or othermethods to check whether the cancellation succeeded or whether the operation completed despitecancellation. On successful cancellation, the operation is not deleted; instead, it becomes anoperation with anOperation.error value with agoogle.rpc.Status.code of 1, corresponding toCode.CANCELLED. For moreinformation about these values, see theOperations resource representation.
Required permissions
The authenticated user must have the following IAM permissions on the bucket touse this method:
storage.bucketOperations.cancel
Request
HTTP request
POST https://storage.googleapis.com/storage/v1/b/bucket/operations/operationId/cancel
In addition tostandard query parameters, the following query parameters apply to this method.
To see an example of how to include query parameters in a request, see theJSON API Overview page.
Parameters
| Parameter name | Value | Description |
|---|---|---|
| Path parameters | ||
bucket | string | Name of a bucket. |
operationId | string | The ID of the operation. |
Request body
Do not supply a request body with this method.
Response
If successful, this method returns an empty response body.
For information about status and error codes returned by this API, see thereference page.
Try it!
Use the APIs Explorer below to call this method on live data and see the response.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-17 UTC.