Authentication
These endpoints manage device groups for a signed-in account. Include the user's login credential in the token request header. An Access Key and OpenAPI signature cannot replace this credential.
| Header | Required | Description |
|---|---|---|
| token | Yes | User login credential |
| Content-Type | For POST | application/json |
For OpenAPI queries, see List Device Groups and List Devices by Group. Group write operations currently require the login-based endpoints on this page.
List Personal Groups and Devices
GET /vcpcloud/api/userPadGroup/getUserPadListByUserId
Returns personal groups and devices for the signed-in account. No request body is required. This endpoint does not support switching team views with teamId.
Common response fields
| Field | Type | Description |
|---|---|---|
| code | Integer | Status code; 200 for success |
| msg | String | Result message |
| ts | Long | Response timestamp in milliseconds |
| data | Object[] | Device groups |
| data[].groupId | Integer | Group ID |
| data[].groupName | String | Group name |
| data[].groupPadCount | Integer | Number of devices in the group |
| data[].userPads | Object[] | Devices in the group |
| data[].userPads[].equipmentId | Long | Device ID |
| data[].userPads[].padCode | String | Cloud phone code |
| data[].userPads[].padName | String | Cloud phone name |
Manage Device Groups
POST /vcpcloud/api/userPadGroup/operateUserPadGroup
Select an operation with operateType. Send a JSON request body.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| operateType | Integer | Yes | Operation type; see below |
| teamId | Long | For team operations | Current team ID |
| oldGroupId | Integer | Operations 0 and 2 | Group to delete or update |
| groupName | String | Operations 1 and 2 | Group name, 1–15 characters |
| equipmentList | Integer[] | Operations 3, 4 and 5 | Device IDs |
| newGroupId | Integer | Operation 3 | Destination group ID |
| sort | Integer | No | Sort value for creation or updates |
| groupNamePrefix | String | Operation 4 | Name prefix for new groups |
| splitType | Integer | Operation 4 | 1: devices per group; 2: group count |
| eachGroupDeviceCount | Integer | When splitType=1 | Devices per group; positive integer |
| totalGroupCount | Integer | When splitType=2 | Total groups; positive integer |
Operation Types
| operateType | Operation | Description |
|---|---|---|
| 0 | Delete a group | Deletes a custom group and retains devices |
| 1 | Create a group | Creates an empty group |
| 2 | Update a group | Changes the name and sort value |
| 3 | Move devices | Moves selected devices to an existing group |
| 4 | Create groups and move devices | Splits devices by group size or count |
| 5 | Restore team classification | Team members only; restores selected devices |
Constraints
- Group names, including complete names generated in bulk, must not exceed 15 characters.
totalGroupCountmust not exceed the number of selected devices.- Personal default and hourly groups cannot be deleted. Deleting a personal custom group moves its devices to the default group.
- Only devices that the account may organize can be moved. Magic Box devices do not support group changes, and the hourly group cannot be a destination.
- Omit
teamIdfor personal groups. Team owners use their own groups; members use their personal groups within the selected team. - A member's group changes affect only their own classification, without changing device ownership or access. Inherited team groups cannot be renamed or deleted.
- Each team member can create up to 1000 personal groups per team and process up to 10000 devices per request.
- Operation 5 is available only to team members and requires both
teamIdandequipmentList. Deleting a member's custom group restores its devices to the default team classification.
Request Examples
Send each body below to this endpoint with the required headers. Replace the sample IDs with valid IDs from the current account and selected team view.
Create a group
{
"operateType": 1,
"groupName": "Test group",
"sort": 1
}
Update the name and sort value
{
"operateType": 2,
"oldGroupId": 100001,
"groupName": "Operations",
"sort": 2
}
Move devices to an existing group
{
"operateType": 3,
"newGroupId": 100001,
"equipmentList": [100001, 100002]
}
Create groups by device count per group
{
"operateType": 4,
"groupNamePrefix": "Test",
"splitType": 1,
"eachGroupDeviceCount": 2,
"equipmentList": [100001, 100002, 100003, 100004]
}
Create a specified number of groups
{
"operateType": 4,
"groupNamePrefix": "Test",
"splitType": 2,
"totalGroupCount": 2,
"equipmentList": [100001, 100002, 100003, 100004]
}
Delete a group
{
"operateType": 0,
"oldGroupId": 100001
}
Restore the default classification as a team member
{
"operateType": 5,
"teamId": 100001,
"equipmentList": [100001, 100002]
}
Response
| Field | Type | Description |
|---|---|---|
| code | Integer | Status code; 200 for success |
| msg | String | Result message |
| ts | Long | Response timestamp in milliseconds |
{
"code": 200,
"msg": "success",
"ts": 1800000000000
}
A successful response does not include newly created group IDs. Refresh the group list for the current account view after the operation.
Common Error Codes
| code | Description |
|---|---|
| 300 | Operation failed |
| 400 | Invalid parameters or quantity limit exceeded |
| 1018 | Personal group name is empty or too long |
| 1040 | Invalid name length for a member's team group |
| 1057 | Missing destination group ID |
| 1058 | Group does not exist or is unavailable to the account |
| 1060 | Magic Box devices do not support group changes |
| 1085 | Group cannot be deleted or does not exist |
| 1086 | Moving devices into the hourly group is not allowed |
| 3329 | No permission to access the team or selected devices |