ListThings

Updated at:

This operation lists devices and their statuses.

Request syntax

GET /2019-09-30/things HTTP/1.1
Cookie: Cookie

Request parameters

Parameter Name Type Required Description
Cookie String Yes The authentication cookie created by the CreateAuthCookie operation.

Response syntax

HTTP/1.1 StatusCode
Content-Type: application/json

Payload

Response parameters

Parameter Name Type Description
StatusCode Number The status code of the operation. A value of 200 indicates a successful call. Other values indicate a failed call. For more information, see Status codes.
Payload JSON The retrieved device information.

The following shows the format of the Payload parameter.

{
    "Code": number,
    "Message": "success|reason for failure",
    "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"
      }]
    }
  }

Complete example

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

HTTP/1.1 200 OK
Server: openresty/1.13.6.2
Date: Thu, 31 Oct 2019 08:23:21 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive

{"Data":{"Things":[{"DriverName":"e0bb1b48964e4519b4a52f9b719e1***","ConnectTime":"1572510191943","DeviceName":"GjCb9LKXgcKXeluG****","DriverId":"","ProductKey":"","Connected":true,"ProductName":"","Tags":[],"Status":"Online"}]},"Code":200,"Message":"success"}