Update a game plan
PATCH/v2/game-plans/{gamePlanId}
const url = 'https://api.ligr.live/rest/v2/game-plans/1';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","playlistOrder":[1]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.ligr.live/rest/v2/game-plans/1 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "playlistOrder": [ 1 ] }'Beta. This operation can change between minor versions. See Beta status.
Renames a game plan, reorders its playlists, or both. playlistOrder lists playlist ids of
this plan in the new order. The request applies both changes or neither.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Entity identifier
Request Bodyrequired
Section titled “Request Bodyrequired”object
Playlist ids of this plan in the new order. Each id must belong to the plan.
Examplegenerated
{ "name": "example", "playlistOrder": [ 1 ]}Responses
Section titled “Responses”Ok
Playlists in plan order, then the triggers of the plan.
object
Entity identifier
Entity identifier
ISO 8601. Changes when the plan, one of its playlists or one of its triggers changes.
A playlist of a game plan. A live playlist runs on live triggers. A break playlist runs on break triggers.
object
Entity identifier
1 is the highest priority.
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
Unique inside the playlist. Use a UUID.
The label the dashboard shows.
For graphic, the graphic name. For action, the action, for example action:hideAll or
action:hide:<graphic code>.
Seconds after the playlist starts. Inside a group, seconds after the group starts.
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" } }.
UUID of the graphic a graphic step shows.
Stable UUID that an action step names in hideTargetUuid.
transitionUuid of the step that this hide action removes.
The control variables of the graphic, as the dashboard stores them. An array of JSON objects.
The ad file of an advertisement step, as a JSON object.
The media item of a multimedia step, as a JSON object.
True when a group step repeats.
Seconds the step stays on screen.
The content type of a group step.
The control variable that a group step uses for its ads.
Position of the playlist in the plan. Null until the plan is reordered.
object
Entity identifier
The playlist the trigger runs.
The event that fires the trigger. A live trigger uses a fact code such as GOAL or YELLOW_CARD.
A break trigger uses a break code such as aboutToStart, playersEntering or timeTrigger.
Extra conditions, as a JSON object. For example { "corners": { "team": 3 } }.
Example
{ "sport": "football", "playlists": [ { "scope": "break", "transitions": [ { "type": "action", "groupVariant": "graphic" } ] } ], "triggers": [ { "type": "live", "group": "pregame" } ]}Request is invalid
object
object
Examplegenerated
{ "message": "example", "details": { "additionalProperty": "example" }}Missing or invalid api key
object
Examplegenerated
{ "message": "example"}Api key provides insufficient access for the request
object
Examplegenerated
{ "message": "example"}Game plan, theme, playlist or trigger not found
object
Examplegenerated
{ "message": "example"}Organization has made too many requests
object
Examplegenerated
{ "message": "example"}An unexpected error has occured. If problems persist please contact support
object
Examplegenerated
{ "message": "example"}