Browser Group API
This document demonstrates request examples and response data structures for the Browser Group API, used to retrieve the list of browser groups for team members, including pagination parameters and group field descriptions.
This document describes the Browser Group cloud API integrated in the first phase.
API Description
- All requests use the
POSTmethod. - Request parameters are passed in the JSON body.
- It is recommended to use
Authorization: Bearer {auth}to pass the authentication state. - Group data is isolated by the
main_uidof the currently logged-in user. - Employee accounts must have the corresponding group permissions.
Unified request headers:
Content-Type: application/json
Authorization: Bearer {auth}
Unified response:
{
"data": {},
"code": 0,
"msg": "success"
}
Query Group List
POST /group/list
Request Example
{
"page": 0,
"pageSize": 100,
"keyword": ""
}
Parameter Details
| Name | Type | Required | Description |
|---|---|---|---|
page | number | No | Page number, starting from 0 |
pageSize | number | No | Number of items per page |
keyword | string | No | Group name keyword |
all | boolean/string | No | Passing true or all will use a larger page size according to interface compatibility logic |
Permission
Requires group:list.
Add Group
POST /group/add
Request Example
{
"groupName": "Amazon Store",
"sortNum": 0,
"parentCode": 0
}
Parameter Details
| Name | Type | Required | Description |
|---|---|---|---|
groupName | string | Yes | Group name |
sortNum | number | No | Sort value, default 0 |
parentCode | number/string | No | Parent group ID, usually pass 0 |
ownerUid | number | No | Employee UID of the group owner, defaults to the current user if not provided |
Field aliases:
| Recommended Field | Compatible Field |
|---|---|
groupName | group_name |
sortNum | sort_num |
parentCode | parent_id |
ownerUid | owner_uid |
Permission
Requires group:add.
Edit Group
POST /group/edit
Request Example
{
"id": 12,
"groupName": "Amazon Store - Renamed",
"sortNum": 10
}
Parameter Details
| Name | Type | Required | Description |
|---|---|---|---|
id | number/string | Yes | Group ID |
groupName | string | No | Group name |
sortNum | number | No | Sort value |
parentCode | number/string | No | Parent group ID |
ownerUid | number | No | Owner employee UID |
environmentPassword | string | Conditionally required | Required when changing ownership and environment password verification is enabled |
Permission
Requires group:edit.
Delete Group
POST /group/delete
Request Example
{
"id": 12
}
Parameter Details
| Name | Type | Required | Description |
|---|---|---|---|
id | number/string | Yes | Group ID |
Notes:
- The group must belong to the current
main_uid. - If the group still contains windows, the backend will reject or restrict the deletion based on existing business rules.
Permission
Requires group:delete.
Query Group Details
POST /group/detail
Request Example
{
"id": 12
}
Parameter Details
| Name | Type | Required | Description |
|---|---|---|---|
id | number/string | Yes | Group ID |
Local API Note
When querying group details through the Local API, the interface may return code: 0 but data.id may not match the requested id. If compatibility with the Local API is required, it is recommended to call /group/list first and then filter by id. When using /group/detail, the caller should verify that the returned data.id matches the requested ID.
Permission
Requires group:list.
Common Errors
| code | msg | Description |
|---|---|---|
211 | id required | Missing group ID |
211 | group name required | Missing group name |
403 | permission denied | Current user has no permission |
404 | group not found | Group does not exist or does not belong to the current primary account |