Copy a graphic across themes
POST/v2/themes/{themeId}/rive-graphics/copies
POST
/v2/themes/{themeId}/rive-graphics/copies
const url = 'https://api.ligr.live/rest/v2/themes/1/rive-graphics/copies';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"sourceThemeId":1,"sourceGraphicId":"example","name":"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/1/rive-graphics/copies \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "sourceThemeId": 1, "sourceGraphicId": "example", "name": "example" }'Beta. This operation can change between minor versions. See Beta status.
Copy a working Rive graphic from another theme into this theme, under a new name. The copy keeps the control variables, data bindings, user expressions, assets, schemas and settings. If its expressions use theme variables, add those variables to this theme first.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”themeId
required
number format: double
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
sourceThemeId
required
integer format: int32
sourceGraphicId
required
string
name
required
string
Examplegenerated
{ "sourceThemeId": 1, "sourceGraphicId": "example", "name": "example"}Responses
Section titled “Responses”Created
Media typeapplication/json
object
graphicId
required
string
themeId
required
integer format: int32
Examplegenerated
{ "graphicId": "example", "themeId": 1}Invalid Rive request
Media typeapplication/json
object
message
required
string
code
required
string
Examplegenerated
{ "message": "example", "code": "example"}Theme, import, graphic, version, or file not found
Media typeapplication/json
object
message
required
string
code
required
string
Examplegenerated
{ "message": "example", "code": "example"}Rive import or graphic state conflict
Media typeapplication/json
object
message
required
string
code
required
string
Examplegenerated
{ "message": "example", "code": "example"}Rive candidate or source is no longer available
Media typeapplication/json
object
message
required
string
code
required
string
Examplegenerated
{ "message": "example", "code": "example"}Rive file or configuration cannot be used
Media typeapplication/json
object
message
required
string
code
required
string
Examplegenerated
{ "message": "example", "code": "example"}Rive source imports are unavailable
Media typeapplication/json
object
message
required
string
code
required
string
Examplegenerated
{ "message": "example", "code": "example"}