"description":"API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
"description":"Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.",
"description":"Lease 1 or more tasks from a TaskQueue.",
"httpMethod":"POST",
"id":"taskqueue.tasks.lease",
"parameterOrder":[
"project",
"taskqueue",
"numTasks",
"leaseSecs"
],
"parameters":{
"groupByTag":{
"description":"When true, all returned tasks will have the same tag",
"location":"query",
"type":"boolean"
},
"leaseSecs":{
"description":"The lease in seconds.",
"format":"int32",
"location":"query",
"required":true,
"type":"integer"
},
"numTasks":{
"description":"The number of tasks to lease.",
"format":"int32",
"location":"query",
"required":true,
"type":"integer"
},
"project":{
"description":"The project under which the queue lies.",
"location":"path",
"required":true,
"type":"string"
},
"tag":{
"description":"The tag allowed for tasks in the response. Must only be specified if group_by_tag is true. If group_by_tag is true and tag is not specified the tag will be that of the oldest task by eta, i.e. the first available tag",
"location":"query",
"type":"string"
},
"taskqueue":{
"description":"The taskqueue to lease a task from.",
"description":"Time (in seconds since the epoch) at which the task was enqueued.",
"format":"int64",
"type":"string"
},
"id":{
"description":"Name of the task.",
"type":"string"
},
"kind":{
"default":"taskqueues#task",
"description":"The kind of object returned, in this case set to task.",
"type":"string"
},
"leaseTimestamp":{
"description":"Time (in seconds since the epoch) at which the task lease will expire. This value is 0 if the task isnt currently leased out to a worker.",
"format":"int64",
"type":"string"
},
"payloadBase64":{
"description":"A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded.",
"type":"string"
},
"queueName":{
"description":"Name of the queue that the task is in.",
"type":"string"
},
"retry_count":{
"description":"The number of leases applied to this task.",
"format":"int32",
"type":"integer"
},
"tag":{
"description":"Tag for the task, could be used later to lease tasks grouped by a specific tag.",
"description":"ACLs that are applicable to this TaskQueue object.",
"properties":{
"adminEmails":{
"description":"Email addresses of users who are \"admins\" of the TaskQueue. This means they can control the queue, eg set ACLs for the queue.",
"items":{
"type":"string"
},
"type":"array"
},
"consumerEmails":{
"description":"Email addresses of users who can \"consume\" tasks from the TaskQueue. This means they can Dequeue and Delete tasks from the queue.",
"items":{
"type":"string"
},
"type":"array"
},
"producerEmails":{
"description":"Email addresses of users who can \"produce\" tasks into the TaskQueue. This means they can Insert tasks into the queue.",
"items":{
"type":"string"
},
"type":"array"
}
},
"type":"object"
},
"id":{
"description":"Name of the taskqueue.",
"type":"string"
},
"kind":{
"default":"taskqueues#taskqueue",
"description":"The kind of REST object returned, in this case taskqueue.",
"type":"string"
},
"maxLeases":{
"description":"The number of times we should lease out tasks before giving up on them. If unset we lease them out forever until a worker deletes the task.",
"format":"int32",
"type":"integer"
},
"stats":{
"description":"Statistics for the TaskQueue object in question.",
"properties":{
"leasedLastHour":{
"description":"Number of tasks leased in the last hour.",
"format":"int64",
"type":"string"
},
"leasedLastMinute":{
"description":"Number of tasks leased in the last minute.",
"format":"int64",
"type":"string"
},
"oldestTask":{
"description":"The timestamp (in seconds since the epoch) of the oldest unfinished task.",