Get playlist assets
Get a list of all assets inside playlist. You can choose in which order are assets returned.
Path Parameters
- Type: stringplaylist
_id requiredID of playlist in which you need to list assets.
Query Parameters
- Type: stringsort
_by Optional, if sort_by is set to asset_title it will sorted by title name. Otherwise order in which user added the assets in playlist.
- Type: integer Format: int32sort
_order -1 or 1
- Type: integer Format: int32page
_number Optional, Minimun 1
- Type: stringpage
_size Optional, Minimun 10
Responses
- application/json
- application/json
Request Example for get/video/playlist/{playlist_id}/assets
import Gumlet from '@gumlet/nodejs-sdk';
const client = new Gumlet({
apiKey: process.env['API_KEY'], // defaults to the API_KEY env var
});
const videoPlaylist = await client.videoPlaylists.listAssets('playlistId', {
sort_order: 1,
page_number: 1,
page_size: '10',
});
console.log(videoPlaylist);
{
"asset_list": [
{
"id": "6593d0e5e1b4f8a05db8df0d",
"title": "video asset title 1",
"description": "Asset description",
"status": "ready",
"created_at": "2024-01-02T09:01:25.079Z",
"duration": 885
},
{
"id": "6593d14583d3d4d3324f7f71",
"title": "video asset title 2",
"description": "Asset description",
"status": "ready",
"created_at": "2024-01-02T09:03:01.149Z",
"duration": 1742
},
{
"id": "6596f6f8b3487059a710ff77",
"title": "video asset title 3",
"description": "Asset description",
"status": "ready",
"created_at": "2024-01-04T18:20:40.582Z",
"duration": 8462
},
{
"id": "6596f6e7b3487059a710ff4f",
"title": "video asset title 4",
"description": "Asset description",
"status": "ready",
"created_at": "2024-01-04T18:20:23.342Z",
"duration": 645
},
{
"id": "65578dd87eebc22dcdd549a2",
"title": "video asset title 5",
"description": "Asset description",
"status": "ready",
"created_at": "2023-11-17T15:59:20.823Z",
"duration": 427
},
{
"id": "6593f310c69a8548236b2a86",
"title": "video asset title 6",
"description": "Asset description",
"status": "upload-pending",
"created_at": "2024-01-02T11:27:16.289Z",
"duration": 720
},
{
"id": "6593e776c69a8548236b2a59",
"title": "video asset title 7",
"description": "Asset description",
"status": "upload-pending",
"created_at": "2024-01-02T11:26:15.083Z",
"duration": 374
},
{
"id": "6508790283e4d60611846790",
"title": "video asset title 8",
"description": "Asset description",
"status": "ready",
"created_at": "2023-09-18T16:21:22.955Z",
"duration": 603
},
{
"id": "650878f883e4d6061184677d",
"title": "video asset title 9",
"description": "Asset description",
"status": "ready",
"created_at": "2023-09-18T16:21:12.870Z",
"duration": 929
},
{
"id": "650878de83e4d6061184676a",
"title": "video asset title 10",
"description": "Asset description",
"status": "ready",
"created_at": "2023-09-18T16:20:46.129Z",
"duration": 12
}
],
"has_next_page": true,
"next_page": 2
}
