Skip to content

Add a playlist

POST/v2/game-plans/{gamePlanId}/playlists

POST
/v2/game-plans/{gamePlanId}/playlists
curl --request POST \
--url https://api.ligr.live/rest/v2/game-plans/1/playlists \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "scope": "break", "priority": 1, "guard": [ "example" ], "transitions": [ { "id": "example", "type": "action", "name": "example", "code": "example", "offset": 1, "desiredState": "example", "graphicUuid": "example", "transitionUuid": "example", "hideTargetUuid": "example", "controlVariables": "example", "adFile": "example", "multi": "example", "loop": true, "duration": 1, "groupVariant": "graphic", "advertisementControlVariable": "example", "children": [] } ] }'

Beta. This operation can change between minor versions. See Beta status.

Adds a playlist to the end of a game plan. A live trigger needs a live playlist; a break trigger needs a break playlist.

gamePlanId
required

Entity identifier

integer format: int32
>= 1
Media typeapplication/json

scope defaults to break, and a live trigger needs a live playlist. priority defaults to 2.

object
name
required
string
>= 1 characters <= 255 characters
scope
string
Allowed values: break live
priority
integer format: int32
>= 1
guard
Array<string>
transitions
Array<object>

One step of a playlist. The overlay runs the steps in offset order.

desiredState, controlVariables, adFile and multi are JSON that the dashboard writes for each graphic, ad or media item. Their keys depend on the graphic, so LIGR stores them as sent. Read a playlist that the dashboard built to see the keys for your graphics.

object
id
required

Unique inside the playlist. Use a UUID.

string
type
required
string
Allowed values: action graphic multimedia advertisement adTemplate group
name
required

The label the dashboard shows.

string
code
required

For graphic, the graphic name. For action, the action, for example action:hideAll or action:hide:<graphic code>.

string
offset
required

Seconds after the playlist starts. Inside a group, seconds after the group starts.

number format: double
desiredState

What the step shows or hides, as a JSON object. A graphic step reads variableValues, updateType (update or set) and guard, for example { "updateType": "update", "variableValues": { "StatOne": "shots" } }.

graphicUuid

UUID of the graphic a graphic step shows.

string
nullable
transitionUuid

Stable UUID that an action step names in hideTargetUuid.

string
hideTargetUuid

transitionUuid of the step that this hide action removes.

string
controlVariables

The control variables of the graphic, as the dashboard stores them. An array of JSON objects.

adFile

The ad file of an advertisement step, as a JSON object.

multi

The media item of a multimedia step, as a JSON object.

loop

True when a group step repeats.

boolean
duration

Seconds the step stays on screen.

number format: double
groupVariant

The content type of a group step.

string
Allowed values: graphic multimedia advertisement adTemplate
advertisementControlVariable

The control variable that a group step uses for its ads.

string
children
Array<object> recursive

Created

Media typeapplication/json

A playlist of a game plan. A live playlist runs on live triggers. A break playlist runs on break triggers.

object
id
required

Entity identifier

integer format: int32
>= 1
name
required
string
scope
required
string
Allowed values: break live
priority
required

1 is the highest priority.

number format: double
guard
required
Array<string>
transitions
required
Array<object>

One step of a playlist. The overlay runs the steps in offset order.

desiredState, controlVariables, adFile and multi are JSON that the dashboard writes for each graphic, ad or media item. Their keys depend on the graphic, so LIGR stores them as sent. Read a playlist that the dashboard built to see the keys for your graphics.

object
id
required

Unique inside the playlist. Use a UUID.

string
type
required
string
Allowed values: action graphic multimedia advertisement adTemplate group
name
required

The label the dashboard shows.

string
code
required

For graphic, the graphic name. For action, the action, for example action:hideAll or action:hide:<graphic code>.

string
offset
required

Seconds after the playlist starts. Inside a group, seconds after the group starts.

number format: double
desiredState

What the step shows or hides, as a JSON object. A graphic step reads variableValues, updateType (update or set) and guard, for example { "updateType": "update", "variableValues": { "StatOne": "shots" } }.

graphicUuid

UUID of the graphic a graphic step shows.

string
nullable
transitionUuid

Stable UUID that an action step names in hideTargetUuid.

string
hideTargetUuid

transitionUuid of the step that this hide action removes.

string
controlVariables

The control variables of the graphic, as the dashboard stores them. An array of JSON objects.

adFile

The ad file of an advertisement step, as a JSON object.

multi

The media item of a multimedia step, as a JSON object.

loop

True when a group step repeats.

boolean
duration

Seconds the step stays on screen.

number format: double
groupVariant

The content type of a group step.

string
Allowed values: graphic multimedia advertisement adTemplate
advertisementControlVariable

The control variable that a group step uses for its ads.

string
children
Array<object> recursive
sortOrder
required

Position of the playlist in the plan. Null until the plan is reordered.

integer format: int32
nullable
Example
{
"scope": "break",
"transitions": [
{
"type": "action",
"groupVariant": "graphic"
}
]
}

Request is invalid

Media typeapplication/json
object
message
required
string
details
required
object
key
additional properties
Examplegenerated
{
"message": "example",
"details": {
"additionalProperty": "example"
}
}

Missing or invalid api key

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Api key provides insufficient access for the request

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Game plan, theme, playlist or trigger not found

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Organization has made too many requests

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

An unexpected error has occured. If problems persist please contact support

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}