REST Resource: enterprises.devices
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
資源:裝置
JSON 表示法 |
{
"name": string,
"type": string,
"traits": {
object
},
"parentRelations": [
{
object (ParentRelation )
}
]
} |
欄位 |
name |
string
必要欄位。裝置的資源名稱。例如:「enterprises/XYZ/devices/123」。
|
type |
string
僅供輸出。用於一般顯示用途的裝置類型。例如:「THERMOSTAT」。裝置類型不得用來推斷或推測出實際獲派裝置的功能。請改為使用裝置傳回的特徵。
|
traits |
object (Struct format)
僅供輸出。裝置特性。
|
parentRelations[] |
object (ParentRelation )
裝置的指派對象詳細資料。
|
ParentRelation
JSON 表示法 |
{
"parent": string,
"displayName": string
} |
欄位 |
parent |
string
僅供輸出。關係的名稱,例如獲派裝置的結構/房間。例如:「enterprises/XYZ/structures/ABC」或「enterprises/XYZ/structures/ABC/rooms/123」
|
displayName |
string
僅供輸出。關係的自訂名稱,例如獲派裝置的結構/房間。
|
方法 |
|
這個外掛程式能對企業管理的裝置執行指令。 |
|
取得由企業管理的裝置。 |
|
列出企業管理的裝置。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\u003cp\u003eThe Device resource represents an instance of an enterprise-managed device, containing information like name, type, traits, and parent relationships.\u003c/p\u003e\n"],["\u003cp\u003eParentRelation describes the relationship of a device to a structure or room within the enterprise, including its parent and display name.\u003c/p\u003e\n"],["\u003cp\u003eThis API provides methods to execute commands on devices, retrieve device details, and list devices managed by the enterprise.\u003c/p\u003e\n"]]],[],null,["# REST Resource: enterprises.devices\n\n- [Resource: Device](#Device)\n - [JSON representation](#Device.SCHEMA_REPRESENTATION)\n- [ParentRelation](#ParentRelation)\n - [JSON representation](#ParentRelation.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: Device\n----------------\n\nDevice resource represents an instance of enterprise managed device in the property.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"type\": string, \"traits\": { object }, \"parentRelations\": [ { object (/nest/device-access/reference/rest/v1/enterprises.devices#ParentRelation) } ] } ``` |\n\n| Fields ||\n|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. The resource name of the device. For example: \"enterprises/XYZ/devices/123\". |\n| `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. |\n| `traits` | `object (`[Struct](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Struct)` format)` Output only. Device traits. |\n| `parentRelations[]` | `object (`[ParentRelation](/nest/device-access/reference/rest/v1/enterprises.devices#ParentRelation)`)` Assignee details of the device. |\n\nParentRelation\n--------------\n\nRepresents device relationships, for instance, structure/room to which the device is assigned to.\n\n| JSON representation |\n|-----------------------------------------------------|\n| ``` { \"parent\": string, \"displayName\": string } ``` |\n\n| Fields ||\n|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `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\" |\n| `displayName` | `string` Output only. The custom name of the relation -- e.g., structure/room where the device is assigned to. |\n\n| Methods ------- ||\n|------------------------------------------------------------------------------------------------|---------------------------------------------------------|\n| ### [executeCommand](/nest/device-access/reference/rest/v1/enterprises.devices/executeCommand) | Executes a command to device managed by the enterprise. |\n| ### [get](/nest/device-access/reference/rest/v1/enterprises.devices/get) | Gets a device managed by the enterprise. |\n| ### [list](/nest/device-access/reference/rest/v1/enterprises.devices/list) | Lists devices managed by the enterprise. |"]]