Arrange Videos In Playlist

Reorder videos inside a playlist either by moving a single asset to a position or by sorting the playlist by title or created date.

Path Parameters
  • playlist_id
    Type: string
    required

    Playlist id.

Body
application/json
    • asset_id
      Type: string
      required

      Asset id to move.

    • asset_position
      Type: integer
      min:  
      0
      required

      Zero-based position inside the provided page.

    • page_number
      Type: integer
      min:  
      1
      required

      Current playlist page number.

    • page_size
      Type: integer
      min:  
      1
      max:  
      200
      required

      Playlist page size used by the caller.

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/video/playlists/{playlist_id}/reorder
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.reorderAsset('playlistId', {
  asset_id: '6e82bf783e88be000ab45ed2',
  page_number: 1,
  page_size: 10,
  asset_position: 0,
});

console.log(videoPlaylist);
{
  "success": true,
  "asset_list": [
    "6e82bf783e88be000ab45ed2",
    "6e82bf783e88be000ab45ed1"
  ]
}