- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- CreateTaskRequest
- Try it!
Creates a batch of tasks and adds them to a queue. This call is not atomic.
All tasks must be for the same queue. A maximum of 100 tasks can be created in a single batch.
HTTP request
POST https://cloudtasks.googleapis.com/v2beta3/{parent=projects/*/locations/*/queues/*}/tasks:batchCreate
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
parent |
Required. The queue name. For example: The queue must already exist. Authorization requires the following IAM permission on the specified resource
|
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{
"requests": [
{
object ( |
| Fields | |
|---|---|
requests[] |
Required. The list of requests to create tasks. The queue specified in parent field of each CreateTaskRequest will be the same. This validation happens on the client side as well as in the handler. BatchCreateTasksRequest.parent will also be the same value as the individual CreateTaskRequest.parent . The maximum number of requests is 100. |
requestId |
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-platformhttps://www.googleapis.com/auth/cloud-tasks
For more information, see the Authentication Overview.
CreateTaskRequest
Request message for tasks.create.
| JSON representation |
|---|
{ "parent": string, "task": { object ( |
| Fields | |
|---|---|
parent |
Required. The queue name. For example: The queue must already exist. |
task |
Required. The task to add. Task names have the following format: If Task De-duplication: Explicitly specifying a task ID enables task de-duplication. If a task's ID is identical to that of an existing task or a task that was deleted or executed recently then the call will fail with Because there is an extra lookup cost to identify duplicate task names, these |
responseView |
The responseView specifies which subset of the By default responseView is Authorization for |