Complete upload

POST /assets/{assetId}/complete

Marks the asset as readable. Returns a 422 error if the associated file has not been uploaded or if the checksum, content type, or size do not match the expected values.

This operation must be called within 60 minutes of asset creation. After that deadline, the asset is considered expired and will be automatically deleted.

Path parameters

assetIdstring✻

format: uuid

Documentation

Example
"cf0102d1-3d48-4467-9887-da4d390267c6"

Query parameters

appIdstring

The app the asset is expected to belong to. Only used (and required) when authenticating with the
trustedServiceWithUser security scheme, which has no app of its own — used to keep the operation
app-scoped for that scheme, the same as it already is for accessToken. Ignored when authenticating
with accessToken, whose own app is used instead.

format: uuid

Documentation

Example
"3f483b7c-ae82-44ac-94f1-0820861fef29"

Responses

    200OK

Content application/json

Documentation

Properties

idstring✻

format: uuid

Documentation

Example
"cf0102d1-3d48-4467-9887-da4d390267c6"

appIdstring✻

format: uuid

Documentation

Example
"3f483b7c-ae82-44ac-94f1-0820861fef29"

userIdstring✻

format: uuid

Documentation

Example
"3f483b7c-ae82-44ac-94f1-0820861fef29"

storageKeystring✻

The unique storage key for the asset.

Documentation

Example
"3a7cf05d-1416-4dc6-8531-2e18037e7f1f"

checksumstring✻

The base64 encoded, 256-bit SHA256 digest of the asset file.

44..44 characters

Documentation

Example
"PMn3M4bMd4BMeNhBEDZNQLYxOa6l0luM+IrDA3pZlpY="

contentTypestring✻

The MIME type of the asset file.

1..255 characters

Documentation

Examples
"application/pdf"
"image/png"

filenamestring✻

The name of the asset file.

1..255 characters

Documentation

Examples
"document.pdf"
"image.png"

sizeinteger✻

The size of the asset file in bytes. Must be a positive integer not exceeding 20 MiB.

<=20971520>=1

Documentation

Examples
1024
5242880

statusstring✻

The asset is fully uploaded and can be downloaded.

"readable"

Documentation

downloadUrlstring✻

A presigned URL for upload or download operations expiring after 60 minutes.

format: uri

Documentation

Example
"https://object-storage.hedia.com/bucket/key?X-Amz-Expires=3600&X-Amz-Signature=signature"

createdobject✻

Information about the creation of an entity.

Documentation

Properties

atstring✻

format: date-time

Documentation

Example
"2023-10-05T14:48:00.000Z"

byobject✻

Documentation

Properties

id✻

typestring✻

"app""system""user"

Documentation

updatedobject

Information about the update of an entity.

Documentation

Properties

atstring✻

format: date-time

Documentation

Example
"2023-10-05T14:48:00.000Z"

byobject✻

Documentation

Properties

id✻

typestring✻

"app""system""user"

Documentation

Security

Servers

    asset.hedia.comhttps://asset.hedia.com/api/v1