Publish a graphic version
POST/v2/themes/{themeId}/code-graphics/{graphicId}/versions
const url = 'https://api.ligr.live/rest/v2/themes/1/code-graphics/example/versions';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
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/1/code-graphics/example/versions \ --header 'Authorization: Bearer <token>'Beta. This operation can change between minor versions. See Beta status.
Publishes the working copy as an immutable version and opens the next working copy. The response carries the published version number.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Entity identifier
The theme identifier
The graphic identifier
Responses
Section titled “Responses”Created
object
The graphic version this request published.
Examplegenerated
{ "version": 1}The code graphic breaks a rule
Body of a 400 answer for a code graphic the service refuses.
code is always CODE_GRAPHIC_INVALID. details lists every broken rule.
A malformed request body returns the ValidationError shape instead.
object
Examplegenerated
{ "message": "example", "code": "example", "details": [ "example" ]}Missing or invalid api key
object
Examplegenerated
{ "message": "example"}Api key provides insufficient access for the request
object
Examplegenerated
{ "message": "example"}Theme or graphic not found
object
Examplegenerated
{ "message": "example"}The graphic is locked by another editor
Body of a 409 answer. The graphic is open in another editor.
code is always LOCKED. holder is null when the lock expired between the check and the
answer.
object
object
Name of the lock holder. An API key shows as API key <name>.
Examplegenerated
{ "message": "example", "code": "example", "holder": { "userName": "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"}