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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The asset’s id.
Responses
Section titled “ Responses ”The alternates, newest first. An empty array if there are none.
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
The alternate’s id, used to download or remove it. Replacing an alternate gives it a new one.
The alternate’s name, unique for its asset.
Example
walk — team-green paletteA free-form tag, such as palette_swap, thumbnail, low_res,
authored or transcode; authored when none was given.
Example
palette_swapThe media type sent in X-Content-Type at upload, recorded as given. Downloads don’t use it.
Example
image/pngThe file’s size in bytes.
Left out for alternates attached on this instance, which is currently all of them.
The account that uploaded this alternate, or null if none was recorded.
When the alternate was attached. Lists are sorted by it, newest first.
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
Authentication required, missing, or invalid
object
Human-readable error summary
Example
the request could not be completedExample
{ "error": "authentication required: sign in and retry with a valid session or API token"}Resource not found
object
Human-readable error summary
Example
the request could not be completed