Update a theme variable
PATCH/v2/themes/{themeId}/variables/{id}
const url = 'https://api.ligr.live/rest/v2/themes/1/variables/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"ifUnchangedSince":"example","type":"string","defaultValue":"example","description":"example","enumOptions":["example"],"isStyle":true}'};
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/themes/1/variables/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "ifUnchangedSince": "example", "type": "string", "defaultValue": "example", "description": "example", "enumOptions": [ "example" ], "isStyle": true }'Beta. This operation can change between minor versions. See Beta status.
Updates one theme variable. The request changes only the keys it names. The name never changes; delete the variable and create it again to rename it.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The theme identifier
The variable identifier
Request Bodyrequired
Section titled “Request Bodyrequired”Body of PATCH /v2/themes/{themeId}/variables/{id}. The name never changes; delete and create
a variable to rename it.
object
Responses
Section titled “Responses”Ok
Response of POST and PATCH on a theme variable.
updatedAt is the theme’s new updatedAt after this write. Send it back as
ifUnchangedSince on the next write, in place of a fresh list read.
object
Equal to name for a variable this API created.
The value in force when a competition sets nothing. Null means no default.
Allowed values of an enum variable. Null for the other types.
True when the variable holds a colour, a font or another style value.
Example
{ "type": "string"}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 or variable not found
object
Examplegenerated
{ "message": "example"}IfUnchangedSince no longer matches the theme
Body of a 409 answer when the caller’s ifUnchangedSince no longer matches.
code is always TARGET_CHANGED. Read the resource again and send the write once more.
object
Examplegenerated
{ "message": "example", "code": "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"}