REST Resource: enterprises.devices

  • The Device resource represents an instance of an enterprise-managed device, containing information like name, type, traits, and parent relationships.

  • ParentRelation describes the relationship of a device to a structure or room within the enterprise, including its parent and display name.

  • This API provides methods to execute commands on devices, retrieve device details, and list devices managed by the enterprise.

Resource: Device

Device resource represents an instance of enterprise managed device in the property.

JSON representation
{
  "name": string,
  "type": string,
  "traits": {
    object
  },
  "parentRelations": [
    {
      object (ParentRelation)
    }
  ]
}
Fields
name

string

Required. The resource name of the device. For example: "enterprises/XYZ/devices/123".

type

string

Output only. Type of the device for general display purposes. For example: "THERMOSTAT". The device type should not be used to deduce or infer functionality of the actual device it is assigned to. Instead, use the returned traits for the device.

traits

object (Struct format)

Output only. Device traits.

parentRelations[]

object (ParentRelation)

Assignee details of the device.

ParentRelation

Represents device relationships, for instance, structure/room to which the device is assigned to.

JSON representation
{
  "parent": string,
  "displayName": string
}
Fields
parent

string

Output only. The name of the relation -- e.g., structure/room where the device is assigned to. For example: "enterprises/XYZ/structures/ABC" or "enterprises/XYZ/structures/ABC/rooms/123"

displayName

string

Output only. The custom name of the relation -- e.g., structure/room where the device is assigned to.

Methods

executeCommand

Executes a command to device managed by the enterprise.

get

Gets a device managed by the enterprise.

list

Lists devices managed by the enterprise.