洞察系統
選擇聊天室要載入哪些部門標籤系統供代理洞察使用;此開關不會改動資料表授權或 ACL。
GET
路由範本
/private/chatrooms/setting/custom-table-tags/{chatroom_id}用途
依部門標籤整理聊天室已獲授權的資料表,並顯示各系統是否已開啟載入。
適用時機
在顯示代理洞察的系統開關與可用資料表前使用。
實際掛載路徑
- 完整路由
/private/chatrooms/setting/custom-table-tags/{chatroom_id}
範圍
| 範圍 | 是否提供 | 驗證與權限 |
|---|---|---|
| 完整路由 | 可使用 | ChatRoomManagerAccessRequired |
參數
| 欄位 | 位置 | 型別 | 必填 | 說明 |
|---|---|---|---|---|
chatroom_id | path | uuid | 是 | 要查詢的聊天室 UUID。 |
回應結構
InsightSystemsResponse| 欄位 | 型別 | 必填 | 說明 |
|---|---|---|---|
systems | InsightSystemGroup[] | 是 | Sorted by (department_name, name) |
untagged | InsightTagTableInfo[] | 是 | Granted dept tables with no system tag — always load, not flippable |
範例
取得聊天室洞察系統
請求
{
"pathParams": {
"chatroom_id": "11111111-1111-4111-8111-111111111111"
}
}回應200
{
"systems": [
{
"tag_id": "33333333-3333-4333-8333-333333333333",
"name": "訂單系統",
"description": "訂單與出貨資料",
"color": "#2563EB",
"department_id": "22222222-2222-4222-8222-222222222222",
"department_name": "營運部",
"enabled": true,
"tables": [
{
"table_id": "44444444-4444-4444-8444-444444444444",
"name": "訂單",
"description": "客戶訂單",
"audiences": [
"internal"
]
}
]
}
],
"untagged": []
}錯誤
| 狀態 | 發生條件 | 錯誤本文 |
|---|---|---|
| 403 | 呼叫者不是聊天室管理者。 | |
PUT
路由範本
/private/chatrooms/setting/custom-table-tags/{chatroom_id}用途
以 tag_ids 完整取代聊天室已開啟載入的部門標籤系統。
適用時機
聊天室管理者要開啟、關閉或重設代理洞察來源時使用。
實際掛載路徑
- 完整路由
/private/chatrooms/setting/custom-table-tags/{chatroom_id}
範圍
| 範圍 | 是否提供 | 驗證與權限 |
|---|---|---|
| 完整路由 | 可使用 | ChatRoomManagerAccessRequired |
參數
| 欄位 | 位置 | 型別 | 必填 | 說明 |
|---|---|---|---|---|
chatroom_id | path | uuid | 是 | 要更新的聊天室 UUID。 |
請求結構
InsightSystemSelectionPayload| 欄位 | 型別 | 必填 | 說明 |
|---|---|---|---|
tag_ids | string[] | 是 | Dept-scope tag ids to enable. Deduplicated. Empty list disables all systems. |
回應結構
InsightSystemsResponse| 欄位 | 型別 | 必填 | 說明 |
|---|---|---|---|
systems | InsightSystemGroup[] | 是 | Sorted by (department_name, name) |
untagged | InsightTagTableInfo[] | 是 | Granted dept tables with no system tag — always load, not flippable |
範例
只開啟訂單系統
請求
{
"pathParams": {
"chatroom_id": "11111111-1111-4111-8111-111111111111"
},
"body": {
"tag_ids": [
"33333333-3333-4333-8333-333333333333"
]
}
}回應200
{
"systems": [
{
"tag_id": "33333333-3333-4333-8333-333333333333",
"name": "訂單系統",
"description": "訂單與出貨資料",
"color": "#2563EB",
"department_id": "22222222-2222-4222-8222-222222222222",
"department_name": "營運部",
"enabled": true,
"tables": [
{
"table_id": "44444444-4444-4444-8444-444444444444",
"name": "訂單",
"description": "客戶訂單",
"audiences": [
"internal"
]
}
]
}
],
"untagged": []
}錯誤
| 狀態 | 發生條件 | 錯誤本文 |
|---|---|---|
| 400 | tag_ids 含有未附在任何已授權給此聊天室的部門資料表上之標籤。 | |
| 403 | 呼叫者不是聊天室管理者。 | |
Last updated on