- [HTTP request](https://docs.cloud.google.com/developer-device-platform/reference/device-run/rest/v1alpha/projects.locations.devices/list.md.txt#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/developer-device-platform/reference/device-run/rest/v1alpha/projects.locations.devices/list.md.txt#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/developer-device-platform/reference/device-run/rest/v1alpha/projects.locations.devices/list.md.txt#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/developer-device-platform/reference/device-run/rest/v1alpha/projects.locations.devices/list.md.txt#body.request_body)
- [Response body](https://docs.cloud.google.com/developer-device-platform/reference/device-run/rest/v1alpha/projects.locations.devices/list.md.txt#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/developer-device-platform/reference/device-run/rest/v1alpha/projects.locations.devices/list.md.txt#body.ListDevicesResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/developer-device-platform/reference/device-run/rest/v1alpha/projects.locations.devices/list.md.txt#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/developer-device-platform/reference/device-run/rest/v1alpha/projects.locations.devices/list.md.txt#body.aspect_1)
- [Try it!](https://docs.cloud.google.com/developer-device-platform/reference/device-run/rest/v1alpha/projects.locations.devices/list.md.txt#try-it)

Lists all devices.

### HTTP request

`GET https://devicerun.googleapis.com/v1alpha/{parent=projects/*/locations/*}/devices`

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The parent of the collection of devices. Format: `projects/{project}/locations/global`. It takes the form `projects/{project}/locations/{location}`. |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` Optional. The maximum number of devices to return. The server may return fewer items than this value. |
| `pageToken` | `string` Optional. A page token, received from a previous `devices.list` call. Provide this to receive the subsequent page. When paginating, all other parameters provided to `devices.list` must match the call that provided the page token. |
| `filter` | `string` Optional. An AIP-160 (<https://google.aip.dev/160>) filter expression restricting which devices are returned. An empty filter returns all devices. Filtering is supported over the `Device` fields, including nested fields via dot-path. Enum and string values must be double-quoted. Examples - `platform = "ANDROID"` - `platform = "ANDROID" AND osVersion = "34"` - `hardwareType = "PHYSICAL" AND formFactor = "PHONE"` - `androidDetails.build_type = "userdebug"` - `availability.capacity = "HIGH"` <br /> |

### Request body

The request body must be empty.

### Response body

Response including listed devices.

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

| JSON representation |
|---|
| ``` { "devices": [ { object (`Device`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `devices[]` | ``object (`Device`)`` The list of devices. |
| `nextPageToken` | `string` Token to receive the next page of devices. This will be absent if the end of the response list has been 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.md.txt#authorization-gcp).

### IAM Permissions

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

- `devicerun.devices.list`

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