Create an image upload
POST/v2/themes/{themeId}/rive-graphics/images
POST
/v2/themes/{themeId}/rive-graphics/images
const url = 'https://api.ligr.live/rest/v2/themes/1/rive-graphics/images';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"filename":"example","size":1,"sha256":"example","contentType":"image/png"}'};
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/images \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "filename": "example", "size": 1, "sha256": "example", "contentType": "image/png" }'Beta. This operation can change between minor versions. See Beta status.
Creates a signed upload session for one image.
Upload the exact bytes with a single PUT to url, and send headers.
Then supply fileId to a Rive asset or an asset exposure of this theme.
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
filename
required
string
size
required
integer format: int32
sha256
required
Lowercase hexadecimal SHA-256 of the exact bytes you will PUT.
string
contentType
required
string
Responses
Section titled “Responses”Created
Media typeapplication/json
object
fileId
required
Numeric file id. Send it as fileId to PUT …/assets/{id}/file,
or as defaultFileId on an asset exposure.
number format: double
url
required
string
expiresAt
required
string
headers
required
object
x-amz-checksum-sha256
required
string
Examplegenerated
{ "fileId": 1, "url": "example", "expiresAt": "example", "headers": { "x-amz-checksum-sha256": "example" }}