Tasks: lease
Requires authorization
Acquires a lease on the topmost N unowned tasks in the specified queue. Try it now.
The developer's email address must be specified as a user_email in the acl element of queue.yaml.
Request
HTTP request
Parameters
Parameter name | Value | Description |
|---|---|---|
Path parameters | ||
|
| The project under which the queue lies. |
|
| The taskqueue to lease a task from. |
Required query parameters | ||
|
| How long to lease this task, in seconds. |
|
| The number of tasks to lease. |
Optional query parameters | ||
|
| When True, returns tasks of the same tag. Specify which tag by using the |
|
| Only specify tag if |
Authorization
This request requires authorization with at least one of the following scopes (read more about authentication and authorization).
Scope |
|---|
|
|
Request body
Do not supply a request body with this method.
Response
If successful, this method returns a response body with the following structure:
Property name | Value | Description | Notes |
|---|---|---|---|
|
| The kind of object returned, a list of tasks. | |
|
| The actual list of tasks returned as a result of the lease operation. |
Try it!
Use the APIs Explorer below to call this method on live data and see the response. Alternatively, try the standalone Explorer.