Google Cloud IoT Core is being retired on August 16, 2023. Contact your Google Cloud account team for more information.

Method: projects.locations.registries.devices.list

Stay organized with collections Save and categorize content based on your preferences.

List devices in a device registry.

HTTP request

GET https://cloudiot.googleapis.com/v1/{parent=projects/*/locations/*/registries/*}/devices

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

The device registry path. Required. For example, projects/my-project/locations/us-central1/registries/my-registry.

Authorization requires the following Google IAM permission on the specified resource parent:

  • cloudiot.devices.list

Query parameters

Parameters
deviceNumIds

string

A list of device numeric IDs. If empty, this field is ignored. Maximum IDs: 10,000.

deviceIds

string

A list of device string IDs. For example, ['device0', 'device12']. If empty, this field is ignored. Maximum IDs: 10,000

fieldMask

string (FieldMask format)

The fields of the Device resource to be returned in the response. The fields id and numId are always returned, along with any other fields specified.

A comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".

gatewayListOptions

object(GatewayListOptions)

Options related to gateways.

pageSize

number

The maximum number of devices to return in the response. If this value is zero, the service will select a default size. A call may return fewer objects than requested. A non-empty nextPageToken in the response indicates that more data is available.

pageToken

string

The value returned by the last ListDevicesResponse; indicates that this is a continuation of a prior devices.list call and the system should return the next page of data.

Request body

The request body must be empty.

Response body

If successful, the response body contains an instance of ListDevicesResponse.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloudiot
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.