获取设备信息

GET /api/v1/devices/$deviceId

根据设备id获取设备详细信息

URL参数

参数名 类型 必填 描述 限制
deviceId string 设备唯一标识

请求样例

GET /api/v1/devices/601b2471-f139-45d2-bf40-b76f0719c7e3 HTTP/1.1
Host: 60.205.223.53:8443
Authorization: Bearer xxx.xxxx.xxx
Cache-Control: no-cache

响应参数

参数名 类型 必填 描述 限制
id string 设备标识
deviceName string 设备名称
projectId string 设备所属项目标识
modelId string 设备所属模型标识
status Enum<string> 设备状态 取值
Active:激活状态
Locked:锁定状态
accessToken string 设备访问令牌
isVirtual boolean 是否虚拟设备
comments string 备注
deviceModelType Enum<string> 设备模型类型
deviceModelName string 设备模型名称
projectName string 项目名称
hasActions boolean 设备是否提供操作接口
deviceModelUrl string 设备模型图片URL
metadata Map<String, Object> 设备元数据

响应样例

{
    "returnCode": 0,
    "result": {
        "createdBy": "augur@glodon.com",
        "createdTime": 1505873377368,
        "tenantId": "96345b4a-8705-4fe8-8b92-5533f114ad6a",
        "id": "601b2471-f139-45d2-bf40-b76f0719c7e3",
        "deviceName": "deviceName-2222",
        "projectId": "3ebc7aa1-18e1-43f7-b198-68bbdd97304d",
        "modelId": "9e1a567d-e375-472e-a144-fa9eb8e990b4",
        "status": "Active",
        "accessToken": "81e93643-52e1-47b6-ad66-9a80cd04a6e9",
        "isVirtual": false,
        "comments": "comments is nothing",
        "deviceModelType": "Light",
        "deviceModelName": "deviceUpdateF",
        "projectName": "project-8",
        "hasActions": true,
        "deviceModelUrl": "http://avatar.csdn.net/E/A/0/1_u014231523.jpg",
        "virtual": false,
        "deleted": false
    }
}