Browser Window Tags
This document describes the cloud APIs for browser window tags, covering tag list query, creation, editing, deletion, and update of window-tag binding relationships, including request format, authentication method, field aliases, and common error codes.
This document describes the cloud APIs for browser window tags that have been integrated in the first phase.
API Overview
- All requests use the
POSTmethod. - Request parameters are passed as JSON body.
- It is recommended to use
Authorization: Bearer {auth}to pass the login state. - Tag data is isolated by the currently logged-in user's
main_uid. - When binding a tag to a window, the resource ownership of both the window and the tag is verified.
Unified request headers:
Content-Type: application/json
Authorization: Bearer {auth}
Unified response:
{
"data": {},
"code": 0,
"msg": "success"
}
Query Window Tag List
POST /browserTag/list
Request Example
{
"keyword": ""
}
Parameter Details
| Name | Type | Required | Description |
|---|---|---|---|
keyword | string | no | Tag name keyword |
tagName | string | no | Compatibility field, also used for searching |
Permissions
Requires browser:list.
Create Window Tag
POST /browserTag/create
Request Example
{
"tagName": "Important Account",
"tagColor": "#ECC2F3"
}
Parameter Details
| Name | Type | Required | Description |
|---|---|---|---|
tagName | string | yes | Tag name |
tagColor | string | no | Tag color |
sortNum | number | no | Sort value |
Field aliases:
| Recommended Field | Compatibility Field |
|---|---|
tagName | tag_name |
tagColor | color |
sortNum | sort_num |
Permissions
Requires browser:update:single or browser:update:batch.
Edit Window Tag
POST /browserTag/update
Request Example
{
"id": 3,
"tagName": "Important Account - Renamed",
"tagColor": "#66CCFF"
}
Parameter Details
| Name | Type | Required | Description |
|---|---|---|---|
id | number/string | yes | Tag ID |
tagName | string | yes | Tag name |
tagColor | string | no | Tag color |
sortNum | number | no | Sort value |
Permissions
Requires browser:update:single or browser:update:batch.
Delete Window Tag
POST /browserTag/delete
Request Example
{
"id": 3
}
Parameter Details
| Name | Type | Required | Description |
|---|---|---|---|
id | number/string | no | Single tag ID |
ids | array | no | Batch tag IDs; not recommended for Local API based on testing |
At least one of id or ids must be provided.
Local API Testing Notes
When deleting a tag via the Local API, passing a single id succeeds; passing batch ids may return:
{
"code": 211,
"msg": "Missing ID parameter",
"data": {}
}
If compatibility with the Local API is required, it is recommended to delete tags one by one using id.
Permissions
Requires browser:update:single or browser:update:batch.
Update Window-Tag Binding Relationship
POST /browserTag/updateRelation
Incrementally add or remove window tags without affecting other tags that are not involved.
Request Example
Cloud API:
{
"browserId": 101,
"addTagIds": [3],
"removeTagIds": [5]
}
Local API recommended:
{
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"addTagIds": [3],
"removeTagIds": [5]
}
Parameter Details
| Name | Type | Required | Description |
|---|---|---|---|
browserId | number/string | yes | Window ID; recommended for cloud API |
uuid | string | no | Window UUID; recommended for Local API |
addTagIds | array | no | Tag IDs to be bound |
removeTagIds | array | no | Tag IDs to be unbound |
For the cloud API, pass browserId, browser_id, or id; for the Local API, you can pass uuid.
Field aliases:
| Recommended Field | Compatibility Field |
|---|---|
browserId | browser_id, id |
addTagIds | add_tag_ids |
removeTagIds | remove_tag_ids |
Local API Testing Notes
When updating window-tag bindings via the Local API, passing a numeric browserId may return code: 211, msg: "Invalid UUID". For Local API compatibility, it is recommended to pass uuid.
Permissions
Requires browser:update:single or browser:update:batch.
Common Errors
| code | msg | Description |
|---|---|---|
211 | tag name required | Missing tag name |
211 | id required | Missing tag ID |
211 | browser id required | Missing window ID |
211 | Invalid UUID | Local API failed to query details using numeric window ID or UUID is invalid |
403 | permission denied | Current user does not have permission |
404 | tag not found | Tag does not exist or does not belong to the current main account |
404 | browser config not found | Window does not exist or does not belong to the current main account |