Skip to content

Create an image

PUT/v1/media/images

PUT
/v1/media/images
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.

Media typeapplication/json

Create a media image from a completed upload.

object
uploadId
required

The uploadId from the POST …/uploads route of the same image.

number format: double
name
required

Name of the image in the dashboard Media section.

string
>= 1 characters <= 255 characters
Examplegenerated
{
"uploadId": 1,
"name": "example"
}

Ok

Media typeapplication/json
object
id
required

Entity identifier

integer format: int32
>= 1
name
required
string
url
required

Public CDN URL of the image. It does not change and does not expire.

string
width
required

Width in pixels, if known.

number format: double
nullable
height
required

Height in pixels, if known.

number format: double
nullable
Examplegenerated
{
"id": 1,
"name": "example",
"url": "example",
"width": 1,
"height": 1
}

Request is invalid

Media typeapplication/json
object
message
required
string
details
required
object
key
additional properties
Examplegenerated
{
"message": "example",
"details": {
"additionalProperty": "example"
}
}

Missing or invalid api key

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Api key provides insufficient access for the request

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Image not found

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Organization has made too many requests

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

An unexpected error has occured. If problems persist please contact support

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}