Prepare an import
POST/v2/themes/{themeId}/rive-graphics/imports/{jobId}/prepare
const url = 'https://api.ligr.live/rest/v2/themes/1/rive-graphics/imports/example/prepare';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"versionId":"example","repair":true}'};
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/rive-graphics/imports/example/prepare \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "versionId": "example", "repair": true }'Beta. This operation can change between minor versions. See Beta status.
Seal the uploaded object version and start native Rive preparation.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Exact opaque object version returned by the upload response headers.
Apply the proven repair for stale references to deleted items in an editable source. The uploaded file stays unchanged. Ignored for runtime files.
Examplegenerated
{ "versionId": "example", "repair": true}Responses
Section titled “Responses”Accepted
object
object
What is wrong with the file and what to do, when the import knows more than the code.
object
Where the problem is in the Rive editor, for example Clock › State Machine 1 › Layer 1 › Any State → HT.
The repair offer for stale references to deleted items, when the source is an editable .rev.
object
object
reference-cleared, leftover-removed or editor-field-cleared.
The Rive object type, or * for a group of mixed types.
Where the repair is in the Rive editor. Null for leftovers outside any artboard.
Up to 20 specific places inside the location, for example a transition.
True only when every compile problem has a proven repair. Then POST imports/{jobId}/repair applies it.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
True when the import was asked to apply the proven repair.
What the repair changed, once the import is ready. The uploaded file stays unchanged.
object
object
reference-cleared, leftover-removed or editor-field-cleared.
The Rive object type, or * for a group of mixed types.
Where the repair is in the Rive editor. Null for leftovers outside any artboard.
Up to 20 specific places inside the location, for example a transition.
Example
{ "status": "uploading", "candidates": [ { "kind": "runtime" } ], "metadata": { "artboards": [ { "stateMachines": [ { "inputs": [ { "type": "boolean" } ] } ] } ], "viewModels": [ { "defaultInstanceBindings": [ { "list": { "resolution": "resolved" } } ], "instances": [ { "bindings": [ { "list": { "resolution": "resolved" } } ] } ] } ], "assets": [ { "type": "image" } ] }}Invalid Rive request
object
Examplegenerated
{ "message": "example", "code": "example"}Theme, import, graphic, version, or file not found
object
Examplegenerated
{ "message": "example", "code": "example"}Rive import or graphic state conflict
object
Examplegenerated
{ "message": "example", "code": "example"}Rive candidate or source is no longer available
object
Examplegenerated
{ "message": "example", "code": "example"}Rive file or configuration cannot be used
object
Examplegenerated
{ "message": "example", "code": "example"}Rive source imports are unavailable
object
Examplegenerated
{ "message": "example", "code": "example"}