PATCH
/
streaming
/
playlists
/
{playlist_id}
Change playlist
curl --request PATCH \
  --url https://api.gcore.com/streaming/playlists/{playlist_id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Playlist: Webinar '\''Onboarding for new employees on working with the corporate portal'\''",
  "active": true,
  "start_time": "2024-07-01T11:00:00Z",
  "loop": false,
  "video_ids": [
    17800,
    17801
  ],
  "client_user_id": 2876,
  "countdown": true,
  "playlist_type": "live"
}'
{
  "name": "Playlist: Webinar 'Onboarding for new employees on working with the corporate portal'",
  "active": true,
  "start_time": "2024-07-01T11:00:00Z",
  "loop": false,
  "video_ids": [
    17800,
    17801
  ],
  "client_user_id": 2876,
  "countdown": true,
  "playlist_type": "live"
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

playlist_id
integer
required

Playlist ID.
IDs of all created playlists can be received via Get All Playlists request

Body

application/json
name
string

Playlist name

client_id
integer

Current playlist client ID

active
boolean
default:true

Enables/Disables playlist. Has two possible values:

  • true – Playlist can be played.
  • false – Playlist is disabled. No broadcast while it's desabled.
start_time
string

Playlist start time. Playlist won't be available before the specified time. Datetime in ISO 8601 format.

loop
boolean
default:false

Enables/Disables playlist loop

video_ids
integer[]

A list of VOD IDs included in the playlist. Order of videos in a playlist reflects the order of IDs in the array. Maximum video limit = 128.

client_user_id
integer

Custom field where you can specify user ID in your system

ad_id
integer

The advertisement ID that will be inserted into the video

player_id
integer

The player ID with which the video will be played

countdown
boolean

Enables countdown before playlist start with playlist_type: live

playlist_type
enum<string>

Determines whether the playlist:

  • live - playlist for live-streaming
  • vod - playlist is for video on demand access
Available options:
live,
vod
hls_url
string

A URL to a master playlist HLS (master.m3u8) with MPEG TS container.

This URL is a link to the main manifest. But you can also manually specify suffix-options that will allow you to change the manifest to your request: /playlists/{`client_id`}_{`playlist_id`}/master[-cmaf][-min-N][-max-N][-img][-(h264|hevc|av1)].m3u8 Please see the details in hls_url attribute of /videos/{id} method.

Caution. Solely master.m3u8 (and master[-options].m3u8) is officially documented and intended for your use. Any additional internal manifests, sub-manifests, parameters, chunk names, file extensions, and related components are internal infrastructure entities. These may undergo modifications without prior notice, in any manner or form. It is strongly advised not to store them in your database or cache them on your end.

hls_cmaf_url
string

A URL to a master playlist HLS (master-cmaf.m3u8) with CMAF-based chunks. Chunks are in fMP4 container.

It is possible to use the same suffix-options as described in the "hls_url" attribute.

Caution. Solely master.m3u8 (and master[-options].m3u8) is officially documented and intended for your use. Any additional internal manifests, sub-manifests, parameters, chunk names, file extensions, and related components are internal infrastructure entities. These may undergo modifications without prior notice, in any manner or form. It is strongly advised not to store them in your database or cache them on your end.

iframe_url
string

A URL to a built-in HTML video player with the video inside. It can be inserted into an iframe on your website and the video will automatically play in all browsers. The player can be opened or shared via this direct link. Also the video player can be integrated into your web pages using the Iframe tag.

Please see the details in iframe_url attribute of /videos/{id} method.

Response

200 - application/json

Successful

name
string

Playlist name

client_id
integer

Current playlist client ID

active
boolean
default:true

Enables/Disables playlist. Has two possible values:

  • true – Playlist can be played.
  • false – Playlist is disabled. No broadcast while it's desabled.
start_time
string

Playlist start time. Playlist won't be available before the specified time. Datetime in ISO 8601 format.

loop
boolean
default:false

Enables/Disables playlist loop

video_ids
integer[]

A list of VOD IDs included in the playlist. Order of videos in a playlist reflects the order of IDs in the array. Maximum video limit = 128.

client_user_id
integer

Custom field where you can specify user ID in your system

ad_id
integer

The advertisement ID that will be inserted into the video

player_id
integer

The player ID with which the video will be played

countdown
boolean

Enables countdown before playlist start with playlist_type: live

playlist_type
enum<string>

Determines whether the playlist:

  • live - playlist for live-streaming
  • vod - playlist is for video on demand access
Available options:
live,
vod
hls_url
string

A URL to a master playlist HLS (master.m3u8) with MPEG TS container.

This URL is a link to the main manifest. But you can also manually specify suffix-options that will allow you to change the manifest to your request: /playlists/{`client_id`}_{`playlist_id`}/master[-cmaf][-min-N][-max-N][-img][-(h264|hevc|av1)].m3u8 Please see the details in hls_url attribute of /videos/{id} method.

Caution. Solely master.m3u8 (and master[-options].m3u8) is officially documented and intended for your use. Any additional internal manifests, sub-manifests, parameters, chunk names, file extensions, and related components are internal infrastructure entities. These may undergo modifications without prior notice, in any manner or form. It is strongly advised not to store them in your database or cache them on your end.

hls_cmaf_url
string

A URL to a master playlist HLS (master-cmaf.m3u8) with CMAF-based chunks. Chunks are in fMP4 container.

It is possible to use the same suffix-options as described in the "hls_url" attribute.

Caution. Solely master.m3u8 (and master[-options].m3u8) is officially documented and intended for your use. Any additional internal manifests, sub-manifests, parameters, chunk names, file extensions, and related components are internal infrastructure entities. These may undergo modifications without prior notice, in any manner or form. It is strongly advised not to store them in your database or cache them on your end.

iframe_url
string

A URL to a built-in HTML video player with the video inside. It can be inserted into an iframe on your website and the video will automatically play in all browsers. The player can be opened or shared via this direct link. Also the video player can be integrated into your web pages using the Iframe tag.

Please see the details in iframe_url attribute of /videos/{id} method.