更新設備鏡像

請求語法

PUT /mqtt/v1/devices/{device_id}/image/properties
Authorization:xxxx
Content-Type:application/json

{
    "state":{
        "desired":{
            "color": "green"
        },
        "reported":{
            "color": "red"
        }
    }
}

body說明

參數名稱 類型 說明
state object 必須且僅攜帶該參數

state說明

參數名稱 類型 說明
desired object 應用期望屬性,與reported至少存在一項
reported object 設備上報屬性,與desired至少存在一項

返回語法

{
    "request_id": "daa992aa-0080-47f4-810f-2aa5e3bb27fe",
    "code": "000000",
    "code_no": "onenet_common_success",
    "message": null,
    "data": {
        "state": {
            "desired": {
                "color": "green"
            },
            "reported": {
                "color": "red"
            }
        },
        "metadata": {
            "desired": {
                "color": {
                    "timestamp": 1565066884
                }
            },
            "reported": {
                "color": {
                    "timestamp": 1565066884
                }
            }
        },
        "version": 11,
        "timestamp": 1565066884
    }
}

其中:data 部分為設備鏡像更新確認數據

更多幫助

查看api返回錯誤碼

个搜索结果,搜索内容 “

    0 个搜索结果,搜索内容 “