Skip to content

Download a stored variant by hash

GET
/storage/objects/{hash}/variants/{variant}

Meant to return a named variant, such as preview, of the bytes stored under a hash. It doesn’t work at the moment: a signed-in request gets a plain-text 500 instead of the variant or a 404.

A request with no session or token still gets 401. The other responses below describe the intended behavior, the same as GET /storage/objects/{hash} but for a variant.

{variant} is a single path segment, so keys that contain a slash, such as hls/master.m3u8, don’t match this route. For an asset’s variants, use GET /assets/{id}/variants/{variant}, which also checks the asset’s access rules.

hash
required
string
/^[0-9a-f]{64}$/

The bytes’ SHA-256, as 64 lowercase hex characters (the hash an upload returns).

variant
required
string

The variant’s key, such as preview or screen. It has to be a single path segment.

Range
string

Optional. bytes=start-end or bytes=start- asks for part of the variant.

The whole variant.

string format: binary

The requested range of the variant.

string format: binary

Authentication required, missing, or invalid

object
error
required

Human-readable error summary

string
Example
the request could not be completed
Example
{
"error": "authentication required: sign in and retry with a valid session or API token"
}

Resource not found

object
error
required

Human-readable error summary

string
Example
the request could not be completed