# Method: projects.locations.dnsThreatDetectors.list

Lists DnsThreatDetectors in a given project and location.

### HTTP request

`GET https://networksecurity.googleapis.com/v1beta1/{parent=projects/*/locations/*}/dnsThreatDetectors`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The parent value for `ListDnsThreatDetectorsRequest`. |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` Optional. The requested page size. The server may return fewer items than requested. If unspecified, the server picks an appropriate default. |
| `pageToken` | `string` Optional. A page token received from a previous `ListDnsThreatDetectorsRequest` call. Provide this to retrieve the subsequent page. |

### Request body

The request body must be empty.

### Response body

The response message to requesting a list of DnsThreatDetectors.

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

| JSON representation |
|---|
| ``` { "dnsThreatDetectors": [ { object (`https://docs.cloud.google.com/dns/docs/reference/dns-armor/rest/v1beta1/projects.locations.dnsThreatDetectors#DnsThreatDetector`) } ], "nextPageToken": string, "unreachable": [ string ] } ``` |

| Fields ||
|---|---|
| `dnsThreatDetectors[]` | ``object (`https://docs.cloud.google.com/dns/docs/reference/dns-armor/rest/v1beta1/projects.locations.dnsThreatDetectors#DnsThreatDetector`)`` The list of DnsThreatDetector resources. |
| `nextPageToken` | `string` A token, which can be sent as `pageToken`, to retrieve the next page. |
| `unreachable[]` | `string` Unordered list. Unreachable `DnsThreatDetector` resources. |

### 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).

### IAM Permissions

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

- `networksecurity.dnsThreatDetectors.list`

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