Skip to content

List an asset's alternate files

GET
/assets/{id}/alternates

Lists the alternate files attached to an asset, newest first. An alternate is another version of the asset itself, such as a palette swap of a sprite sheet, kept alongside the original.

An alternate stands on its own and is downloaded by itself, unlike a companion, which the main file needs in order to load. Alternates are files someone attached: the server doesn’t make them, and they’re separate from the variants it generates (GET /assets/{id}/variants/{variant}). In the web app, the Sprite Viewer saves its palette swaps here.

Any signed-in account can read the list for any asset that isn’t in the trash; the asset’s access rules aren’t checked. Replacing an alternate moves it to the top, since the replacement is new. Like the companion list, it’s cached per asset, so a deleted asset can keep returning its last list instead of 404. An id that isn’t a UUID gets a plain-text 400, and a database failure a plain-text 500.

id
required
string format: uuid

The asset’s id.

The alternates, newest first. An empty array if there are none.

Array<object>

A file attached to an asset as another version of it, such as a palette swap, under a label that is unique for that asset.

object
id
required

The alternate’s id, used to download or remove it. Replacing an alternate gives it a new one.

string format: uuid
asset_id
required
string format: uuid
label
required

The alternate’s name, unique for its asset.

string
Example
walk — team-green palette
kind
required

A free-form tag, such as palette_swap, thumbnail, low_res, authored or transcode; authored when none was given.

string
Example
palette_swap
content_type
required

The media type sent in X-Content-Type at upload, recorded as given. Downloads don’t use it.

string
Example
image/png
size_bytes
required

The file’s size in bytes.

integer format: int64
origin_server_id

Left out for alternates attached on this instance, which is currently all of them.

string format: uuid
nullable
created_by_user_ref
required

The account that uploaded this alternate, or null if none was recorded.

integer format: int64
nullable
created_at
required

When the alternate was attached. Lists are sorted by it, newest first.

string format: date-time
metadata
required

The JSON sent in X-Alternate-Metadata, or {} if none was sent. An object comes back as an object, though key order and spacing may change; other JSON comes back as {}, and null as null. The Sprite Viewer stores its colour remap here.

object
key
additional properties
any

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