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
列出所有標籤群組。回傳分頁結果。
查詢參數
offsetinteger(可選)— 分頁偏移量,預設0limitinteger(可選)— 分頁限制,預設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
建立新的標籤群組。
請求主體
namestring(必填)— 群組名稱tagsstring[](必填)— 要包含的標籤名稱陣列colorstring(可選)— 群組顏色descriptionstring(可選)— 群組說明
回應
回傳新建立的標籤群組物件。
範例
POST /api/v2/tagGroup/update
更新現有的標籤群組。
請求主體
idstring(必填)— 要更新的標籤群組 IDnamestring(必填)— 群組名稱tagsstring[](必填)— 完整的標籤名稱陣列(會取代現有的)colorstring(可選)— 群組顏色descriptionstring(可選)— 群組說明
回應
回傳更新後的標籤群組物件。
範例
POST /api/v2/tagGroup/remove
刪除標籤群組。這只會移除群組本身 — 標籤不會被刪除。
請求主體
idstring(必填)— 要刪除的標籤群組 ID
回應
範例
POST /api/v2/tagGroup/addTags
將標籤加入現有的標籤群組。
請求主體
groupIdstring(必填)— 標籤群組 IDtagsstring[](必填)— 要加入的標籤名稱removeFromSourceboolean(可選)— 若為true,會在加入此群組前先從標籤原本所在的群組中移除
回應
回傳更新後的標籤群組物件。
範例
POST /api/v2/tagGroup/removeTags
從標籤群組中移除標籤。標籤本身不會被刪除,只是從群組中移除。
請求主體
groupIdstring(必填)— 標籤群組 IDtagsstring[](必填)— 要從群組中移除的標籤名稱
回應
回傳更新後的標籤群組物件。
範例
Tag Group 屬性
API 回傳的標籤群組包含以下屬性:
id
string
唯一標籤群組 ID
name
string
群組名稱
color
string
群組顏色
tags
string[]
群組中的標籤名稱陣列
description
string
群組說明
Last updated