Method: projects.locations.registries.devices.states.list

Lists the last few versions of the device state in descending order (i.e.: newest first).

HTTP request

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

The URL uses Google API HTTP annotation syntax.

Path parameters

Parameters
name

string

The name of the device. For example, projects/p0/locations/us-central1/registries/registry0/devices/device0 or projects/p0/locations/us-central1/registries/registry0/devices/{numId}.

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

  • cloudiot.devices.get

Query parameters

Parameters
numStates

number

The number of states to list. States are listed in descending order of update time. The maximum number of states retained is 10. If this value is zero, it will return all the states available.

Request body

The request body must be empty.

Response body

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

Response for states.list.

JSON representation
{
  "deviceStates": [
    {
      object(DeviceState)
    }
  ],
}
Fields
deviceStates[]

object(DeviceState)

The last few device states. States are listed in descending order of server update time, starting from the most recent one.

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 Auth Guide.

Was this page helpful? Let us know how we did:

Send feedback about...

Google Cloud Internet of Things Core