Complete an upload
const url = 'https://api.iomza.com/v1/uploads/example/complete';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"parts":[{"part_number":1,"etag":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.iomza.com/v1/uploads/example/complete \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "parts": [ { "part_number": 1, "etag": "example" } ] }'Single uploads: after the PUT. Multipart: with every part’s ETag. A second call returns the upload unchanged. Progressive uploads and copies from a URL complete by themselves.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Multipart uploads only: every part with its ETag.
object
The ETag header of the part’s PUT response.
Example generated
{ "parts": [ { "part_number": 1, "etag": "example" } ]}Responses
Section titled “Responses”The upload, completed.
A source file: uploaded, being uploaded, or copied from a URL by a job. Kept 7 days.
object
completed once the whole file is stored.
How it arrives: single (one PUT), multipart (parts in parallel, then complete), progressive (parts readable as they land, no complete) or url (copied by the job that was given the URL; completed once the copy is done).
Where an imported source came from.
Example
{ "object": "upload", "status": "pending", "mode": "single"}Invalid fields: details lists each problem with its path.
object
object
Stable: branch on it.
English, for people; may change.
Each problem, as path: message (validation errors).
Example
{ "error": { "code": "validation_error" }}The API key is missing, invalid or revoked.
object
object
Stable: branch on it.
English, for people; may change.
Each problem, as path: message (validation errors).
Example
{ "error": { "code": "validation_error" }}Valid credentials that may not do this (forbidden), your plan doesn’t include the module the route belongs to (module_not_in_plan), or your organization is suspended (organization_suspended).
object
object
Stable: branch on it.
English, for people; may change.
Each problem, as path: message (validation errors).
Example
{ "error": { "code": "validation_error" }}It doesn’t exist in your organization.
object
object
Stable: branch on it.
English, for people; may change.
Each problem, as path: message (validation errors).
Example
{ "error": { "code": "validation_error" }}Too many requests: wait and retry. Answered by the gateway, so the body may differ.
object
object
Stable: branch on it.
English, for people; may change.
Each problem, as path: message (validation errors).
Example
{ "error": { "code": "validation_error" }}Ours: retry, and tell us if it persists.
object
object
Stable: branch on it.
English, for people; may change.
Each problem, as path: message (validation errors).
Example
{ "error": { "code": "validation_error" }}Momentarily unavailable: retry in a few seconds.
object
object
Stable: branch on it.
English, for people; may change.
Each problem, as path: message (validation errors).
Example
{ "error": { "code": "validation_error" }}