REST API
Stitch 工作區操作的 REST API 端點參考。
v2alpha REST API 驅動 Stitch 工作區管理、程式碼庫優先事項、洞察與解決方案等功能。
透過
stitch api <path>呼叫端點前,需先在電腦上執行一次stitch enable loop啟用工作區功能。
從 CLI 呼叫 API
stitch api workspaces
stitch api workspaces/<workspace-id>/goals
stitch api -X POST workspaces/<workspace-id>/insights:generate --json '{}'
端點
clientNotices.fetch
擷取用戶端的動態公告、警示橫幅、服務中斷通知與免責聲明。
stitch api -X POST clientNotices:fetch
contexts.parseMcpJson
將 MCP JSON 設定解析為正規化的工具供應商設定。
stitch api -X POST contexts:parseMcpJson
feedback.submit
提交產品意見回饋(例如來自 Stitch CLI)。
stitch api -X POST feedback:submit
media.upload
建立檔案。
stitch api -X POST workspaces/{workspace}/files
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
parent (必填) | path | string | 必填。要在其中建立檔案中繼資料的父項工作區。格式:workspaces/{workspace}。 |
organizations.get
依資源名稱取得單一組織。
stitch api organizations/{organization}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要擷取的組織資源名稱。格式:organizations/{organization} |
organizations.list
列出組織。
stitch api organizations
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
filter | query | string | 選填。用來篩選組織的 CEL 篩選運算式。 |
pageSize | query | integer | 選填。要傳回的組織數量上限。 |
pageToken | query | string | 選填。先前 ListOrganizations 呼叫所傳回的頁面權杖。 |
tos.accept
記錄已驗證使用者已接受指定的 ToS 版本。
stitch api -X POST tos:accept
tos.check
檢查已驗證使用者是否已接受指定的 ToS 版本。
stitch api tos:check
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
user | query | string | 選填。使用者的選填資源名稱。預設為已驗證使用者(「users/me」)。 |
version | query | string | 選填。要檢查的 ToS 版本(選填,例如 "2026-03-18")。若省略,伺服器會以後端設定的目前生效 ToS 版本進行檢查。 |
users.getPreferences
取得使用者的偏好設定。
stitch api users/{user}/preferences
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要擷取的使用者偏好設定資源名稱。格式:users/{user}/preferences 或 users/me/preferences |
users.updatePreferences
更新使用者的偏好設定。
stitch api -X PATCH users/{user}/preferences
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 識別碼。使用者偏好設定的資源名稱。格式:users/{user}/preferences 或 users/me/preferences |
updateMask | query | string | 選填。要更新的欄位清單。若為空或包含「*」,則會更新所有可變更欄位。 |
users.tos.accept
記錄已驗證使用者已接受指定的 ToS 版本。
stitch api -X POST users/{user}/tos:accept
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
user (必填) | path | string | 選填。使用者的選填資源名稱。預設為已驗證使用者(「users/me」)。 |
users.tos.check
檢查已驗證使用者是否已接受指定的 ToS 版本。
stitch api users/{user}/tos:check
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
user (必填) | path | string | 選填。使用者的選填資源名稱。預設為已驗證使用者(「users/me」)。 |
version | query | string | 選填。要檢查的 ToS 版本(選填,例如 "2026-03-18")。若省略,伺服器會以後端設定的目前生效 ToS 版本進行檢查。 |
completeOAuth
完成 OAuth 2.0 流程,將授權碼兌換成權杖並安全地儲存。這是一種無狀態的自訂方法(AIP-136),因為工作區與供應商身分會安全地封裝在 state_token 內,並從中解析,而非透過資源路徑或父項集合。
stitch api -X POST v2alpha:completeOAuth
workspaces.addRepository
將儲存庫新增至工作區。
stitch api -X POST workspaces/{workspace}:addRepository
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要加入儲存庫的工作區資源名稱。格式:workspaces/{workspace} |
workspaces.addUser
將使用者新增至工作區。
stitch api -X POST workspaces/{workspace}:addUser
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要加入使用者的工作區資源名稱。格式:workspaces/{workspace} |
workspaces.create
建立新的工作區。
stitch api -X POST workspaces
workspaces.createToolkitConnectLink
建立連接連結,以在工作區中驗證工具組。
stitch api -X POST workspaces/{workspace}:createToolkitConnectLink
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
parent (必填) | path | string | 必填。要為其建立工具組連接連結的父項工作區。格式:workspaces/{workspace}。 |
workspaces.delete
依資源名稱刪除工作區。
stitch api -X DELETE workspaces/{workspace}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要刪除的工作區資源名稱。格式:workspaces/{workspace} |
workspaces.get
依資源名稱取得單一工作區。
stitch api workspaces/{workspace}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要擷取的工作區資源名稱。格式:workspaces/{workspace} |
workspaces.getMarketRadarCheckpoint
取得競爭市場分析的詳細資料檢查點。
stitch api workspaces/{workspace}/marketRadarCheckpoint
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。市場雷達檢查點的資源名稱。格式:workspaces/{workspace}/marketRadarCheckpoint |
workspaces.getUserNotificationSettings
取得呼叫使用者在工作區中的通知設定。
stitch api workspaces/{workspace}/userNotificationSettings
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。使用者通知設定的資源名稱。格式:workspaces/{workspace}/userNotificationSettings |
workspaces.getWorkspaceNotificationSettings
取得工作區層級的通知設定。
stitch api workspaces/{workspace}/workspaceNotificationSettings
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。工作區通知設定的資源名稱。格式:workspaces/{workspace}/workspaceNotificationSettings |
workspaces.list
列出工作區。
stitch api workspaces
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
filter | query | string | 選填。用來篩選工作區的 CEL 篩選運算式。 |
pageSize | query | integer | 選填。要傳回的工作區數量上限。 |
pageToken | query | string | 選填。先前 ListWorkspaces 呼叫所傳回的頁面權杖。 |
workspaces.patch
更新現有的工作區。
stitch api -X PATCH workspaces/{workspace}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 識別碼。資源名稱。格式:workspaces/{workspace} |
updateMask | query | string | 選填。要更新的欄位清單。 |
workspaces.removeRepository
從工作區移除儲存庫。
stitch api -X POST workspaces/{workspace}:removeRepository
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要從中移除儲存庫的工作區資源名稱。格式:workspaces/{workspace} |
workspaces.removeUser
從工作區移除使用者。
stitch api -X POST workspaces/{workspace}:removeUser
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要從中移除使用者的工作區資源名稱。格式:workspaces/{workspace} |
workspaces.updateUserNotificationSettings
更新呼叫使用者在工作區中的通知設定。
stitch api -X PATCH workspaces/{workspace}/userNotificationSettings
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 識別碼。資源名稱。格式:workspaces/{workspace}/userNotificationSettings |
updateMask | query | string | 選填。要更新的欄位清單。 |
workspaces.updateWorkspaceNotificationSettings
更新工作區層級的通知設定。
stitch api -X PATCH workspaces/{workspace}/workspaceNotificationSettings
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 識別碼。資源名稱。格式:workspaces/{workspace}/workspaceNotificationSettings |
updateMask | query | string | 選填。要更新的欄位清單。 |
workspaces.assessments.delete
依名稱刪除評估。
stitch api -X DELETE workspaces/{workspace}/assessments/{assessment}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要刪除的評估資源名稱。格式:workspaces/{workspace}/assessments/{assessment} |
workspaces.assessments.generate
為一組洞察產生評估。
stitch api -X POST workspaces/{workspace}/assessments:generate
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
parent (必填) | path | string | 必填。父項工作區。格式:workspaces/{workspace} |
workspaces.assessments.get
依名稱取得單一評估。
stitch api workspaces/{workspace}/assessments/{assessment}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要取得的評估資源名稱。格式:workspaces/{workspace}/assessments/{assessment} |
workspaces.assessments.list
列出工作區中的評估。
stitch api workspaces/{workspace}/assessments
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
filter | query | string | 選填。用來篩選評估的 AIP-160 篩選運算式。支援的欄位:insights。例如 insights:"workspaces/123/insights/456" |
pageSize | query | integer | 選填。要傳回的評估數量上限。服務傳回的數量可能少於此值。若未指定,最多會傳回 20 筆評估。上限為 100;超過 100 的值會強制轉為 100。 |
pageToken | query | string | 選填。先前 ListAssessments 呼叫所傳回的頁面權杖。提供此權杖即可擷取下一頁。 |
parent (必填) | path | string | 必填。要列出評估的父項工作區。格式:workspaces/{workspace} |
workspaces.assessments.patch
更新評估。
stitch api -X PATCH workspaces/{workspace}/assessments/{assessment}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 識別碼。評估的完整資源名稱。格式:workspaces/{workspace}/assessments/{assessment} |
updateMask | query | string | 選填。指定要更新哪些欄位的遮罩。 |
workspaces.contexts.create
將新的脈絡匯入工作區。
stitch api -X POST workspaces/{workspace}/contexts
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
parent (必填) | path | string | 必填。要在其中建立脈絡的父項工作區。格式:workspaces/{workspace}。 |
workspaces.contexts.delete
刪除工作區中的脈絡。
stitch api -X DELETE workspaces/{workspace}/contexts/{context}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要刪除的脈絡資源名稱。格式:workspaces/{workspace}/contexts/{context}。 |
workspaces.contexts.get
依 ID 取得脈絡。
stitch api workspaces/{workspace}/contexts/{context}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要擷取的脈絡資源名稱。格式:workspaces/{workspace}/contexts/{context}。 |
workspaces.contexts.initiateOAuth
為工具供應商啟動 OAuth 2.0 流程。傳回呼叫端應將使用者重新導向的授權 URL。
stitch api -X POST workspaces/{workspace}/contexts:initiateOAuth
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
parent (必填) | path | string | 必填。要為其啟動 OAuth 的父項工作區。格式:workspaces/{workspace}。 |
workspaces.contexts.list
列出工作區中的脈絡。
stitch api workspaces/{workspace}/contexts
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
filter | query | string | 選填。用來縮小傳回脈絡範圍的 AIP-160 篩選運算式。支援的篩選欄位: - data_source:在脈絡的資料來源上進行等值比對。範例:data_source = "user_feedback" - annotations.:在註解值上進行等值比對。範例:annotations.env = "prod" - description:使用 HAS(:)運算子進行子字串比對。範例:description : "error" - data:使用 HAS(:)運算子進行子字串比對。範例:data : "exception" - create_time:使用 RFC 3339 時間戳記進行不等式比對(<=、<、>=、>)。範例:create_time >= "2024-01-01T00:00:00Z" 僅支援使用 AND 的複合運算式:data_source = "notes" AND description : "bug" 格式有誤或不受支援的篩選條件會傳回 INVALID_ARGUMENT。 |
orderBy | query | string | 選填。傳回脈絡的排序順序。 |
pageSize | query | integer | 選填。要傳回的脈絡數量上限。服務傳回的數量可能少於此值。若未指定,最多會傳回 50 筆脈絡。上限為 1000;超過 1000 的值會強制轉為 1000。 |
pageToken | query | string | 選填。先前 ListContexts 呼叫所傳回的頁面權杖。提供此權杖即可擷取下一頁。 |
parent (必填) | path | string | 必填。要列出脈絡的工作區。格式:workspaces/{workspace}。 |
workspaces.contexts.patch
更新工作區中的現有脈絡。
stitch api -X PATCH workspaces/{workspace}/contexts/{context}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 僅供輸出。識別碼。脈絡的完整資源名稱。格式:workspaces/{workspace}/contexts/{context} |
updateMask | query | string | 選填。要更新的欄位清單。 |
workspaces.contexts.search
使用向量嵌入依語意相似度搜尋脈絡。
stitch api workspaces/{workspace}/contexts:search
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
filter | query | string | 選填。用來縮小傳回脈絡範圍的 AIP-160 篩選運算式。遵循 https://google.aip.dev/160 支援的篩選欄位: - data_source:在脈絡的資料來源上進行等值比對。範例:data_source = "user_feedback" - annotations.:在註解值上進行等值比對。範例:annotations.env = "prod" - description:使用 HAS(:)運算子進行子字串比對。範例:description : "error" - data:使用 HAS(:)運算子進行子字串比對。範例:data : "exception" - create_time:使用 RFC 3339 時間戳記進行不等式比對(<=、<、>=、>)。範例:create_time >= "2024-01-01T00:00:00Z" |
maxResults | query | integer | 選填。已淘汰:請改用 page_size。 |
pageSize | query | integer | 選填。要傳回的搜尋結果數量上限。若未指定,最多會傳回 10 筆結果。上限為 100;超過 100 的值會強制轉為 100。 |
pageToken | query | string | 選填。先前 SearchContexts 呼叫所傳回的頁面權杖。提供此權杖即可擷取下一頁。 |
parent (必填) | path | string | 必填。要在其中搜尋脈絡的父項工作區。格式:workspaces/{workspace}。 |
query | query | string | 必填。自然語言搜尋查詢。 |
readMask | query | string | 選填。選填。指定要傳回 Context 哪些欄位的遮罩。 |
workspaces.eventDeliveries.get
依資源名稱取得單一事件傳遞。
stitch api workspaces/{workspace}/eventDeliveries/{eventDeliverie}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。事件傳遞的資源名稱。格式:workspaces/{workspace}/eventDeliveries/{event_delivery} |
workspaces.eventDeliveries.list
列出工作區的事件傳遞。
stitch api workspaces/{workspace}/eventDeliveries
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
filter | query | string | 選填。依 status 及/或 event_type 篩選的 AIP-160 篩選運算式。 |
pageSize | query | integer | 選填。要傳回的傳遞事件數量上限。 |
pageToken | query | string | 選填。用於分頁的選填權杖。 |
parent (必填) | path | string | 必填。要列出事件傳遞的工作區。格式:workspaces/{workspace} |
workspaces.events.list
列出工作區的通知事件。
stitch api workspaces/{workspace}/events
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
pageSize | query | integer | 選填。要傳回的事件數量上限。 |
pageToken | query | string | 選填。用於分頁的權杖。 |
parent (必填) | path | string | 必填。要列出事件的工作區。格式:workspaces/{workspace} |
workspaces.events.replay
將通知事件重播給一個或多個訂閱者。
stitch api -X POST workspaces/{workspace}/events/{event}:replay
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要重播的事件資源名稱。格式:workspaces/{workspace}/events/{event} |
workspaces.feedback.batchGet
批次擷取多個洞察的意見回饋項目。
stitch api workspaces/{workspace}/feedback:batchGet
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
names | query | string | 必填。要擷取意見回饋的洞察資源名稱。格式:workspaces/{workspace}/insights/{insight} |
parent (必填) | path | string | 必填。包含這些洞察的父項工作區。格式:workspaces/{workspace} |
workspaces.fileSystemEntries.create
在指定路徑建立檔案系統項目。
stitch api -X POST workspaces/{workspace}/fileSystemEntries
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
fileSystemEntryId | query | string | 選填。要用於檔案系統項目的 ID,該 ID 會成為檔案系統項目資源名稱的最後一個元件。 |
parent (必填) | path | string | 必填。要在其中建立項目的父項工作區。格式:workspaces/{workspace}。 |
workspaces.fileSystemEntries.delete
刪除指定路徑的檔案系統項目。
stitch api -X DELETE workspaces/{workspace}/fileSystemEntries/{fileSystemEntrie}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要刪除的檔案系統項目名稱。格式:workspaces/{workspace}/fileSystemEntries/{file_system_entry} |
workspaces.fileSystemEntries.get
依路徑取得檔案系統項目。
stitch api workspaces/{workspace}/fileSystemEntries/{fileSystemEntrie}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要擷取的檔案系統項目名稱。格式:workspaces/{workspace}/fileSystemEntries/{file_system_entry} |
workspaces.fileSystemEntries.list
列出工作區中的檔案系統項目。
stitch api workspaces/{workspace}/fileSystemEntries
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
filter | query | string | 選填。標準篩選字串。 |
pageSize | query | integer | 選填。要傳回的項目數量上限。 |
pageToken | query | string | 選填。用於分頁的頁面權杖。 |
parent (必填) | path | string | 必填。要列出項目的父項工作區。格式:workspaces/{workspace}。 |
workspaces.fileSystemEntries.patch
更新指定路徑的檔案系統項目。
stitch api -X PATCH workspaces/{workspace}/fileSystemEntries/{fileSystemEntrie}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 識別碼。檔案系統項目的資源名稱。格式:workspaces/{workspace}/fileSystemEntries/{file_system_entry} {file_system_entry} 區段是使用者指定的相對 path。 |
updateMask | query | string | 選填。要更新的欄位清單。 |
workspaces.files.delete
從工作區刪除檔案。
stitch api -X DELETE workspaces/{workspace}/files/{file}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要刪除的檔案資源名稱。格式:workspaces/{workspace}/files/{file}。 |
workspaces.files.get
依 ID 取得檔案。
stitch api workspaces/{workspace}/files/{file}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要擷取的檔案資源名稱。格式:workspaces/{workspace}/files/{file}。 |
workspaces.files.list
列出工作區中的檔案。
stitch api workspaces/{workspace}/files
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
filter | query | string | 選填。用來縮小傳回檔案範圍的 AIP-160 篩選運算式。遵循 https://google.aip.dev/160 支援的篩選欄位: - annotations.:在儲存於 FileAnnotations 資料表中的註解值上進行等值比對。僅支援 =(EQUALS)比較運算子。範例:annotations.env = "prod" 僅支援使用 AND 的複合運算式:annotations.env = "prod" AND annotations.team = "ai" 不支援依其他欄位(例如 display_name)進行篩選,且會傳回 INVALID_ARGUMENT。格式有誤或不受支援的篩選條件會傳回 INVALID_ARGUMENT。 |
orderBy | query | string | 選填。傳回檔案的排序順序。 |
pageSize | query | integer | 選填。要傳回的檔案數量上限。 |
pageToken | query | string | 選填。先前 ListFiles 呼叫所傳回的頁面權杖。 |
parent (必填) | path | string | 必填。要列出檔案的工作區。格式:workspaces/{workspace}。 |
workspaces.goalTemplates.list
列出工作區可用的入門目標範本。
stitch api workspaces/{workspace}/goalTemplates
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
filter | query | string | 選填。用來篩選目標範本的 AIP-160 篩選運算式。遵循 https://google.aip.dev/160 |
pageSize | query | integer | 選填。要傳回的目標範本數量上限。服務傳回的數量可能少於此值。若未指定,最多會傳回 20 個範本。上限為 100;超過 100 的值會強制轉為 100。 |
pageToken | query | string | 選填。先前 ListGoalTemplates 呼叫所傳回的頁面權杖。提供此權杖即可擷取下一頁。 |
parent (必填) | path | string | 必填。將在其中建立目標的父項工作區。格式:workspaces/{workspace} |
readMask | query | string | 選填。選填。指定要讀取哪些欄位的遮罩。 |
workspaces.goals.create
在指定的工作區中建立新目標。
stitch api -X POST workspaces/{workspace}/goals
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
parent (必填) | path | string | 必填。要在其中建立目標的父項工作區。格式:workspaces/{workspace} |
workspaces.goals.delete
刪除目標。
stitch api -X DELETE workspaces/{workspace}/goals/{goal}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要刪除的目標資源名稱。格式:workspaces/{workspace}/goals/{goal} |
workspaces.goals.get
依資源名稱取得單一目標。
stitch api workspaces/{workspace}/goals/{goal}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要擷取的目標資源名稱。格式:workspaces/{workspace}/goals/{goal} |
readMask | query | string | 選填。選填。指定要讀取哪些欄位的遮罩。 |
workspaces.goals.getInsightGeneration
擷取最近一次洞察產生作業的狀態與情形。
stitch api workspaces/{workspace}/goals/{goal}/insightGeneration
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。洞察產生狀態的資源名稱。格式:workspaces/{workspace}/goals/{goal}/insightGeneration。 |
workspaces.goals.list
列出工作區中的目標。
stitch api workspaces/{workspace}/goals
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
filter | query | string | 選填。用來篩選目標的 AIP-160 篩選運算式。 |
pageSize | query | integer | 選填。要傳回的目標數量上限。服務傳回的數量可能少於此值。若未指定,最多會傳回 20 個目標。上限為 100;超過 100 的值會強制轉為 100。 |
pageToken | query | string | 選填。先前 ListGoals 呼叫所傳回的頁面權杖。提供此權杖即可擷取下一頁。 |
parent (必填) | path | string | 必填。要列出目標的父項工作區。格式:workspaces/{workspace} |
readMask | query | string | 選填。選填。指定要讀取哪些欄位的遮罩。 |
workspaces.goals.patch
更新現有目標。
stitch api -X PATCH workspaces/{workspace}/goals/{goal}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 識別碼。目標的完整資源名稱。格式:workspaces/{workspace}/goals/{goal} |
updateMask | query | string | 選填。要更新的欄位清單。 |
workspaces.goals.suggest
為工作區建議目標。
stitch api -X POST workspaces/{workspace}/goals/suggest
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
parent (必填) | path | string | 必填。將在其中建議目標的父項工作區。格式:workspaces/{workspace} |
workspaces.goals.insightGeneration.queryStatusUpdates
查詢洞察產生作業執行期間發出的中繼狀態更新。
stitch api workspaces/{workspace}/goals/{goal}/insightGeneration:queryStatusUpdates
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。洞察產生狀態的資源名稱。格式:workspaces/{workspace}/goals/{goal}/insightGeneration。 |
pageSize | query | integer | 選填。要傳回的狀態更新數量上限。 |
pageToken | query | string | 選填。先前呼叫所傳回的頁面權杖,可用於只擷取新發出的更新。 |
workspaces.insights.batchGet
依名稱取得多個洞察。
stitch api workspaces/{workspace}/insights:batchGet
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
names | query | string | 必填。要擷取的洞察名稱。單一批次最多可擷取 100 筆洞察。格式:workspaces/{workspace}/insights/{insight} |
parent (必填) | path | string | 必填。包含這些洞察的父項工作區。格式:workspaces/{workspace} |
workspaces.insights.dismiss
關閉洞察。
stitch api -X POST workspaces/{workspace}/insights/{insight}:dismiss
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要關閉的洞察資源名稱。格式:workspaces/{workspace}/insights/{insight}。 |
workspaces.insights.generate
為工作區中的一組目標產生洞察。
stitch api -X POST workspaces/{workspace}/insights/generate
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
parent (必填) | path | string | 必填。觸發洞察產生的父項工作區。格式:workspaces/{workspace} |
workspaces.insights.get
依名稱取得單一洞察。
stitch api workspaces/{workspace}/insights/{insight}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要取得的洞察資源名稱。格式:workspaces/{workspace}/insights/{insight}。 |
workspaces.insights.getInvestigationReport
取得洞察或特定洞察更新的調查報告。若針對洞察提出請求(workspaces/{workspace}/insights/{insight}/investigationReport),會傳回最新的調查報告(對應到最近一次的洞察更新)。若針對特定洞察更新提出請求(workspaces/{workspace}/insights/{insight}/insightUpdates/{insight_update}/investigationReport),則會傳回該次更新當下的調查報告。
stitch api workspaces/{workspace}/insights/{insight}/investigationReport
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。調查報告的資源名稱。格式: - workspaces/{workspace}/insights/{insight}/investigationReport,用於擷取該洞察的最新調查報告(對應 ## 至最近的洞察更新)。workspaces/{workspace}/insights/{insight}/insightUpdates/{insight_update}/investigationReport,用於擷取特定洞察更新的調查報告。 |
workspaces.insights.getSummary
取得工作區依狀態區分的洞察數量摘要。
stitch api workspaces/{workspace}/insights/summary
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
filter | query | string | 選填。用來篩選洞察摘要的 AIP-160 篩選運算式。 |
name (必填) | path | string | 必填。要查詢洞察摘要的父項工作區。格式:workspaces/{workspace}。 |
workspaces.insights.list
列出工作區中的洞察。
stitch api workspaces/{workspace}/insights
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
filter | query | string | 選填。用來篩選洞察的 AIP-160 篩選運算式。支援的欄位:「state」、「goal_ids」。 |
pageSize | query | integer | 選填。要傳回的洞察數量上限。服務傳回的數量可能少於此值。若未指定,最多會傳回 20 筆洞察。上限為 100;超過 100 的值會強制轉為 100。 |
pageToken | query | string | 選填。先前 ListInsights 呼叫所傳回的頁面權杖。提供此權杖即可擷取下一頁。 |
parent (必填) | path | string | 必填。要列出洞察的父項工作區。格式:workspaces/{workspace}。 |
readMask | query | string | 選填。選填。指定要讀取哪些欄位的遮罩。不支援萬用字元 *。 |
workspaces.insights.setReadStatus
設定洞察對個別使用者的已讀/未讀狀態。
stitch api -X POST workspaces/{workspace}/insights/{insight}/setReadStatus
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。洞察的資源名稱。格式:workspaces/{workspace}/insights/{insight} |
workspaces.insights.undismiss
取消關閉洞察。
stitch api -X POST workspaces/{workspace}/insights/{insight}:undismiss
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要取消關閉的洞察資源名稱。格式:workspaces/{workspace}/insights/{insight}。 |
workspaces.insights.feedback.create
提交對洞察的意見回饋。
stitch api -X POST workspaces/{workspace}/insights/{insight}/feedback
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
insightFeedbackId | query | string | 選填。要用於意見回饋的 ID,該 ID 會成為意見回饋資源名稱的最後一個元件。不支援由用戶端指派的 ID。此欄位必須留空。 |
parent (必填) | path | string | 必填。父項洞察的資源名稱。格式:workspaces/{workspace}/insights/{insight} |
workspaces.insights.feedback.delete
刪除洞察意見回饋項目。
stitch api -X DELETE workspaces/{workspace}/insights/{insight}/feedback/{feedback}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要刪除的意見回饋項目資源名稱。格式:workspaces/{workspace}/insights/{insight}/feedback/{feedback} 支援虛擬資源別名 like(依 AIP-122),可直接對已驗證呼叫端的 like 執行操作,無須事先擷取其 ID。 |
workspaces.insights.feedback.get
取得洞察的特定意見回饋項目。
stitch api workspaces/{workspace}/insights/{insight}/feedback/{feedback}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。意見回饋項目的資源名稱。格式:workspaces/{workspace}/insights/{insight}/feedback/{feedback} 支援虛擬資源別名 like(依 AIP-122),可直接對已驗證呼叫端的 like 執行操作,無須事先擷取其 ID。 |
workspaces.insights.feedback.list
列出洞察的意見回饋項目。
stitch api workspaces/{workspace}/insights/{insight}/feedback
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
pageSize | query | integer | 選填。要傳回的意見回饋項目數量上限。 |
pageToken | query | string | 選填。先前 ListInsightFeedbacks 呼叫所傳回的頁面權杖。 |
parent (必填) | path | string | 必填。要列出意見回饋的父項洞察。格式:workspaces/{workspace}/insights/{insight} |
workspaces.insights.feedback.patch
更新現有的洞察意見回饋提交內容。
stitch api -X PATCH workspaces/{workspace}/insights/{insight}/feedback/{feedback}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 識別碼。意見回饋項目的完整資源名稱。格式:workspaces/{workspace}/insights/{insight}/feedback/{feedback} |
updateMask | query | string | 選填。要更新的欄位清單。 |
workspaces.insights.insightUpdates.getInvestigationReport
取得洞察或特定洞察更新的調查報告。若針對洞察提出請求(workspaces/{workspace}/insights/{insight}/investigationReport),會傳回最新的調查報告(對應到最近一次的洞察更新)。若針對特定洞察更新提出請求(workspaces/{workspace}/insights/{insight}/insightUpdates/{insight_update}/investigationReport),則會傳回該次更新當下的調查報告。
stitch api workspaces/{workspace}/insights/{insight}/insightUpdates/{insightUpdate}/investigationReport
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。調查報告的資源名稱。格式: - workspaces/{workspace}/insights/{insight}/investigationReport,用於擷取該洞察的最新調查報告(對應 ## 至最近的洞察更新)。workspaces/{workspace}/insights/{insight}/insightUpdates/{insight_update}/investigationReport,用於擷取特定洞察更新的調查報告。 |
workspaces.insights.insightUpdates.list
列出洞察的更新。
stitch api workspaces/{workspace}/insights/{insight}/insightUpdates
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
filter | query | string | 選填。用來篩選洞察更新的 AIP-160 篩選運算式。支援的欄位:substantive、source、create_time、description。 |
orderBy | query | string | 選填。用來排序洞察更新的欄位。支援的語法遵循 AIP-132(例如 create_time、create_time desc)。支援的欄位:create_time。若為空,預設為 create_time desc。 |
pageSize | query | integer | 選填。要傳回的洞察更新數量上限。服務傳回的數量可能少於此值。若未指定,最多會傳回 20 筆洞察更新。上限為 100;超過 100 的值會強制轉為 100。 |
pageToken | query | string | 選填。先前 ListInsightUpdates 呼叫所傳回的頁面權杖。提供此權杖即可擷取下一頁。 |
parent (必填) | path | string | 必填。要列出更新的父項洞察。格式:workspaces/{workspace}/insights/{insight}。 |
readMask | query | string | 選填。選填。指定要讀取哪些欄位的遮罩。不支援萬用字元 *。 |
workspaces.marketRadarCheckpoint.generate
在背景觸發市場雷達檢查點的產生作業。
stitch api -X POST workspaces/{workspace}/marketRadarCheckpoint/generate
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
parent (必填) | path | string | 必填。要為其觸發市場雷達產生作業的父項工作區。格式:workspaces/{workspace} |
workspaces.productMd.generate
為工作區啟動 ProductMd 代理程式。
stitch api -X POST workspaces/{workspace}/productMd:generate
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
parent (必填) | path | string | 必填。要為其產生 ProductMd 的工作區資源名稱。格式:workspaces/{workspace} |
workspaces.productMd.getStatus
輪詢執行中的 ProductMd 代理程式所發出的中繼狀態更新。
stitch api workspaces/{workspace}/productMd:getStatus
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
agencySessionId | query | string | 選填。已淘汰:請改用 execution_id。由 GenerateProductMd 傳回的代理工作階段 ID。 |
continuationToken | query | string | 選填。先前 GetProductMdStatus 回應中的續傳權杖。 |
executionId | query | string | 選填。由 GenerateProductMd 傳回的執行 ID。 |
parent (必填) | path | string | 必填。工作區的資源名稱。格式:workspaces/{workspace} |
workspaces.skills.create
在工作區中建立技能。
stitch api -X POST workspaces/{workspace}/skills
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
parent (必填) | path | string | 必填。要在其中建立技能的父項工作區。格式:workspaces/{workspace}。 |
skillId | query | string | 選填。要用於技能的 ID,該 ID 會成為技能資源名稱(workspaces/{workspace}/skills/{skill_id})的最後一個元件。伺服器不會產生 ID,因此必須在此處或透過 skill.name 提供 ID。若兩者皆設定,必須一致,否則會傳回 INVALID_ARGUMENT。 |
workspaces.skills.delete
刪除工作區中的技能。
stitch api -X DELETE workspaces/{workspace}/skills/{skill}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要刪除的技能名稱。格式:workspaces/{workspace}/skills/{skill} |
workspaces.skills.list
列出工作區中的技能。
stitch api workspaces/{workspace}/skills
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
filter | query | string | 選填。標準篩選字串。 |
pageSize | query | integer | 選填。要傳回的技能數量上限。 |
pageToken | query | string | 選填。用於分頁的頁面權杖。 |
parent (必填) | path | string | 必填。要列出技能的父項工作區。格式:workspaces/{workspace}。 |
workspaces.skills.patch
更新工作區中的技能。
stitch api -X PATCH workspaces/{workspace}/skills/{skill}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
allowMissing | query | boolean | 選填。若設為 true,且找不到該技能,則會建立新的技能。 |
name (必填) | path | string | 識別碼。技能的資源名稱。格式:workspaces/{workspace}/skills/{skill} |
updateMask | query | string | 選填。要更新的欄位清單。 |
workspaces.toolProviders.delete
刪除使用者的工具供應商設定。
stitch api -X DELETE workspaces/{workspace}/toolProviders/{toolProvider}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要刪除的工具供應商資源名稱。格式:workspaces/{workspace}/toolProviders/{tool_provider} |
workspaces.toolProviders.deleteAuth
刪除工具供應商的所有驗證憑證。
stitch api -X DELETE workspaces/{workspace}/toolProviders/{toolProvider}:deleteAuth
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要刪除其驗證憑證的工具供應商資源名稱。格式:workspaces/{workspace}/toolProviders/{tool_provider} |
workspaces.toolProviders.list
列出工作區可用的工具供應商。
stitch api workspaces/{workspace}/toolProviders
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
filter | query | string | 選填。AIP-160 篩選運算式。 |
orderBy | query | string | 選填。工具供應商的排序順序。 |
pageSize | query | integer | 選填。要傳回的工具供應商數量上限。 |
pageToken | query | string | 選填。用於分頁的頁面權杖。 |
parent (必填) | path | string | 必填。要列出工具供應商的工作區。格式:workspaces/{workspace}。 |
workspaces.toolProviders.upsert
新增或更新使用者的工具供應商設定。
stitch api -X POST workspaces/{workspace}/toolProviders:upsert
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
parent (必填) | path | string | 必填。要在其中新增或更新工具供應商的父項工作區。格式:workspaces/{workspace}。 |
workspaces.toolProviders.upsertAuth
取代工具供應商的完整驗證標頭組。
stitch api -X POST workspaces/{workspace}/toolProviders/{toolProvider}:upsertAuth
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要為其更新驗證資訊的工具供應商資源名稱。格式:workspaces/{workspace}/toolProviders/{tool_provider} |
workspaces.users.list
列出工作區中的使用者。
stitch api workspaces/{workspace}/users
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
filter | query | string | 選填。用來篩選使用者的 CEL 篩選運算式。 |
pageSize | query | integer | 選填。要傳回的使用者數量上限。 |
pageToken | query | string | 選填。先前 ListUsers 呼叫所傳回的頁面權杖。 |
parent (必填) | path | string | 必填。要列出使用者的工作區資源名稱。格式:workspaces/{workspace} |
workspaces.webhookConfigs.create
在指定的工作區中建立新的 Webhook 設定。
stitch api -X POST workspaces/{workspace}/webhookConfigs
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
parent (必填) | path | string | 必填。要在其中建立 Webhook 設定的父項工作區。格式:workspaces/{workspace} |
workspaces.webhookConfigs.delete
依資源名稱刪除 Webhook 設定。
stitch api -X DELETE workspaces/{workspace}/webhookConfigs/{webhookConfig}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要刪除的 Webhook 設定資源名稱。格式:workspaces/{workspace}/webhookConfigs/{webhook_config} |
workspaces.webhookConfigs.get
依資源名稱取得單一 Webhook 設定。
stitch api workspaces/{workspace}/webhookConfigs/{webhookConfig}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要擷取的 Webhook 設定資源名稱。格式:workspaces/{workspace}/webhookConfigs/{webhook_config} |
workspaces.webhookConfigs.list
列出工作區的所有 Webhook 設定。
stitch api workspaces/{workspace}/webhookConfigs
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
pageSize | query | integer | 選填。每頁要傳回的 Webhook 設定數量上限。允許的上限值為 100。 |
pageToken | query | string | 選填。先前 ListWebhookConfigs 呼叫所傳回的頁面權杖。提供此權杖即可擷取下一頁。 |
parent (必填) | path | string | 必填。要列出 Webhook 設定的父項工作區。格式:workspaces/{workspace} |
workspaces.webhookConfigs.patch
更新現有的 Webhook 設定。僅會修改更新遮罩中指定的欄位。
stitch api -X PATCH workspaces/{workspace}/webhookConfigs/{webhookConfig}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 識別碼。Webhook 設定的資源名稱。格式:workspaces/{workspace}/webhookConfigs/{webhook_config} |
updateMask | query | string | 選填。要更新的欄位清單。若未設定,則會更新所有可變更欄位。 |
workspaces.webhookConfigs.verify
傳送挑戰請求並確認端點正確回傳該請求,以驗證 Webhook 端點。
stitch api -X PATCH workspaces/{workspace}/webhookConfigs/{webhookConfig}/verify
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要驗證的 Webhook 設定資源名稱。格式:workspaces/{workspace}/webhookConfigs/{webhook_config} |
workspaces.webhookEvents.get
依資源名稱取得單一 Webhook 事件。
stitch api workspaces/{workspace}/webhookEvents/{webhookEvent}
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要擷取的 Webhook 事件資源名稱。格式:workspaces/{workspace}/webhookEvents/{webhook_event} |
workspaces.webhookEvents.list
列出工作區的所有 Webhook 事件。
stitch api workspaces/{workspace}/webhookEvents
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
filter | query | string | 選填。用來篩選回應中所傳回 Webhook 事件的篩選運算式。支援依「delivery_state」與「event_type」進行篩選。 |
pageSize | query | integer | 選填。每頁要傳回的 Webhook 事件數量上限。允許的上限值為 100。 |
pageToken | query | string | 選填。先前 ListWebhookEvents 呼叫所傳回的頁面權杖。提供此權杖即可擷取下一頁。 |
parent (必填) | path | string | 必填。要列出 Webhook 事件的父項工作區。格式:workspaces/{workspace} |
workspaces.webhookEvents.send
將 Webhook 事件酬載傳遞至其設定的端點。可用於手動重新傳遞事件。
stitch api -X POST workspaces/{workspace}/webhookEvents/{webhookEvent}:send
參數
| 名稱 | 位置 | 型別 | 說明 |
|---|---|---|---|
name (必填) | path | string | 必填。要傳送的 Webhook 事件資源名稱。格式:workspaces/{workspace}/webhookEvents/{webhook_event} |
原文: https://stitch.withgoogle.com/docs/cli/reference/rest-api/
本頁翻譯自 Google Stitch 官方文件,原文版權歸 Google LLC 所有。本站為獨立第三方翻譯,與 Google 無關聯。