GroupItems: delete
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
要求
HTTP 要求
DELETE https://youtubeanalytics.googleapis.com/v2/groupItems
授權
這項要求需要至少擁有下列其中一個範圍的授權 (進一步瞭解驗證和授權)。
範圍 |
https://www.googleapis.com/auth/yt-analytics.readonly |
查看您 YouTube 內容的 YouTube 數據分析報表。這個範圍可存取使用者活動指標,例如觀看次數和評分次數。 |
https://www.googleapis.com/auth/yt-analytics-monetary.readonly |
查看 YouTube 內容的 YouTube 數據分析報表。這個範圍可存取使用者活動指標,以及預估收益和廣告成效指標。 |
https://www.googleapis.com/auth/youtube |
管理 YouTube 帳戶。在 YouTube Analytics API 中,頻道擁有者可使用這個範圍管理 YouTube Analytics 群組和群組項目。 |
https://www.googleapis.com/auth/youtubepartner |
查看及管理 YouTube 素材資源和相關內容。在 YouTube Analytics API 中,內容擁有者可使用這個範圍管理 YouTube Analytics 群組和群組項目。 |
參數
下表列出這個查詢支援的參數。列出的所有參數都是查詢參數。
參數 |
必要參數 |
id |
string
id 參數會針對要刪除的群組指定 YouTube 群組項目 ID。 |
選用參數 |
onBehalfOfContentOwner |
string
這個參數只能用於適當的授權要求。注意:這個參數僅供擁有及管理多個 YouTube 頻道的 YouTube 內容合作夥伴使用。
onBehalfOfContentOwner 參數表示要求的授權憑證可識別代表參數值中指定內容擁有者的 YouTube 使用者。內容擁有者只要進行驗證一次,就能存取所有的影片和頻道資料,不必分別提供各個頻道的驗證憑證。使用者驗證的帳戶必須連結至指定的 YouTube 內容擁有者。 |
回應
如果成功,這個方法會傳回 HTTP 204
回應代碼 (No Content
)。
錯誤
下表說明 API 為回應這個方法時,可能會傳回的錯誤訊息。詳情請參閱錯誤訊息說明文件。
錯誤類型 |
錯誤詳細資料 |
說明 |
notFound (404) |
groupItemNotFound |
找不到使用要求的 id 屬性識別的群組項目。 |
試試看!
使用 APIs Explorer 呼叫這個 API,並查看 API 要求和回應。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-11-09 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2024-11-09 (世界標準時間)。"],[[["This API endpoint is used to delete a specific item from a YouTube Analytics group using its unique ID."],["The request requires authorization using one of the listed scopes, with varying levels of access to YouTube Analytics data, from readonly to managing account and content."],["The `id` parameter is mandatory and specifies the unique identifier of the group item to be removed."],["The `onBehalfOfContentOwner` parameter is an optional parameter, exclusively for YouTube content partners, to authorize requests on behalf of a specific content owner."],["A successful request returns an HTTP `204` status code, and a `notFound` error occurs if the specified group item cannot be found."]]],["This documentation details the process of removing an item from a YouTube Analytics group via a `DELETE` HTTP request to `https://youtubeanalytics.googleapis.com/v2/groupItems`. Authorization is required, using specific scopes like `yt-analytics.readonly`, `yt-analytics-monetary.readonly`, `youtube`, or `youtubepartner`. The request requires the `id` parameter specifying the group item's ID. An optional `onBehalfOfContentOwner` parameter allows content owners to manage multiple channels. Successful deletion returns a `204` status; a `404` error occurs if the item isn't found.\n"]]