Stream Assembly changes live
Streams Assembly status changes as Server-Sent Events.
{UPDATE_STREAM_URL}Use the update_stream_url capability URL from the validated Assembly response as the request destination. It does not use ambient API2 host credentials.
In the response after creating an Assembly you will find two fields for retrieving the
Assembly Status: assembly_ssl_url and update_stream_url. You can
fetch the current Assembly Status from the URL provided in
assembly_ssl_url. To obtain information about how the Assembly is progressing, you can
either poll that regularly, or subscribe to the update stream, which is described in this document.
Server-Sent Events
The update_stream_url property in the Assembly Status defines a URL, where the update
stream for the corresponding Assembly is available using server-sent events.
Server-sent events are a web technology for sending live notifications from the server to a client over HTTP. It is similar to Web Sockets, but only allows unidirectional messages from the server to the client and consists of a simple, text-based format.
While the Assembly is either in the uploading or executing state, a client can connect to
this endpoint by sending a GET request with the Accept: text/event-stream header field to the
URL specified in update_stream_url and parse the response stream. The server can send a mixture of
messages and events to the client. The difference between them is that events include an additional
payload with information, while messages don’t.
Multiple clients can subscribe to the same Assembly. Closing one connection leaves the others connected. During an uploader shutdown, existing streams close and new connections receive an empty HTTP 503 response. Fetch the current Assembly Status to check whether processing has ended.
Messages
A message consists of the message name and no additional payload. On the wire, a message with the
name assembly_finished looks like this ([NL] indicates a new line):
data: assembly_finished[NL]
[NL]
Transloadit sends the following messages:
assembly_upload_meta_data_extractedis emitted when all uploads are finished and the meta data has been extracted for all of them.assembly_uploading_finishedis emitted when all uploads for this Assembly have been finished and the Assembly transitions from the uploading into the executing state.assembly_finishedis emitted when the Assembly has ended, not necessarily when processing succeeded. It is also sent after cancellation or when connecting to an already-ended Assembly, including one that failed. The server ends the stream after this message. Fetchassembly_ssl_urland inspect the final status:ok: "ASSEMBLY_COMPLETED"indicates success,ok: "ASSEMBLY_CANCELED"indicates cancellation, anderrorindicates failure.pingis emitted periodically to keep the connection alive while the Assembly is being processed. It is currently sent every minute, although this interval might change in the future.
Events
An event consists of the event name and an additional payload. On the wire, an event with the name
assembly_result_finished looks like this ([NL] indicates a new line):
event: assembly_result_finished[NL]
data: ["avatar",{"id":"5789e06b48ad450aa55f9b3721376581","basename":"lesereihe","field":"file","md5hash":"e9df77e5ee87e8ec3b4453bcddf191bc","ext":"pdf","meta":{"width":1238,"height":1750,"page_count":1},"mime":"application/pdf","name":"lesereihe.pdf","size":120456,"type":"pdf"}][NL]
[NL]
Transloadit sends the following events:
-
assembly_erroris emitted when an error occurs while the Assembly is executing. The server will end the stream after this event. Additional information about the error is included, for example:{ "error": "FILE_FILTER_DECLINED_FILE", "message": "One of your files was declined", "step": "filter", "previousStep": ":original", "http_code": 400 } -
assembly_upload_finishedis emitted for each upload that is finished. Additional information about the uploaded file is included. The structure is the same as an object in theuploadsarray from the Assembly Status, for example:{ "id": "6bb16f6cd49a44b4ae431f576e016c6d", "name": "lesereihe.doc", "basename": "lesereihe", "ext": "doc", "size": 61440, "mime": "application/msword", "type": "office", "field": "file", "md5hash": "154a9349b8f9111865a07ed0a7050f55", "original_id": "6bb16f6cd49a44b4ae431f576e016c6d", "url": null, "meta": {} } -
assembly_result_finishedis emitted whenever a new result from a Step is available. The payload is a[stepName, file]tuple. The file object has the same structure as an entry inresults[stepName]from the Assembly Status, for example:[ "avatar", { "id": "5789e06b48ad450aa55f9b3721376581", "basename": "lesereihe", "field": "file", "md5hash": "e9df77e5ee87e8ec3b4453bcddf191bc", "ext": "pdf", "meta": { "width": 1238, "height": 1750, "page_count": 1 }, "mime": "application/pdf", "name": "lesereihe.pdf", "size": 120456, "type": "pdf" } ] -
assembly_execution_progressis emitted at regular intervals with information about the overall Execution Progress of the Assembly and its files. The structure and mechanisms are detailed in Assembly Execution Progress, for example:{ "progress_combined": 50, "progress_per_original_file": [ { "original_id": "6bb16f6cd49a44b4ae431f576e016c6d", "progress": 50 } ] }Note:
progress_per_original_fileis keyed byoriginal_id. Imported files without anoriginal_idwon’t appear in this list.
Additional messages and events might be added in the future. A client should therefore ignore unexpected messages/events and not error out.
The stream does not replay earlier events. In particular, an assembly_error listener cannot
report an error that occurred before you connected. Once the Assembly is no longer in the
uploader’s memory, the stream URL returns HTTP 404. On a disconnect or unavailable stream, fetch
assembly_ssl_url; if the Assembly is still uploading or executing, continue polling that URL.
A closed stream alone does not establish success.
Example in JavaScript
Modern browsers provide native support for server-sent events via the EventSource constructor.
Assuming that the Assembly Status is stored in the assembly_status variable, the client
can listen for the assembly_finished message, the assembly_uploading_finished message, and the
assembly_result_finished event as follows:
If the stream disconnects, this example switches to polling every two seconds until the Assembly
reaches a terminal status. HTTP or network failures are reported instead of being treated as success.
const stream = new EventSource(assembly_status.update_stream_url)
const activeStatuses = ["ASSEMBLY_UPLOADING","ASSEMBLY_EXECUTING","ASSEMBLY_REPLAYING"]
let pollingStarted = false
async function checkAssemblyStatus() {
while (true) {
const response = await fetch(assembly_status.assembly_ssl_url)
if (!response.ok) {
throw new Error(`Assembly status request failed: ${response.status}`)
}
const status = await response.json()
if (status.error) {
console.error('Assembly failed', status.error)
return
}
if (status.ok === 'ASSEMBLY_COMPLETED') {
console.log('Assembly completed', status.results)
return
}
if (status.ok === 'ASSEMBLY_CANCELED') {
console.warn('Assembly was canceled')
return
}
if (!activeStatuses.includes(status.ok)) {
throw new Error(`Assembly did not complete successfully: ${status.ok}`)
}
console.log('Assembly is not complete; continue polling its status URL', status.ok)
await new Promise((resolve) => setTimeout(resolve, 2000))
}
}
function closeStreamAndCheckStatus() {
if (pollingStarted) return
pollingStarted = true
stream.close()
checkAssemblyStatus().catch(console.error)
}
// Listen for the assembly_finished and assembly_uploading_finished messages
stream.addEventListener('message', (event) => {
switch (event.data) {
case 'assembly_finished':
closeStreamAndCheckStatus()
break
case 'assembly_uploading_finished':
console.log('All uploads are finished')
break
}
})
// Handle terminal Assembly errors without reconnecting the stream
stream.addEventListener('assembly_error', (event) => {
const error = JSON.parse(event.data)
console.error('Assembly failed', error)
closeStreamAndCheckStatus()
})
// Recover from a disconnected or unavailable stream using the status URL
stream.addEventListener('error', closeStreamAndCheckStatus)
// Listen for the assembly_result_finished event
stream.addEventListener('assembly_result_finished', (event) => {
const result = JSON.parse(event.data)
console.log('Assembly result is available', result)
})
Request example
Set UPDATE_STREAM_URL to the complete update_stream_url URL from the Assembly creation response. Do not replace its hostname.
curl --fail-with-body -sS --request GET --no-buffer \
--url "${UPDATE_STREAM_URL:?Set UPDATE_STREAM_URL}" \
--header 'accept: text/event-stream'
Required request headers
accept(fixed value), required. Accepted value: "text/event-stream". Repeated header values are joined before matching.
Optional response query parameters
callback(JavaScript callback name). Wraps JSON responses in a JSONP callback. The callback name must match^(?:_jqjsp[0-9]*|jQuery[0-9]+_[0-9]+)$. Only the last occurrence is used; an empty value is ignored. Invalid callback names return HTTP 403. The transformed response uses HTTP 200. The callback is applied after response serialization.
Request
No additional request body or fields are required.
Response
Here’s an example response body:
data: assembly_uploading_finished
event: assembly_upload_finished
data: {"id":"6bb16f6cd49a44b4ae431f576e016c6d","name":"lesereihe.doc","basename":"lesereihe","ext":"doc","size":61440,"mime":"application/msword","type":"office","field":"file","md5hash":"154a9349b8f9111865a07ed0a7050f55","original_id":"6bb16f6cd49a44b4ae431f576e016c6d","url":null,"meta":{}}
data: assembly_upload_meta_data_extracted
event: assembly_result_finished
data: ["avatar",{"id":"5789e06b48ad450aa55f9b3721376581","basename":"lesereihe","field":"file","md5hash":"e9df77e5ee87e8ec3b4453bcddf191bc","ext":"pdf","meta":{"width":1238,"height":1750,"page_count":1},"mime":"application/pdf","name":"lesereihe.pdf","size":120456,"type":"pdf"}]
event: assembly_execution_progress
data: {"progress_combined":100,"progress_per_original_file":[]}
data: assembly_finished
2xx success
Server-Sent Events response stream. text/event-stream
assembly_error
Named event with a JSON payload in its data field. The server closes the stream after this notification. Fetch the final resource status to determine the outcome.
Event payload
Complete JSON Schema
Fields beyond those listed for this object are accepted.
| Field | Type and description |
|---|---|
error | string (minimum length: 1)Error code, when available. Fetch the final Assembly Status even when this field is absent. Known values (363); other values are possible
|
http_code | numberHTTP status associated with the error. This field does not change the already-open stream’s HTTP status. |
message | stringA human-readable message explaining the state of this Assembly. This is not always present. |
previousStep | stringName of the preceding Step associated with the error, when available. |
reason | null | string | number | boolean | Array<any value> | objectOptional diagnostic details. Do not assume this value is a string or display it directly; use Any of the following schemas may apply: nullstringnumberbooleanArray<any value>Array<any value>Array item schemaany valueobjectobjectAdditional property schemaany value |
step | stringName of the Step associated with the error, when available. |
assembly_execution_progress
Named event with a JSON payload in its data field.
Event payload
Complete JSON Schema
Fields beyond those listed for this object are accepted.
| Field | Type and description | ||||||
|---|---|---|---|---|---|---|---|
progress_combinedrequired | number | nullEstimated overall progress as a percentage. Null means that overall progress cannot be estimated. | ||||||
progress_per_original_filerequired | Array<object>Progress estimates for original input files. Imported files without an original ID are not included. Array item schema
|
assembly_finished
Message whose data field contains this name as plain text, without an event field. The server closes the stream after this notification. Fetch the final resource status to determine the outcome.
ping
Message whose data field contains this name as plain text, without an event field.
assembly_result_finished
Named event with a JSON payload in its data field.
Event payload
Complete JSON Schema
[string, object] (minimum items: 2, maximum items: 2)Tuple item 1
stringTuple item 2
[1]: Fields beyond those listed for this object are accepted.
| Field | Type and description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
[1]. | string | Array<string> | nullAny of the following schemas may apply: stringArray<string>Array<string>Array item schemastringnull | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | stringStable identity of a file stored by | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | numberNumeric revision of the stored asset. Use | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | null | stringThe name of the file without the extension. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | number | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | number | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | null | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | number | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | number | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | null | stringThe extension of the file. May be | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | null | stringThe name of the form field used to submit this file. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | null | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | boolean | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | booleanWhether this stored image version has an alpha channel, when known. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | number | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | stringA random and unique ID used internally by Transloadit to track the file. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | boolean | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | boolean | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | null | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | object | nullAn object containing additional metadata extracted from the file, as shown below. Repeated date tags can be returned as lists of their original values. Check the value’s type before using it as a single timestamp. Any of the following schemas may apply: object
null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | null | stringThe determined MIME type for this file. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | null | stringThe name of the file. Transloadit will change the extension used for this field if the file undergoes processing into a different format. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | null | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | string | Array<null | string>The unique ID of the original upload file from which this file was generated. This is useful to determine which file of a multi-file upload was used to generate a given file, after several Steps of processing. Any of the following schemas may apply: stringArray<null | string>Array<null | string>Array item schemanull | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | null | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | null | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | null | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | null | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | Array<object>Array item schema
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | null | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | null | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | number | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | number | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | stringLowercase SHA-256 checksum of the stored bytes, when available. Validation pattern (regular expression)^[a-f0-9]{64}$ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | number | nullThe size of the file, in bytes. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | null | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | null | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | stringBase64-encoded ThumbHash retained with this stored image version, when available. Protect this image data with the same access controls as the original. Validation pattern (regular expression)^(?:[A-Za-z0-9+/]{4}){1,15}(?:[A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)$ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | null | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | null | stringAn abstract category describing the file. Known values are | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | null | stringA URL from which the file can be downloaded, or | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | object | nullAny of the following schemas may apply: objectobjectAdditional property schemaany valuenull | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | stringImmutable version ID returned after Storage finalizes the result. Import with Validation pattern (regular expression)^[A-Za-z0-9_-]{21}[AQgw]$ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1].required | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1].required | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | number | null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[1]. | string (minimum length: 1)Workspace slug that owns this stored result. Authenticate for this Workspace when importing or managing it. |
assembly_upload_finished
Named event with a JSON payload in its data field.
Event payload
Complete JSON Schema
Fields beyond those listed for this object are accepted.
| Field | Type and description |
|---|---|
as | string | Array<string> | nullAny of the following schemas may apply: stringArray<string>Array<string>Array item schemastringnull |
asset_id | stringStable identity of a file stored by |
asset_version | numberNumeric revision of the stored asset. Use |
basenamerequired | null | stringThe name of the file without the extension. |
cost | number | null |
exec_time | number |
extrequired | null | stringThe extension of the file. May be |
fieldrequired | null | stringThe name of the form field used to submit this file. |
from_batch_import | boolean |
has_alpha | booleanWhether this stored image version has an alpha channel, when known. |
idrequired | stringA random and unique ID used internally by Transloadit to track the file. |
import_url | string |
is_temp_url | boolean |
is_tus_file | boolean |
md5hash | null | string |
metarequired | An object containing additional metadata extracted from the file, as shown below. Repeated date tags can be returned as lists of their original values. Check the value’s type before using it as a single timestamp.
|
meta. | string | number | nullAny of the following schemas may apply: string | numberstring | numbernull |
meta. | number | nullThe aperture setting for this image, such as |
meta. | null | string |
meta. | string | number | nullMany applications that produce audio write additional information into the audio file such as
Any of the following schemas may apply: string | numberstring | numbernull |
meta. | number | string | nullThe aspect ratio of the image, which is its width divided by its height. Will be 0 if for some reason the image height is 0. |
meta. | number | nullThe audio bit rate in bits per second across all channels, such as |
meta. | null | string |
meta. | number | nullThe number of audio channels, typically |
meta. | null | stringThe audio codec, such as |
meta. | null | string |
meta. | null | string |
meta. | number | nullThe audio sample rate in hertz, such as |
meta. | string | number | nullThe author that took the image. Some cameras populate this field as opposed to Any of the following schemas may apply: string | numberstring | numbernull |
meta. | null | stringNot to be confused with dominant color, that counts a single most occurring pixel color and has limited use cases. The average color is calculated by first scaling the input image to 1 pixel. |
meta. | null | string |
meta. | number | null |
meta. | number | null |
meta. | number | null |
meta. | number | null |
meta. | number | null |
meta. | null | stringThe city in which this image was taken, such as |
meta. | boolean | null |
meta. | string | Array<string | number>Additional schema details are available in the complete JSON Schema. |
meta. | null | string |
meta. | null | string |
meta. | null | stringThe detected media colorspace, such as |
meta. | null | string |
meta. | null | string |
meta. | string | number | object | nullThe copyright metadata field. Additional schema details are available in the complete JSON Schema. |
meta. | string | number | nullThe copyright notice metadata field. Any of the following schemas may apply: string | numberstring | numbernull |
meta. | null | stringThe country in which this image was taken, such as |
meta. | null | stringThe country code of the country in which this image was taken, such as |
meta. | string | number | Array<string | number> | nullAdditional schema details are available in the complete JSON Schema. |
meta. | string | number | Array<string> | nullThe creator that took the image. Additional schema details are available in the complete JSON Schema. |
meta. | string | number | Array<string | number> | nullThe creation timestamp reported by the media metadata, when available. Additional schema details are available in the complete JSON Schema. |
meta. | string | number | Array<string | number> | nullThe modification timestamp reported by the file-system or embedded media metadata. Additional schema details are available in the complete JSON Schema. |
meta. | string | number | Array<string | number> | nullThe date and time at which the media was recorded. A single valid string timestamp is normalized to Additional schema details are available in the complete JSON Schema. |
meta. | string | number | nullA description of this image, such as Any of the following schemas may apply: string | numberstring | numbernull |
meta. | Array<string | object>Additional schema details are available in the complete JSON Schema. |
meta. | string | number | nullThe name of the device that recorded the media, such as Any of the following schemas may apply: string | numberstring | numbernull |
meta. | string | number | nullThe software version of the device that recorded the media, such as Any of the following schemas may apply: string | numberstring | numbernull |
meta. | null | stringThe manufacturer of the device that recorded the media, such as |
meta. | string | number | nullAny of the following schemas may apply: string | numberstring | numbernull |
meta. | Array<string> | nullReturns an array of up to 10 dominant image colors as hexadecimal values. Omit Additional schema details are available in the complete JSON Schema. |
meta. | number | nullThe length of the audio file in seconds. |
meta. | null | string |
meta. | null | string |
meta. | null | string |
meta. | null | string |
meta. | number | null |
meta. | null | string |
meta. | number | string | nullThe exposure compensation for this image, such as Any of the following schemas may apply: number | stringnumber | stringnull |
meta. | null | stringThe exposure mode for this image, such as |
meta. | number | string | nullThe exposure time for this image, such as Any of the following schemas may apply: number | stringnumber | stringnull |
meta. | number | nullThe f-number for this image, such as |
meta. | Array<object> | nullAdditional schema details are available in the complete JSON Schema. |
meta. | null | stringThe field order reported by FFprobe, such as |
meta. | null | stringThe flash settings for this image, such as |
meta. | null | stringThe focal length for this image, such as |
meta. | number | nullThe number of frames in an animated GIF file. This is |
meta. | number | nullThe frame rate of the video, such as |
meta. | string | number | nullAny of the following schemas may apply: string | numberstring | numbernull |
meta. | booleanWhether the original image has an alpha channel, including fully opaque alpha-channel images. Returned together with thumbhash; absence means unknown. |
meta. | boolean | null |
meta. | boolean | null |
meta. | booleanIs |
meta. | boolean | nullWhether the image has transparent areas. Set |
meta. | number | nullThe height of the media in pixels. |
meta. | object | nullDiagnostic details from Transloadit’s interlace detector. This object can include
Additional schema details are available in the complete JSON Schema. |
meta. | boolean | nullWhether the video appears to use interlaced scanning: |
meta. | number | nullThe ISO value for this image, such as |
meta. | string | number | Array<string | number | boolean> | nullKeywords extracted from the file’s metadata: a string, a finite number, or an array whose entries can be strings, finite numbers, or booleans. For example, Additional schema details are available in the complete JSON Schema. |
meta. | number | nullThe latitude at which the media was recorded, such as |
meta. | number | nullThe light value for this image, such as |
meta. | number | null |
meta. | null | stringThe location at which this image was taken, which is usually the street, such as |
meta. | number | nullThe longitude at which the media was recorded, such as |
meta. | null | string |
meta. | number | nullThe mean volume of the audio file. Set |
meta. | null | stringThe metering mode for this image, such as |
meta. | string | number | Array<string | number> | nullAdditional schema details are available in the complete JSON Schema. |
meta. | number | null |
meta. | number | null |
meta. | number | null |
meta. | string | number | nullAny of the following schemas may apply: string | numberstring | numbernull |
meta. | number | null |
meta. | number | null |
meta. | null | string |
meta. | number | null |
meta. | null | string |
meta. | null | string |
meta. | string |
meta. | null | string |
meta. | string |
meta. | Array<string> | Array<object>Additional schema details are available in the complete JSON Schema. |
meta. | number | null |
meta. | null | string |
meta. | null | string |
meta. | string | number | nullAny of the following schemas may apply: string | numberstring | numbernull |
meta. | number | null |
meta. | boolean | nullWhether the format of the video supports seeking, such as |
meta. | number | null |
meta. | number | string | nullThe shutter speed for this image, such as Any of the following schemas may apply: number | stringnumber | stringnull |
meta. | null | string |
meta. | string | number | nullThe state in which this image was taken, such as Any of the following schemas may apply: string | numberstring | numbernull |
meta. | string |
meta. | string |
meta. | string |
meta. | string |
meta. | object | nullAdditional schema details are available in the complete JSON Schema. |
meta. | number | null |
meta. | number | null |
meta. | number | nullThe index of the current thumbnail starting at 0. This key is only present for results of 🤖/video/thumbs. |
meta. | number | string | nullThe offset for the current thumbnail, in seconds. This key is only present for results of 🤖/video/thumbs.
|
meta. | stringBase64-encoded ThumbHash of the EXIF-oriented image. Request output_meta.thumbhash on the producing Step. Omitted when not requested, unsupported, over 40 megapixels, or extraction fails. Treat the hash as private image data when the original is private. Validation pattern (regular expression)^(?:[A-Za-z0-9+/]{4}){1,15}(?:[A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)$ |
meta. | null | string |
meta. | string | number | nullThe title of this image, such as Any of the following schemas may apply: string | numberstring | numbernull |
meta. | string | number | nullAny of the following schemas may apply: string | numberstring | numbernull |
meta. | boolean | null |
meta. | string |
meta. | number | nullThe video bit rate of the video, such as |
meta. | null | stringThe video codec of the video, such as |
meta. | null | stringThe white balance setting for this image, such as |
meta. | number | nullThe width of the media in pixels. For video whose display ratio differs from its pixel ratio, this is the intended display width. |
meta. | number | null |
meta. | null | string |
meta. | string | number | nullAny of the following schemas may apply: string | numberstring | numbernull |
meta. | string | number | nullAny of the following schemas may apply: string | numberstring | numbernull |
meta. | string | number | nullAny of the following schemas may apply: string | numberstring | numbernull |
meta. | string | number | nullAny of the following schemas may apply: string | numberstring | numbernull |
mimerequired | null | stringThe determined MIME type for this file. |
namerequired | null | stringThe name of the file. Transloadit will change the extension used for this field if the file undergoes processing into a different format. |
original_basename | null | string |
original_idrequired | string | Array<null | string>The unique ID of the original upload file from which this file was generated. This is useful to determine which file of a multi-file upload was used to generate a given file, after several Steps of processing. Any of the following schemas may apply: stringArray<null | string>Array<null | string>Array item schemanull | string |
original_md5hash | null | string |
original_name | null | string |
original_path | string |
queue | null | string |
queue_time | number |
sha256 | stringLowercase SHA-256 checksum of the stored bytes, when available. Validation pattern (regular expression)^[a-f0-9]{64}$ |
sizerequired | numberThe size of the file, in bytes. |
ssl_url | null | string |
thumbhash | stringBase64-encoded ThumbHash retained with this stored image version, when available. Protect this image data with the same access controls as the original. Validation pattern (regular expression)^(?:[A-Za-z0-9+/]{4}){1,15}(?:[A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)$ |
tus_upload_url | null | string |
typerequired | null | stringAn abstract category describing the file. Known values are |
urlrequired | null | stringA URL from which the file can be downloaded, or |
user_meta | objectAdditional property schemaany value |
version_id | stringImmutable version ID returned after Storage finalizes the result. Import with Validation pattern (regular expression)^[A-Za-z0-9_-]{21}[AQgw]$ |
workspace | string (minimum length: 1)Workspace slug that owns this stored result. Authenticate for this Workspace when importing or managing it. |
assembly_upload_meta_data_extracted
Message whose data field contains this name as plain text, without an event field.
assembly_uploading_finished
Message whose data field contains this name as plain text, without an event field.
HTTP 404, 503
No response body.
Error response
JSON response body. application/json text/plain; charset=utf-8
Response body schema
Complete JSON Schema
The response may contain additional fields.
| Field | Type and description |
|---|---|
assembly_id | string |
error | string (minimum length: 1) |
http_code | number | string
|
message | stringHuman-readable explanation of the error. Its wording can vary; use the |
reason | null | string | number | boolean | Array<any value> | objectAny of the following schemas may apply: nullstringnumberbooleanArray<any value>Array<any value>Array item schemaany valueobjectobjectAdditional property schemaany value |
For more information about the response format, please refer to Mozilla’s documentation about server-sent events.