Tag Group

Tag Group API 允許您建立、管理及整理 Eagle 資源庫中的標籤群組。

端點概覽

方法
端點
說明

GET

/api/v2/tagGroup/get

列出所有標籤群組

POST

/api/v2/tagGroup/create

建立新標籤群組

POST

/api/v2/tagGroup/update

更新標籤群組

POST

/api/v2/tagGroup/remove

刪除標籤群組

POST

/api/v2/tagGroup/addTags

將標籤加入群組

POST

/api/v2/tagGroup/removeTags

從群組移除標籤


GET /api/v2/tagGroup/get

列出所有標籤群組。回傳分頁結果。

查詢參數

  • offset integer(可選)— 分頁偏移量,預設 0

  • limit integer(可選)— 分頁限制,預設 50,最大 1000

回應

{
    "status": "success",
    "data": {
        "data": [
            {
                "id": "TG_001",
                "name": "Design Styles",
                "color": "blue",
                "tags": ["flat", "material", "skeuomorphic"],
                "description": "Visual design styles"
            }
        ],
        "total": 5,
        "offset": 0,
        "limit": 50
    }
}

範例


POST /api/v2/tagGroup/create

建立新的標籤群組。

請求主體

  • name string(必填)— 群組名稱

  • tags string[](必填)— 要包含的標籤名稱陣列

  • color string(可選)— 群組顏色

  • description string(可選)— 群組說明

回應

回傳新建立的標籤群組物件。

範例


POST /api/v2/tagGroup/update

更新現有的標籤群組。

請求主體

  • id string(必填)— 要更新的標籤群組 ID

  • name string(必填)— 群組名稱

  • tags string[](必填)— 完整的標籤名稱陣列(會取代現有的)

  • color string(可選)— 群組顏色

  • description string(可選)— 群組說明

回應

回傳更新後的標籤群組物件。

範例


POST /api/v2/tagGroup/remove

刪除標籤群組。這只會移除群組本身 — 標籤不會被刪除。

請求主體

  • id string(必填)— 要刪除的標籤群組 ID

回應

範例


POST /api/v2/tagGroup/addTags

將標籤加入現有的標籤群組。

請求主體

  • groupId string(必填)— 標籤群組 ID

  • tags string[](必填)— 要加入的標籤名稱

  • removeFromSource boolean(可選)— 若為 true,會在加入此群組前先從標籤原本所在的群組中移除

回應

回傳更新後的標籤群組物件。

範例


POST /api/v2/tagGroup/removeTags

從標籤群組中移除標籤。標籤本身不會被刪除,只是從群組中移除。

請求主體

  • groupId string(必填)— 標籤群組 ID

  • tags string[](必填)— 要從群組中移除的標籤名稱

回應

回傳更新後的標籤群組物件。

範例


Tag Group 屬性

API 回傳的標籤群組包含以下屬性:

屬性
類型
說明

id

string

唯一標籤群組 ID

name

string

群組名稱

color

string

群組顏色

tags

string[]

群組中的標籤名稱陣列

description

string

群組說明

Last updated