PATCH
/
streaming
/
broadcasts
/
{broadcast_id}
Change broadcast
curl --request PATCH \
  --url https://api.gcore.com/streaming/broadcasts/{broadcast_id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "broadcast": {
    "name": "Broadcast",
    "status": "live",
    "share_url": "",
    "custom_iframe_url": "",
    "show_dvr_after_finish": true,
    "ad_id": 1,
    "player_id": 14,
    "stream_ids": [
      10
    ]
  }
}'
{
  "name": "Broadcast",
  "status": "live",
  "share_url": "",
  "custom_iframe_url": "",
  "show_dvr_after_finish": true,
  "ad_id": 1,
  "player_id": 14,
  "stream_ids": [
    10
  ]
}

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

broadcast_id
integer
required

Broadcast ID.
IDs of all created broadcasts can be received via Get All Broadcasts request

Body

application/json
broadcast
object
Example:
{
  "name": "Broadcast",
  "status": "live",
  "share_url": "",
  "custom_iframe_url": "",
  "show_dvr_after_finish": true,
  "ad_id": 1,
  "player_id": 14,
  "stream_ids": [10]
}

Response

Successful

name
string
required

Broadcast name

status
string

Broadcast statuses:
Pending — default “Broadcast isn’t started yet” or custom message (see pending_message parameter) is shown, users don't see the live stream
Live — broadcast is live, and viewers can see it
Paused — “Broadcast is paused” message is shown, users don't see the live stream
Finished — “Broadcast is finished” message is shown, users don't see the live stream
The users' browsers start displaying the message/stream immediately after you change the broadcast status

share_url
string

Custom URL or iframe displayed in the link field when a user clicks on a sharing button in player. If empty, the link field and social network sharing is disabled

custom_iframe_url
string

Custom URL of iframe for video player to be shared via sharing button in player. Auto generated iframe URL is provided by default

show_dvr_after_finish
boolean

Regulates if a DVR record is shown once a broadcast is finished. Has two possible values:

  • true — record is shown

  • false — record isn't shown

Default is false

pending_message
string

A custom message that is shown if broadcast status is set to pending. If empty, a default message is shown

ad_id
integer

ID of ad to be displayed in a live stream. If empty the default ad is show. If there is no default ad, no ad is shown

player_id
integer

ID of player to be used with a broadcast. If empty the default player is used

stream_ids
integer[]

IDs of streams used in a broadcast

poster
string

Uploaded poster file