Create a theme
POST/v2/themes
const url = 'https://api.ligr.live/rest/v2/themes';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","sports":["football"],"variables":[{"id":"example","name":"example","type":"string","defaultValue":"example","description":"example","enumOptions":["example"],"isStyle":true}],"requireRiveSource":true,"rendererRelease":{"policy":"latest","release":"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/themes \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "sports": [ "football" ], "variables": [ { "id": "example", "name": "example", "type": "string", "defaultValue": "example", "description": "example", "enumOptions": [ "example" ], "isStyle": true } ], "requireRiveSource": true, "rendererRelease": { "policy": "latest", "release": "example" } }'Beta. This operation can change between minor versions. See Beta status.
Creates a theme your organization owns. The theme appears on the Themes page of the dashboard and in the competition theme picker as soon as it exists. Your organization can own up to five themes.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Body of POST /v2/themes.
object
Sport keys the theme supports, for example ["football"]. At least one.
Theme variables the graphics can read. Default: none.
A theme variable an operator sets per competition: a colour, a label or a sponsor name.
object
Use the same string as name.
Unique within the theme.
The value in force when a competition sets nothing.
Required for enum, at least one option.
True when the variable holds a colour, a font or another style value.
Refuse Rive imports without editable source (.rev or project ZIP). Default: false.
A Rive renderer release choice of a theme, or of one graphic. A graphic without one follows its theme.
object
The release for pinned, for example 2.41.0-r1.
Responses
Section titled “Responses”Created
object
Entity identifier
Sport keys the theme supports, for example football.
Theme version the overlays render. Null means no version is active.
Published theme version numbers, in ascending order.
object
Stable graphic identifier. It does not change between versions.
code or rive.
Version number of the editable working copy.
Published version numbers, in ascending order.
True when every Rive import must carry editable source (.rev or project ZIP).
A Rive renderer release choice of a theme, or of one graphic. A graphic without one follows its theme.
object
The release for pinned, for example 2.41.0-r1.
True when every organization can use the theme. Only LIGR staff change it, in the dashboard.
Example
{ "rendererRelease": { "policy": "latest" }}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 not found
object
Examplegenerated
{ "message": "example"}Your organization owns as many themes as it can create
Body of a 409 answer when the organization owns as many themes as it can create.
code is always THEME_LIMIT_REACHED.
object
Examplegenerated
{ "message": "example", "code": "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"}