Groups: insert
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
要求
HTTP 要求
POST https://youtubeanalytics.googleapis.com/v2/groups
授權
這項要求需要至少擁有下列其中一個範圍的授權 (進一步瞭解驗證和授權)。
範圍 |
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 數據分析群組和群組項目。 |
https://www.googleapis.com/auth/youtubepartner |
查看及管理 YouTube 上的資產和相關內容。在 YouTube Analytics API 中,內容擁有者可使用這個範圍管理 YouTube Analytics 群組和群組項目。 |
參數
下表列出這項查詢支援的參數。列出的所有參數都是查詢參數。
參數 |
選用參數 |
onBehalfOfContentOwner |
string
這個參數只能用於適當的授權要求。注意:這個參數僅適用於擁有及管理許多不同 YouTube 頻道的 YouTube 內容合作夥伴。
onBehalfOfContentOwner 參數表示要求的授權憑證可識別 YouTube 使用者,這些使用者是代表參數值中指定的內容擁有者。這項功能可讓內容擁有者驗證一次,即可存取所有影片和頻道資料,不必為每個頻道提供驗證憑證。使用者驗證的帳戶必須連結至指定的 YouTube 內容擁有者。 |
要求主體
在要求主體中提供群組資源。您必須為該資源指定下列屬性的值。
snippet.title
contentDetails.itemType
錯誤
這個 API 不會定義任何專屬於此 API 方法的錯誤訊息。不過,這個方法仍可能傳回錯誤訊息說明文件中所列的一般 API 錯誤。
試試看!
使用 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 method creates a new YouTube Analytics group, which can be populated with items via the `groupItems.insert` method."],["Authorization for this request requires one of four possible scopes, including options for read-only access to analytics data, monetary reports, or management of YouTube accounts and assets."],["The API call uses a POST request to `https://youtubeanalytics.googleapis.com/v2/groups`."],["The request body must contain a group resource with values specified for `snippet.title` and `contentDetails.itemType`."],["The `onBehalfOfContentOwner` parameter allows content partners to authenticate once to access data for multiple channels they manage, and it is intended exclusively for that use case."]]],["This outlines how to create a YouTube Analytics group via a POST request to `https://youtubeanalytics.googleapis.com/v2/groups`. Authorization requires specific scopes, including read-only and monetary analytics, channel management, or content partner access. The request body must include a group resource with `snippet.title` and `contentDetails.itemType`. Content owners can use `onBehalfOfContentOwner` to manage multiple channels. Upon success, a group resource is returned. Items can be added to the group using the `groupItems.insert` method.\n"]]