日本熟妇hd丰满老熟妇,中文字幕一区二区三区在线不卡 ,亚洲成片在线观看,免费女同在线一区二区

ListThings

使用該接口,列出所有設備及其狀態。您也可以傳入ProductKey來過濾指定產品下的設備,或者同時傳入ProductKey和DeviceName返回某個具體設備。

請求語法

GET /2020-04-30/things?productkey=ProductKey&devicename=DeviceName HTTP/1.1
Cookie: Cookie
重要 其中,2020-04-30是邊緣端OpenAPI的版本號,請勿修改。

請求參數

參數名稱類型是否必選描述
ProductKeyString設備所屬產品唯一標識符。
DeviceNameString設備名。
CookieString調用CreateAuthCookie接口創建的認證Cookie。

返回語法

HTTP/1.1 StatusCode
Content-Type: application/json

Payload

返回參數

參數名稱類型描述
StatusCodeNumber接口狀態碼。返回200表示成功,返回其它狀態碼表示失敗。狀態碼詳情,請參見狀態碼
PayloadJSON已獲取的設備信息。

返回Payload格式如下所示。

{   
    "Data": {
      "Things": [{
        "ProductName": "string",
        "ProductKey": "string",
        "DeviceName": "string",
        "DriverId": "string",
        "DriverName": "string",
        "Tags": [{"string": "string"}],
        "Status": "Inactivated|Failed|Online|Offline",
        "Connected": true|false,
        "ConnectTime": "string"
      }]
    }
  }

完整示例

$ curl -i -b token.cookie -k https://127.0.0.1:9999/2020-04-30/things

HTTP/1.1 200 OK
Server: openresty/1.13.6.2
Date: Wed, 22 Apr 2020 15:18:16 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive

{"Data":{"Things":[{"DriverName":"LightSensor","Status":"Online","NickName":"","DriverId":"e0bb1b48964e4519b4a52f9b****1dd3","ProductKey":"a1t****n42K","Connected":true,"ConnectTime":"1587526047107","DeviceName":"GjCb9LKXgcKXel******","ProductName":"","Tags":[]}]}}