Add Device

Last Updated on : 2024-06-29 01:03:18download

Add devices to the specified group based on the group ID.

API address

PUT: /v2.0/cloud/thing/group/{group_id}/devices

Request parameter

Parameter nameTypeINRequiredDescription
group_idLongpathtrueThe ID of the specified group.

Description of body

Parameter nameTypeINRequiredDescription
space_idStringbodytrueThe ID of the space to which the specified group belongs.
device_idsStringbodytrueThe list of up to 20 device IDs, separated with commas (,).

Return parameter

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

Request example

PUT: /v2.0/cloud/thing/group/12856***/devices
{
  "space_id": "2512****",
  "device_ids": "vdevo163815*****,529739391******"
}

Return example

{
    "tid": "a14a4f23b32211edaa2fba12a1143bd9",
    "result": true,
    "t": 1677119683579,
    "success": true
}

Error code

For more information, see error code.

Limits on API Request Frequency

For more information, see Limits on API Request Frequency.