- [HTTP request](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPublisher/legacyListTasks#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPublisher/legacyListTasks#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPublisher/legacyListTasks#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPublisher/legacyListTasks#body.request_body)
- [Response body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPublisher/legacyListTasks#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPublisher/legacyListTasks#body.LegacyListTasksResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPublisher/legacyListTasks#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.legacyPublisher/legacyListTasks#body.aspect_1)

**Full name**: projects.locations.instances.legacyPublisher.legacyListTasks

Lists the set of pending tasks (e.g., action executions, integration updates) assigned to a specific remote agent.

### HTTP request

`GET https://{endpoint}/v1alpha/{instance}/legacyPublisher:legacyListTasks`

Where `{endpoint}` is one of the [supported service endpoints](https://docs.cloud.google.com/chronicle/docs/reference/rest#rest_endpoints).

### Path parameters

| Parameters ||
|---|---|
| `instance` | `string` Required. The name of the parent resource, which is the SecOps instance of the legacy publisher. Format: projects/{project}/locations/{location}/instances/{instance} |

### Query parameters

| Parameters ||
|---|---|
| `agent_id` | `string` Optional. The id of the remote agent. |
| `status` | `string` Optional. The status of the tasks that are to be listed. |
| `count` | `integer` Optional. The number of tasks to be listed. |
| `filter_mode` | `string` Optional. The filter mode of the tasks that are to be listed. |
| `task_types` | `string` Optional. The types of the tasks that are to be listed. |
| `new_tasks` | `boolean` Optional. Should be true if we want to list only new tasks. |

### Request body

The request body must be empty.

### Response body

Response message for legacyPublisher.legacyListTasks.

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

| JSON representation |
|---|
| ``` { "tasks": [ { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/LegacyTask`) } ] } ``` |

| Fields ||
|---|---|
| `tasks[]` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/LegacyTask`)`` The list of tasks. |

### Authorization scopes

Requires one of the following OAuth scopes:

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

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

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `instance` resource:

- `chronicle.legacyPublisher.get`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).