AI-generated Key Takeaways
-
The YouTube Analytics API provides methods to manage group items, enabling you to list, insert, and delete them within groups.
-
Group items associate a YouTube resource like a channel, video, or playlist with a specific group for analysis.
-
Each group item is uniquely identified by an ID and contains information about the resource it links to and the group it belongs to.
-
The API uses a JSON structure to represent group items, including properties like
kind,etag,id,groupId, andresource. -
The
resourceproperty within a group item further specifies the type and unique ID of the linked YouTube resource (channel, video, playlist, or asset).
Methods
The API supports the following methods for groupItems resources:
- list
- Returns a collection of group items that match the API request parameters. Try it now.
- insert
- Creates a group item. Try it now.
- delete
- Removes an item from a group. Try it now.
Resource representation
The JSON structure below shows the format of a groupItems resource:
{
"kind": "youtube#groupItem",
"etag": etag,
"id": string,
"groupId": string,
"resource": {
"kind": string,
"id": string
}
}Properties
The following table defines the properties that appear in this resource:
| Properties | |
|---|---|
kind |
stringIdentifies the API resource's type. The value will be youtube#groupItem. |
etag |
etagThe Etag of this resource. |
id |
stringThe ID that YouTube uses to uniquely identify the channel, video, playlist, or asset resource that is included in the group. Note that this ID refers specifically to the inclusion of that resource in a particular group and is different than the channel ID, video ID, playlist ID, or asset ID that uniquely identifies the resource itself. The resource.id property's value specifies the unique channel, video, playlist, or asset ID. |
groupId |
stringThe ID that YouTube uses to uniquely identify the group that contains the item. |
resource |
objectThe resource object contains information that identifies the item being added to the group. |
resource.kind |
stringIdentifies the type of resource being added to the group. Valid values for this property are:
|
resource.id |
stringThe channel, video, playlist, or asset ID that YouTube uses to uniquely identify the item that is being added to the group. |