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 to
cancel the operation, but success is not guaranteed. If the server doesn't support this method, it
returns google.rpc.Code.UNIMPLEMENTED.
Users can use
Operations: get or other
methods to check whether the cancellation succeeded or whether the operation completed despite
cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an
operation with an Operation.error value with a
google.rpc.Status.code of 1, corresponding to Code.CANCELLED. For more
information about these values, see the
Operations resource representation.
Required permissions
The authenticated user must have the following IAM permissions on the bucket to
use this method:
storage.bucketOperations.cancel
Request
HTTP request
POST https://storage.googleapis.com/storage/v1/b/bucket/operations/operationId/cancel
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Operations: cancel\n\nStarts asynchronous cancellation on a long-running operation. The server makes a best effort to\ncancel the operation, but success is not guaranteed. If the server doesn't support this method, it\nreturns `google.rpc.Code.UNIMPLEMENTED`.\n\nUsers can use\n[Operations: get](/storage/docs/json_api/v1/operations/get) or other\nmethods to check whether the cancellation succeeded or whether the operation completed despite\ncancellation. On successful cancellation, the operation is not deleted; instead, it becomes an\noperation with an `Operation.error` value with a\n`google.rpc.Status.code` of 1, corresponding to `Code.CANCELLED`. For more\ninformation about these values, see the\n[Operations resource representation](/storage/docs/json_api/v1/operations).\n\nRequired permissions\n--------------------\n\nThe authenticated user must have the following IAM permissions on the bucket to\nuse this method:\n\n- `storage.bucketOperations.cancel`\n\nRequest\n-------\n\n### HTTP request\n\n```\nPOST https://storage.googleapis.com/storage/v1/b/bucket/operations/operationId/cancel\n```\n\nIn addition to [standard query parameters](/storage/docs/json_api/v1/parameters#query),\nthe following query parameters apply to this method.\n\nTo see an example of how to include query parameters in a request, see the\n[JSON API Overview](/storage/docs/json_api#query_parameters) page.\n\n### Parameters\n\n### Request body\n\nDo not supply a request body with this method.\n\nResponse\n--------\n\nIf successful, this method returns an empty response body.\n\nFor information about status and error codes returned by this API, see the\n[reference page](/storage/docs/json_api/v1/status-codes).\n\nTry it!\n-------\n\n\nUse the APIs Explorer below to call this method on live data and see the response."]]