获取设备镜像信息

GET /api/v1/devices/$deviceId/shadows

获取设备镜像信息

URL参数

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

请求样例

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

响应参数

参数名 类型 必填 描述 限制
id string 设备标识
attributeMap Map<String, Attribute> 设备属性列表,key值为属性编码
metadata Map<String,Object> 元数据

Attribute

参数名 类型 必填 描述 限制
code string 属性编码
value Object 属性值,取值类型为模型定义中对于的类型
timestamp Long 属性最后更新时间

响应样例

{
    "returnCode": 0,
    "result": {
        "createdBy": "admin@huazhu.com",
        "createdTime": 1508375969063,
        "tenantId": "3f1ff005-bb60-43ff-b9de-42ab796996d2",
        "id": "3c6a5612-37d0-414d-9747-ba08bf68b044",
        "attributeMap": {
            "ratedWeight": {
                "code": "ratedWeight",
                "value": 6,
                "timestamp": 1508918790926
            },
            "carLoc": {
                "code": "carLoc",
                "value": 41.3,
                "timestamp": 1508918790998
            },
            "hookHigh": {
                "code": "hookHigh",
                "value": 15,
                "timestamp": 1508918790928
            },
            "name": {
                "code": "name",
                "value": "12#",
                "timestamp": 1508918790893
            },
            "angle": {
                "code": "angle",
                "value": 129.5,
                "timestamp": 1508918790895
            },
            "range": {
                "code": "range",
                "value": 60,
                "timestamp": 1508918790992
            },
            "online": {
                "code": "online",
                "value": true,
                "timestamp": 1508918791067
            },
            "weight": {
                "code": "weight",
                "value": 0,
                "timestamp": 1508918791029
            },
            "location": {
                "code": "location",
                "value": "(1104.6,959.9)",
                "timestamp": 1508918790959
            },
            "perStrength": {
                "code": "perStrength",
                "value": 0,
                "timestamp": 1508918791031
            },
            "height": {
                "code": "height",
                "value": 31,
                "timestamp": 1508918790961
            }
        },
        "metadataMap": {},
        "deleted": false
    }
}