Create an image
PUT/v1/media/images
const url = 'https://api.ligr.live/rest/v1/media/images';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"uploadId":1,"name":"example"}'};
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/media/images \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "uploadId": 1, "name": "example" }'Creates a media image from a completed upload. The API checks the size, the SHA-256 and the image type
of the bytes. The image appears in the dashboard Media section. Each upload creates one image.
Use url wherever a row needs a hosted image, for example a crest column in a data source.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Create a media image from a completed upload.
object
The uploadId from the POST …/uploads route of the same image.
Name of the image in the dashboard Media section.
Examplegenerated
{ "uploadId": 1, "name": "example"}Responses
Section titled “Responses”Ok
object
Entity identifier
Public CDN URL of the image. It does not change and does not expire.
Width in pixels, if known.
Height in pixels, if known.
Examplegenerated
{ "id": 1, "name": "example", "url": "example", "width": 1, "height": 1}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 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"}