Create a preset
POST/v2/control-rooms/{roomId}/presets
const url = 'https://api.ligr.live/rest/v2/control-rooms/1/presets';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"sectionId":"example","graphicId":"example","name":"example","variableValues":{"additionalProperty":"example"},"exposeVariables":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.ligr.live/rest/v2/control-rooms/1/presets \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "sectionId": "example", "graphicId": "example", "name": "example", "variableValues": { "additionalProperty": "example" }, "exposeVariables": [ "example" ] }'Beta. This operation can change between minor versions. See Beta status.
Values use control-variable names from the active published code or Rive graphic manifest. Values support string, number, boolean, and enum variables. Use exposeVariables to show fact, stat, team, player and match variables that operators set live. The overlay controls the reserved hide variable.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Entity identifier
Request Bodyrequired
Section titled “Request Bodyrequired”object
Identifier returned when creating or reading a section of this room.
Stable graphic UUID from the theme’s code or Rive graphics.
Names of control variables to expose in the control room without a value. Use this for fact, stat, team, player and match variables; operators pick the value live.
Examplegenerated
{ "sectionId": "example", "graphicId": "example", "name": "example", "variableValues": { "additionalProperty": "example" }, "exposeVariables": [ "example" ]}Responses
Section titled “Responses”Created
Use the returned id as presetId with the overlay control-room graphics endpoint.
object
Entity identifier
Entity identifier
Every control variable operators can see on this preset, with or without a stored value.
Examplegenerated
{ "id": 1, "controlRoomId": 1, "sectionId": "example", "graphicId": "example", "name": "example", "orderIndex": 1, "variableValues": { "additionalProperty": "example" }, "exposedVariables": [ "example" ]}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"}Theme, control room, section, or graphic not found
object
Examplegenerated
{ "message": "example"}Api key has made too many requests
object
Examplegenerated
{ "message": "example"}An unexpected error has occured. If problems persist please contact support
object
Examplegenerated
{ "message": "example"}