Set the default image
PUT/v1/image-templates/{imageTemplateId}/default-image
const url = 'https://api.ligr.live/rest/v1/image-templates/1/default-image';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"uploadId":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.ligr.live/rest/v1/image-templates/1/default-image \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "uploadId": 1 }'Sets the default image of a template from a completed upload. The API checks the size, the SHA-256, the image type and the pixel size of the bytes. Each upload sets a default image one time. The response has the same shape as an item of GET /v1/image-templates.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Entity identifier
The image template id
Request Bodyrequired
Section titled “Request Bodyrequired”Set the default image from a completed upload.
object
The uploadId from the POST …/uploads route of the same image.
Examplegenerated
{ "uploadId": 1}Responses
Section titled “Responses”Ok
One image slot, such as a player cut-out or a team banner, with a fixed pixel size. Each player, team or competition of the entity type can hold one image for the template.
object
Entity identifier
Pixel width every image of the template must have.
Pixel height every image of the template must have.
The kind of entity a template holds one image for.
URL of the default image. Null: the template has no default image.
File id of the default image. Send it as defaultFileId on a Rive asset exposure to use it as the fallback image.
Null: the template has no default image.
Example
{ "entityType": "player", "sport": "football"}Request is invalid
object
object
Examplegenerated
{ "message": "example", "details": { "additionalProperty": "example" }}Missing or invalid api key
object
Examplegenerated
{ "message": "example"}Api key provides insufficient access for the request
object
Examplegenerated
{ "message": "example"}Image template not found
object
Examplegenerated
{ "message": "example"}Organization has made too many requests
object
Examplegenerated
{ "message": "example"}An unexpected error has occured. If problems persist please contact support
object
Examplegenerated
{ "message": "example"}