Last Updated on : 2024-06-29 02:13:16download
Add devices to the specified group based on the group ID.
PUT: /v2.1/cloud/thing/group/{group_id}/devices
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
group_id | Long | path | true | The group ID. |
Description of body
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
device_ids | List | body | true | The list of up to 20 device IDs. |
Parameter name | Type | Description |
---|---|---|
result | JsonObject | The returned result of the specified group. |
success | Boolean | Indicates whether the API is called successfully. Valid values:
|
t | Long | The timestamp. |
tid | String | The link ID. |
Description of result
Parameter name | Type | Description |
---|---|---|
group_id | Long | The group ID. |
group_name | String | The name of the specified group. |
space_id | String | The ID of the space to which the specified group belongs. |
icon_url | String | The icon of the specified group. A product picture is used by default. |
create_time | Long | The time when a group is created. |
update_time | Long | The time when a group is updated. |
task_id | String | The task ID. |
task_type | Integer | The type of tasks. Valid values:
|
task_expire_second | Long | The number of seconds after which the task will expire. Do not modify the relationship between the group and the devices until the task is completed. |
PUT: /v2.1/cloud/thing/group/13930***/devices
{
"device_ids": [
"vdevo17059988490****",
"vdevo17059988536****"
]
}
{
"tid": "d888516e021a11efbe7a366d87620758",
"result": {
"icon_url": "https://images.tuyacn.com/smart/solution/142004/673976648441****.png",
"create_time": 1713944884506,
"group_name": "testUpdateGroup****",
"task_id": "178306156754218****",
"update_time": 1713948182799,
"group_id": "1393****",
"task_expire_second": 14,
"task_type": 2,
"space_id": "16702****"
},
"t": 1713949980077,
"success": true
}
For more information, see error code.
For more information, see Limits on API Request Frequency.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback