# Method: namespaces.tasks.list

- [HTTP request](https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.tasks/list#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.tasks/list#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.tasks/list#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.tasks/list#body.request_body)
- [Response body](https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.tasks/list#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.tasks/list#body.ListTasksResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.tasks/list#body.aspect)

List tasks.

### HTTP request

`GET https://run.googleapis.com/apis/run.googleapis.com/v1/{parent}/tasks`

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The namespace from which the tasks should be listed. Replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID It takes the form `namespaces/{namespace}`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `run.tasks.list` |

### Query parameters

| Parameters ||
|---|---|
| `limit` | `integer` Optional. The maximum number of records that should be returned. |
| `includeUninitialized` | `boolean` Optional. Not supported by Cloud Run. |
| `fieldSelector` | `string` Optional. Not supported by Cloud Run. |
| `labelSelector` | `string` Optional. Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn. For example, to list all tasks of execution "foo" in succeeded state: `run.googleapis.com/execution=foo,run.googleapis.com/runningState=Succeeded`. Supported states are: - `Pending`: Initial state of all tasks. The task has not yet started but eventually will. - `Running`: Container instances for this task are running or will be running shortly. - `Succeeded`: No more container instances to run for the task, and the last attempt succeeded. - `Failed`: No more container instances to run for the task, and the last attempt failed. This task has run out of retry attempts. - `Cancelled`: Task was running but got stopped because its parent execution has been aborted. - `Abandoned`: The task has not yet started and never will because its parent execution has been aborted. |
| `resourceVersion` | `string` Optional. Not supported by Cloud Run. |
| `watch` | `boolean` Optional. Not supported by Cloud Run. |
| `continue` | `string` Optional. Optional encoded string to continue paging. |

### Request body

The request body must be empty.

### Response body

ListTasksResponse is a list of Tasks resources.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "items": [ { object (`https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.tasks#Task`) } ], "apiVersion": string, "kind": string, "metadata": { object (`https://docs.cloud.google.com/run/docs/reference/rest/v1/ListMeta`) }, "unreachable": [ string ] } ``` |

| Fields ||
|---|---|
| `items[]` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v1/namespaces.tasks#Task`)`` List of Tasks. |
| `apiVersion` | `string` The API version for this call such as "run.googleapis.com/v1". |
| `kind` | `string` The kind of this resource, in this case "TasksList". |
| `metadata` | ``object (`https://docs.cloud.google.com/run/docs/reference/rest/v1/ListMeta`)`` Metadata associated with this tasks list. |
| `unreachable[]` | `string` Locations that could not be reached. |

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).