Method: projects.locations.queues.tasks.batchDelete

Deletes a batch of tasks. This is a non-atomic operation: if deletion fails for some tasks, it can still succeed for others. The metadata field of google.longrunning.Operation contains details of failed deletions. A maximum of 1000 tasks can be deleted in a batch.

HTTP request

POST https://cloudtasks.googleapis.com/v2beta3/{parent=projects/*/locations/*/queues/*}/tasks:batchDelete

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The queue name. For example: Format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID

Authorization requires the following IAM permission on the specified resource parent:

  • cloudtasks.tasks.batchDelete

Request body

The request body contains data with the following structure:

JSON representation
{
  "names": [
    string
  ],
  "requestId": string
}
Fields
names[]

string

Required. The names of the tasks to delete. A maximum of 1000 tasks can be deleted in a batch. For example: Format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID

requestId

string

Optional. This field will be used to identify the long running operation, avoiding duplication when user retries. If not provided, then a UUID will be generated at server side.

Response body

If successful, the response body contains an instance of Operation.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloud-tasks

For more information, see the Authentication Overview.