Rebuild an asset's previews
POST /assets/{id}/preview
Queues the jobs that rebuild an asset’s previews and thumbnails, for
example after attaching textures to a 3D model or after a fix to a
preview worker. The answer is a 202 with the job’s id and type;
follow it with GET /jobs/{id}. A 202 means the work was queued,
not that it has finished.
The job type follows the file’s extension. A video gets two separate jobs, a poster job at high priority and the full video job at a lower one; neither waits for the other, and the response names the full one. Each request queues new jobs, even when earlier ones are still waiting.
By default (force true) the jobs rebuild the previews. With
force false they may reuse outputs that already exist. Neither
setting makes sure every output is rebuilt or repaired: a job can
finish with some outputs missing or left as they were. An archive
has no preview images: its job reads the list of files inside again,
whatever force says. Old outputs aren’t deleted first and each
file is replaced as it’s written, so a run that fails partway can
leave a mix of old and new previews.
You need to be signed in, and any account can do this for any asset
that isn’t in the trash: ownership and edit rights aren’t checked. A
400 means the asset record has no linked file or its file extension
has no preview type; the stored file itself isn’t read until the job
runs. A force that isn’t true or false, or an id that isn’t a
UUID, gets a plain-text 400; server errors get a plain-text 500, not
the JSON shown, and if queueing fails after the poster job, that job
stays queued.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The asset’s id.
Query Parameters
Section titled “Query Parameters ”true (the default) asks for the previews to be rebuilt; false
lets the job reuse outputs that already exist. Either way some
outputs can end up missing or unchanged.
Responses
Section titled “ Responses ”The jobs were queued.
object
The force value the jobs were queued with.
Malformed request
object
Human-readable error summary
Example
the request could not be completedAuthentication 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 completedUnexpected server error
object
Human-readable error summary
Example
the request could not be completed