Browser Window Tags
This document describes the cloud interface for browser window tags, covering tag list query, creation, editing, deletion, and updating window-tag binding relationships, including request formats, authentication methods, field aliases, and common error codes.
Tag Local API Documentation
Query Tag List
Title
Query Tag List
Brief Description
Query page of window tag list with support for searching by tag name.
Request URL
http://127.0.0.1:54345/browserTag/list
Request Method
POST
Header
| Parameter | Required | Example | Description |
|---|---|---|---|
Content-Type | Yes | application/json | Request body format |
X-Cos-Local-Token | Yes | YOUR_LOCAL_TOKEN | Local access token, viewable in the client under 'Settings - Local API' |
Request Body Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
page | No | number | Page number, default 1 |
page_size | No | number | Number per page, default 10000, compatible with pageSize |
keyword / tag_name | No | string | Tag name search, compatible with tagName / name |
Success Response Example
{
"code": 0,
"msg": "success",
"data": {
"list": [
{
"id": 3001,
"tag_name": "重点账号",
"tagName": "重点账号",
"color": "#409EFF",
"sort_num": 0
}
],
"total": 1
}
}
Success Response Parameters
| Parameter | Type | Description |
|---|---|---|
code | number | 0 indicates success |
msg | string | Response message |
data.list | array | Tag list |
data.list[].id | number/string | Tag ID |
data.list[].tag_name | string | Tag name |
data.list[].tagName | string | Tag name |
data.list[].color | string | Tag color |
data.list[].sort_num | number | Sort value |
data.total | number | Total count |
Notes
The interface only listens on localhost 127.0.0.1. Please open and log in to the client before calling.
Create Tag
Title
Create Tag
Brief Description
Create a new window tag.
Request URL
http://127.0.0.1:54345/browserTag/create
Request Method
POST
Header
| Parameter | Required | Example | Description |
|---|---|---|---|
Content-Type | Yes | application/json | Request body format |
X-Cos-Local-Token | Yes | YOUR_LOCAL_TOKEN | Local access token, viewable in the client under 'Settings - Local API' |
Request Body Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
tag_name | Yes | string | Tag name, compatible with tagName / name |
color / tag_color | No | string | Tag color, e.g. #409EFF |
sort_num | No | number | Sort value, default 0, compatible with sortNum |
Success Response Example
{
"code": 0,
"msg": "success",
"data": {
"id": 3001,
"tag_name": "重点账号"
}
}
Success Response Parameters
| Parameter | Type | Description |
|---|---|---|
code | number | 0 indicates success |
msg | string | Response message |
data.id | number/string | Newly created tag ID |
data.tag_name / data.tagName | string | Tag name |
Notes
It is recommended to use hexadecimal color values for tag color, e.g. #409EFF. The immediate response from the create endpoint typically only returns the id and tag name; color and sort order can be queried via /browserTag/list.
Edit Tag
Title
Edit Tag
Brief Description
Modify the name, color, or sort order of a specified tag.
Request URL
http://127.0.0.1:54345/browserTag/update
Request Method
POST
Header
| Parameter | Required | Example | Description |
|---|---|---|---|
Content-Type | Yes | application/json | Request body format |
X-Cos-Local-Token | Yes | YOUR_LOCAL_TOKEN | Local access token, viewable in the client under 'Settings - Local API' |
Request Body Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
id | Yes | number/string | Tag ID |
tag_name | Yes | string | Tag name, compatible with tagName / name |
color / tag_color | No | string | Tag color |
sort_num | No | number | Sort value, default 0, compatible with sortNum |
Success Response Example
{
"code": 0,
"msg": "success",
"data": {
"id": 3001,
"tag_name": "重点账号"
}
}
Success Response Parameters
| Parameter | Type | Description |
|---|---|---|
code | number | 0 indicates success |
msg | string | Response message |
data.id | number/string | Tag ID |
data.tag_name / data.tagName | string | Modified tag name |
Notes
Before editing a tag, you can call /browserTag/list to obtain the tag ID. The immediate response from the edit endpoint typically only returns the id and tag name; color and sort order can be queried via /browserTag/list.
Delete Tag
Title
Delete Tag
Brief Description
Delete one or multiple window tags.
Request URL
http://127.0.0.1:54345/browserTag/delete
Request Method
POST
Header
| Parameter | Required | Example | Description |
|---|---|---|---|
Content-Type | Yes | application/json | Request body format |
X-Cos-Local-Token | Yes | YOUR_LOCAL_TOKEN | Local access token, viewable in the client under 'Settings - Local API' |
Request Body Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
id | Yes, choose one with ids | number/string | Single tag ID |
ids | Yes, choose one with id | array/string | Multiple tag IDs |
Success Response Example
{
"code": 0,
"msg": "success",
"data": {
"ids": [3001, 3002],
"results": [
{
"code": 0,
"msg": "success"
}
]
}
}
Success Response Parameters
| Parameter | Type | Description |
|---|---|---|
code | number | 0 indicates success |
msg | string | Response message |
data.ids | array | Deleted tag IDs |
data.results | array | Server result for each tag deletion request |
data.results[].code | number | Individual deletion result status code |
data.results[].msg | string | Individual deletion result message |
Notes
When deleting multiple tags, the local API calls the server-side delete interface for each tag one by one; if any single deletion fails, it will directly return the failure result.
Update Window Tag Relationship
Title
Update Window Tag Relationship
Brief Description
Overwrite, add, or remove tag binding relationships for a specified window.
Request URL
http://127.0.0.1:54345/browserTag/updateRelation
Request Method
POST
Header
| Parameter | Required | Example | Description |
|---|---|---|---|
Content-Type | Yes | application/json | Request body format |
X-Cos-Local-Token | Yes | YOUR_LOCAL_TOKEN | Local access token, viewable in the client under 'Settings - Local API' |
Request Body Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
uuid | Yes, choose one with browser_id | string | Window UUID, can also pass config_uuid. Obtain from the uuid returned by /browser/list |
browser_id / id | Yes, choose one with uuid | number/string | Window numeric ID, compatible with browserId. It is recommended to pass uuid first |
tag_ids | No | array/string | Recommended usage: directly overwrite the window tag ID list; an empty array means clear all. Compatible with tagIds |
action | No | string | Passing bind means incrementally bind the tag_ids, passing unbind means incrementally unbind the tag_ids |
add_tag_ids | No | array/string | Legacy compatible usage: tag IDs to add bindings, compatible with addTagIds |
remove_tag_ids | No | array/string | Legacy compatible usage: tag IDs to remove bindings, compatible with removeTagIds |
current_platform | No | string | Current client platform, defaults to current client platform, compatible with currentPlatform |
Success Response Example
{
"code": 0,
"msg": "success",
"data": {
"id": 10001,
"uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"tag_ids": [3001, 3003],
"tagIds": [3001, 3003]
}
}
Success Response Parameters
| Parameter | Type | Description |
|---|---|---|
code | number | 0 indicates success |
msg | string | Response message |
data.id | number/string | Window ID |
data.uuid | string | Window UUID |
data.tag_ids / data.tagIds | array | Updated list of tag IDs |
Notes
Before calling, you can obtain the window UUID via /browser/list and obtain tag IDs via /browserTag/list. When directly passing tag_ids, it will overwrite the original tag relationships; when passing action: "bind" / "unbind" or the legacy fields addTagIds / removeTagIds, it will handle them incrementally.