Groups: insert
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
यह YouTube Analytics ग्रुप बनाता है. ग्रुप बनाने के बाद, उसमें आइटम जोड़ने के लिए groupItems.insert
तरीके का इस्तेमाल करें.
अनुरोध
एचटीटीपी अनुरोध
POST https://youtubeanalytics.googleapis.com/v2/groups
अनुमति देना
इस अनुरोध के लिए, इनमें से कम से कम एक स्कोप के साथ अनुमति की ज़रूरत है (पुष्टि और अनुमति के बारे में ज़्यादा पढ़ें).
स्कोप |
https://www.googleapis.com/auth/yt-analytics.readonly |
अपने YouTube कॉन्टेंट के लिए YouTube Analytics की रिपोर्ट देखें. इस स्कोप से, उपयोगकर्ता गतिविधि की मेट्रिक का ऐक्सेस मिलता है. जैसे, व्यू की संख्या और रेटिंग की संख्या. |
https://www.googleapis.com/auth/yt-analytics-monetary.readonly |
अपने YouTube कॉन्टेंट के लिए YouTube Analytics की कमाई से जुड़ी रिपोर्ट देखें. इस स्कोप में, उपयोगकर्ता गतिविधि की मेट्रिक के साथ-साथ, अनुमानित रेवेन्यू और विज्ञापन की परफ़ॉर्मेंस की मेट्रिक का ऐक्सेस मिलता है. |
https://www.googleapis.com/auth/youtube |
अपना YouTube खाता मैनेज करें. चैनल के मालिक, YouTube Analytics API में इस दायरे का इस्तेमाल, YouTube Analytics ग्रुप और ग्रुप आइटम को मैनेज करने के लिए करते हैं. |
https://www.googleapis.com/auth/youtubepartner |
YouTube पर YouTube ऐसेट और उससे जुड़ा कॉन्टेंट देखें और मैनेज करें. YouTube Analytics API में, कॉन्टेंट के मालिक इस स्कोप का इस्तेमाल करके, YouTube Analytics के ग्रुप और ग्रुप आइटम मैनेज करते हैं. |
पैरामीटर
नीचे दी गई टेबल में उन पैरामीटर की सूची दी गई है जिनका इस्तेमाल इस क्वेरी में किया जा सकता है. सूची में दिए गए सभी पैरामीटर, क्वेरी पैरामीटर हैं.
पैरामीटर |
ज़रूरी नहीं पैरामीटर |
onBehalfOfContentOwner |
string
इस पैरामीटर का इस्तेमाल सिर्फ़ अनुमति वाले अनुरोध में किया जा सकता है. ध्यान दें: यह पैरामीटर सिर्फ़ उन YouTube कॉन्टेंट पार्टनर के लिए है जिनके पास कई अलग-अलग YouTube चैनलों का मालिकाना हक है और जिन्हें उन्हें मैनेज करने की अनुमति है.
onBehalfOfContentOwner पैरामीटर से पता चलता है कि अनुरोध के लिए दिए गए क्रेडेंशियल, उस YouTube उपयोगकर्ता की पहचान करते हैं जो पैरामीटर की वैल्यू में बताए गए कॉन्टेंट के मालिक की ओर से काम कर रहा है. इसकी मदद से, कॉन्टेंट के मालिक एक बार पुष्टि करके अपने सभी वीडियो और चैनल का डेटा ऐक्सेस कर सकते हैं. इसके लिए, उन्हें हर चैनल के लिए पुष्टि करने के क्रेडेंशियल देने की ज़रूरत नहीं होती. उपयोगकर्ता जिस खाते से पुष्टि करता है वह YouTube कॉन्टेंट के मालिक के खाते से लिंक होना चाहिए. |
अनुरोध का मुख्य भाग
अनुरोध के मुख्य हिस्से में ग्रुप का संसाधन दें.
उस संसाधन के लिए, आपको इन प्रॉपर्टी की वैल्यू देनी होगी.
snippet.title
contentDetails.itemType
जवाब
अगर यह तरीका कामयाब होता है, तो यह जवाब के मुख्य हिस्से में ग्रुप रिसॉर्स दिखाता है.
गड़बड़ियां
एपीआई में, गड़बड़ी के ऐसे मैसेज नहीं होते जो इस एपीआई के तरीके के लिए खास हों. हालांकि, इस तरीके से भी गड़बड़ी के मैसेज के दस्तावेज़ में दी गई, एपीआई से जुड़ी सामान्य गड़बड़ियां दिख सकती हैं.
इसे आज़माएं!
इस एपीआई को कॉल करने के लिए, APIs Explorer का इस्तेमाल करें. साथ ही, एपीआई का अनुरोध और रिस्पॉन्स देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-08-21 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-08-21 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eThis API method creates a new YouTube Analytics group, which can be populated with items via the \u003ccode\u003egroupItems.insert\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization 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.\u003c/p\u003e\n"],["\u003cp\u003eThe API call uses a POST request to \u003ccode\u003ehttps://youtubeanalytics.googleapis.com/v2/groups\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must contain a group resource with values specified for \u003ccode\u003esnippet.title\u003c/code\u003e and \u003ccode\u003econtentDetails.itemType\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eonBehalfOfContentOwner\u003c/code\u003e parameter allows content partners to authenticate once to access data for multiple channels they manage, and it is intended exclusively for that use case.\u003c/p\u003e\n"]]],["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"],null,["# Groups: insert\n\nCreates a YouTube Analytics group. After creating a group, use the [groupItems.insert](/youtube/analytics/reference/groupItems/insert) method to add items to the group.\n\nRequest\n-------\n\n### HTTP request\n\n```\nPOST https://youtubeanalytics.googleapis.com/v2/groups\n```\n\n### Authorization\n\nThis request requires authorization with at least one of the following scopes ([read more about authentication and authorization](/youtube/analytics/authentication)).\n\n| Scopes ||\n|----------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| https://www.googleapis.com/auth/yt-analytics.readonly | View YouTube Analytics reports for your YouTube content. This scope provides access to user activity metrics, like view counts and rating counts. |\n| https://www.googleapis.com/auth/yt-analytics-monetary.readonly | View YouTube Analytics monetary reports for your YouTube content. This scope provides access to user activity metrics and to estimated revenue and ad performance metrics. |\n| https://www.googleapis.com/auth/youtube | Manage your YouTube account. In the YouTube Analytics API, channel owners use this scope to manage YouTube Analytics groups and group items. |\n| https://www.googleapis.com/auth/youtubepartner | View and manage YouTube assets and associated content on YouTube. In the YouTube Analytics API, content owners use this scope to manage YouTube Analytics groups and group items. |\n\n### Parameters\n\nThe table below lists the parameters that this query supports. All of the parameters listed are query parameters.\n\n| Parameters ||\n|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| **Optional parameters** |||\n| `onBehalfOfContentOwner` | `string` This parameter can only be used in a properly [authorized request](/youtube/analytics/authentication). **Note:** This parameter is intended exclusively for YouTube content partners that own and manage many different YouTube channels. The **onBehalfOfContentOwner** parameter indicates that the request's authorization credentials identify a YouTube user who is acting on behalf of the content owner specified in the parameter value. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The account that the user authenticates with must be linked to the specified YouTube content owner. |\n\n### Request body\n\nProvide a [group resource](/youtube/analytics/reference/groups#resource) in the request body.\nFor that resource, you must specify a value for the following properties.\n\n\u003cbr /\u003e\n\n- `snippet.title`\n- `contentDetails.itemType`\n\n\u003cbr /\u003e\n\nResponse\n--------\n\nIf successful, this method returns a [group resource](/youtube/analytics/reference/groups#resource) in the response body.\n\nErrors\n------\n\nThe API does not define any error messages that are unique to this API method. However, this method could still return general API errors listed in the [error message](/youtube/analytics/reference/errors#general) documentation.\n\nTry it!\n-------\n\nUse the APIs Explorer to call this API and see the API request and response."]]