# REST Resource: enterprises.devices

- [Resource: Device](https://developers.google.com/nest/device-access/reference/rest/v1/enterprises.devices#Device)
  - [JSON representation](https://developers.google.com/nest/device-access/reference/rest/v1/enterprises.devices#Device.SCHEMA_REPRESENTATION)
- [ParentRelation](https://developers.google.com/nest/device-access/reference/rest/v1/enterprises.devices#ParentRelation)
  - [JSON representation](https://developers.google.com/nest/device-access/reference/rest/v1/enterprises.devices#ParentRelation.SCHEMA_REPRESENTATION)
- [Methods](https://developers.google.com/nest/device-access/reference/rest/v1/enterprises.devices#METHODS_SUMMARY)

## Resource: Device

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

| JSON representation |
|---|
| ``` { "name": string, "type": string, "traits": { object }, "parentRelations": [ { object (`https://developers.google.com/nest/device-access/reference/rest/v1/enterprises.devices#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 (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Struct` format)`` Output only. Device traits. |
| `parentRelations[]` | ``object (`https://developers.google.com/nest/device-access/reference/rest/v1/enterprises.devices#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 ||
|---|---|
| ### `https://developers.google.com/nest/device-access/reference/rest/v1/enterprises.devices/executeCommand` | Executes a command to device managed by the enterprise. |
| ### `https://developers.google.com/nest/device-access/reference/rest/v1/enterprises.devices/get` | Gets a device managed by the enterprise. |
| ### `https://developers.google.com/nest/device-access/reference/rest/v1/enterprises.devices/list` | Lists devices managed by the enterprise. |