Skip to content

Publish a graphic version

POST/v2/themes/{themeId}/code-graphics/{graphicId}/versions

POST
/v2/themes/{themeId}/code-graphics/{graphicId}/versions
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.

themeId
required

Entity identifier

integer format: int32
>= 1

The theme identifier

graphicId
required
string

The graphic identifier

Created

Media typeapplication/json
object
version
required

The graphic version this request published.

integer format: int32
Examplegenerated
{
"version": 1
}

The code graphic breaks a rule

Media typeapplication/json

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
message
required
string
code
required
string
details
required
Array<string>
Examplegenerated
{
"message": "example",
"code": "example",
"details": [
"example"
]
}

Missing or invalid api key

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Api key provides insufficient access for the request

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Theme or graphic not found

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

The graphic is locked by another editor

Media typeapplication/json

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
message
required
string
code
required
string
holder
required
object
userName
required

Name of the lock holder. An API key shows as API key <name>.

string
Examplegenerated
{
"message": "example",
"code": "example",
"holder": {
"userName": "example"
}
}

Api key has made too many requests

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

An unexpected error has occured. If problems persist please contact support

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}