Query Group

Last Updated on : 2024-06-28 23:43:46download

Get the details of the specified group based on the group ID.

API address

GET: /v2.0/cloud/thing/group/{group_id}

Request parameter

Parameter nameTypeINRequiredDescription
group_idLongpathtrueThe ID of the specified group.

Return parameter

Parameter nameTypeDescription
resultJSONThe returned result of the specified group.
successBooleanIndicates whether the operation is successful. Valid values:
  • true: The operation succeeded.
  • false: The operation failed.
tLongThe timestamp.
tidStringThe link ID.

Description of result

Parameter nameTypeDescription
idLongThe ID of the specified group.
nameStringThe name of the specified group.
pvStringThe version number of the specified MQTT protocol.
timeLongThe time when a group is created.
typeIntegerThe type of the specified group. Valid values:
  • 0: Devices that can be directly connected to the cloud.
  • 1:Devices that cannot be directly connected to the cloud, but can only be connected to the cloud through gateways.
uidStringThe ID of a user in the specified group.
group_typeIntegerThe protocol type applicable to the specified group. Valid values:
  • 0: Wi-Fi
  • 1: Bluetooth low energy
  • 2: Zigbee
  • 3: Bluetooth mesh
icon_urlStringThe picture of the specified group. A product picture is used by default. Currently, you cannot change the product picture.
local_keyStringThe localKey used for the MQTT connection.
owner_idStringThe ID of the space to which the specified group belongs.
product_idStringThe ID of a product in the group.

Request example

GET: /v2.0/cloud/thing/group/1285***7

Return example

{
  "result": {
    "category": "",
    "dev_id": "",
    "device_num": 1,
    "dp_name": {
      "1": "",
      "9": ""
    },
    "dps": {
      "1": false,
      "9": 0
    },
    "group_key": "",
    "group_type": 0,
    "iconUrl": "https://images.tuyacn.com/smart/solution/15001/66ba22c327bfbf3d_co***.png",
    "id": "1285****"
    "local_key": "360f7d71088c***",
    "name": "Test****",
    "owner_id": "251*****",
    "product_id": "fqi9xqld***",
    "pv": "2.2",
    "standard": false,
    "time": 1677117998,
    "type": 0,
    "uid": "ay159910362*****"
  },
  "success": true,
  "t": 1677118783681,
  "tid": "88f0c69eb32011edaa2fba12a1143bd9"
}

Error code

For more information, see error code.

Limits on API Request Frequency

For more information, see Limits on API Request Frequency.