Stay organized with collections
Save and categorize content based on your preferences.
Cancels a transfer. Use the transferOperations.get method to check if the cancellation succeeded or if the operation completed despite the cancel request.
When you cancel an operation, the currently running transfer is interrupted. For recurring transfer jobs, the next instance of the transfer job will still run. For example, if your job is configured to run every day at 1pm and you cancel Monday's operation at 1:05pm, Monday's transfer will stop. However, a transfer job will still be attempted on Tuesday.
This applies only to currently running operations. If an operation is not currently running, cancel does nothing.
When you cancel a job, the next job computes a delta of files and may repair any inconsistent state. For instance, if you run a job every day, and today's job found 10 new files and transferred five files before you canceled the job, tomorrow's transfer operation will compute a new delta with the five files that were not copied today plus any new files discovered tomorrow.
HTTP request
POST https://storagetransfer.googleapis.com/v1/{name=transferOperations/**}: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-07-09 UTC."],[],[],null,["# Method: transferOperations.cancel\n\nCancels a transfer. Use the [transferOperations.get](/storage-transfer/docs/reference/rest/v1/transferOperations/get#google.longrunning.Operations.GetOperation) method to check if the cancellation succeeded or if the operation completed despite the `cancel` request.\n\nWhen you cancel an operation, the currently running transfer is interrupted. For recurring transfer jobs, the next instance of the transfer job will still run. For example, if your job is configured to run every day at 1pm and you cancel Monday's operation at 1:05pm, Monday's transfer will stop. However, a transfer job will still be attempted on Tuesday.\n\nThis applies only to currently running operations. If an operation is not currently running, `cancel` does nothing.\n\n\u003cbr /\u003e\n\n| **Caution:** Canceling a transfer job can leave your data in an unknown state. We recommend that you restore the state at both the destination and the source after the `cancel` request completes so that your data is in a consistent state.\n\n\u003cbr /\u003e\n\nWhen you cancel a job, the next job computes a delta of files and may repair any inconsistent state. For instance, if you run a job every day, and today's job found 10 new files and transferred five files before you canceled the job, tomorrow's transfer operation will compute a new delta with the five files that were not copied today plus any new files discovered tomorrow.\n\n### HTTP request\n\n`POST https://storagetransfer.googleapis.com/v1/{name=transferOperations/**}:cancel`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body is an empty JSON object.\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]