Skip to content

Create a primary watermark upload

POST/v1/competitions/{competitionId}/watermark/uploads

POST
/v1/competitions/{competitionId}/watermark/uploads
curl --request POST \
--url https://api.ligr.live/rest/v1/competitions/1/watermark/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "contentType": "image/png", "size": 1, "sha256": "example" }'

Opens a signed upload for the competition primary watermark. Declare the exact PNG or JPEG file you will send. Upload the bytes with one PUT to url and send headers with it. Then send uploadId to PUT /v1/competitions/{competitionId}/watermark within one hour.

competitionId
required

Entity identifier

integer format: int32
>= 1

The competition id

Media typeapplication/json

Declare the exact image file you will upload.

object
contentType
required
string
Allowed values: image/png image/jpeg
size
required

Byte count of the file. The limit is 500 KB.

integer format: int32
>= 1 <= 500000
sha256
required

Lowercase hexadecimal SHA-256 of the exact bytes you will PUT.

string

Created

Media typeapplication/json
object
uploadId
required

Send it as uploadId to the PUT route of the same image.

number format: double
url
required

Signed URL for one PUT of the exact bytes.

string
expiresAt
required

Time after which url no longer accepts the PUT.

string
headers
required
object
x-amz-checksum-sha256
required

Base64 SHA-256 of the file. Send it unchanged with the PUT.

string
Examplegenerated
{
"uploadId": 1,
"url": "example",
"expiresAt": "example",
"headers": {
"x-amz-checksum-sha256": "example"
}
}

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"
}

Competition 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"
}