REST Resource: enterprises.devices
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
资源:Device
JSON 表示法 |
{
"name": string,
"type": string,
"traits": {
object
},
"parentRelations": [
{
object (ParentRelation )
}
]
} |
字段 |
name |
string
必需。设备的资源名称。例如:“enterprises/XYZ/devices/123”。
|
type |
string
仅限输出。设备类型,用于常规显示。例如:“THERMOSTAT”。不应使用设备类型推断或推断分配给的实际设备的功能。请改为使用针对设备返回的 trait。
|
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
仅限输出。关系的自定义名称,例如设备分配到的结构/房间。
|
方法 |
|
对由企业管理的设备执行命令。 |
|
获取由企业管理的设备。 |
|
列出由企业管理的设备。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):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,["- [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 Device 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 Represents 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. |"]]