Video API, gRPC: PlaylistService.List
Lists all playlists in a specific channel with pagination support.
Results can be filtered and sorted using the provided parameters.
gRPC request
rpc List (ListPlaylistsRequest) returns (ListPlaylistsResponse)
ListPlaylistsRequest
{
"channel_id": "string",
"page_size": "int64",
"page_token": "string",
"order_by": "string",
"filter": "string"
}
|
Field |
Description |
|
channel_id |
string Required field. ID of the channel containing the playlists to list. The maximum string length in characters is 50. |
|
page_size |
int64 The maximum number of playlists to return per page. The maximum value is 100. |
|
page_token |
string Page token for retrieving the next page of results. The maximum string length in characters is 15000. |
|
order_by |
string Specifies the ordering of results. The maximum string length in characters is 50. |
|
filter |
string Filter expression to narrow down the list of returned playlists. Supported logical operators: ["AND", "OR"]. Example: Filterable fields: ["id", "title"]. The maximum string length in characters is 1000. |
ListPlaylistsResponse
{
"playlists": [
{
"id": "string",
"channel_id": "string",
"title": "string",
"description": "string",
"items": [
{
// Includes only one of the fields `video_id`, `episode_id`
"video_id": "string",
"episode_id": "string",
// end of the list of possible fields
"position": "int64"
}
],
"style_preset_id": "string",
"created_at": "google.protobuf.Timestamp",
"updated_at": "google.protobuf.Timestamp"
}
],
"next_page_token": "string"
}
|
Field |
Description |
|
playlists[] |
List of playlists matching the request criteria. |
|
next_page_token |
string Token for retrieving the next page of results. |
Playlist
Entity representing an ordered collection of videos or episodes.
Playlists allow organizing content into sequences for improved user experience.
|
Field |
Description |
|
id |
string Unique identifier of the playlist. |
|
channel_id |
string Identifier of the channel where this playlist is created and managed. |
|
title |
string Title of the playlist displayed in interfaces and players. |
|
description |
string Detailed description of the playlist's content and purpose. |
|
items[] |
Ordered list of content items included in this playlist. |
|
style_preset_id |
string Identifier of the style preset used in the player during playlist playback. |
|
created_at |
Timestamp when the playlist was initially created in the system. |
|
updated_at |
Timestamp of the last modification to the playlist or its metadata. |
PlaylistItem
Represents a single item in a playlist.
Each item references either a video or an episode and specifies its position in the sequence.
|
Field |
Description |
|
video_id |
string Identifier of a video included in the playlist. The maximum string length in characters is 50. Includes only one of the fields Specifies the content identifier type for this playlist item. |
|
episode_id |
string Identifier of an episode included in the playlist. The maximum string length in characters is 50. Includes only one of the fields Specifies the content identifier type for this playlist item. |
|
position |
int64 Position of this item in the playlist sequence (zero-indexed). Acceptable values are 0 to 100, inclusive. |