Skip to content

Complete an upload

POST
/v1/uploads/{id}/complete
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.

id
required
string
Media typeapplication/json
object
parts

Multipart uploads only: every part with its ETag.

Array<object>
>= 1 items
object
part_number
required
integer
>= 1 <= 10000
etag
required

The ETag header of the part’s PUT response.

string
>= 1 characters

Example generated

{
"parts": [
{
"part_number": 1,
"etag": "example"
}
]
}

The upload, completed.

Media typeapplication/json

A source file: uploaded, being uploaded, or copied from a URL by a job. Kept 7 days.

object
id
required
string
object
required
string
Allowed value: upload
status
required

completed once the whole file is stored.

string
Allowed values: pending completed
file_name
required
string
size
required
number | null
mode
required

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).

string
Allowed values: single multipart progressive url
source_url
required

Where an imported source came from.

string | null
created_at
required
string format: date-time
completed_at
required
string | null format: date-time

Example

{
"object": "upload",
"status": "pending",
"mode": "single"
}

Invalid fields: details lists each problem with its path.

Media typeapplication/json
object
error
required
object
code
required

Stable: branch on it.

string
Allowed values: validation_error unauthorized quota_exceeded insufficient_balance forbidden module_not_in_plan organization_suspended not_found conflict too_many_requests internal_error service_unavailable
message
required

English, for people; may change.

string
details
required

Each problem, as path: message (validation errors).

Array<string>

Example

{
"error": {
"code": "validation_error"
}
}

The API key is missing, invalid or revoked.

Media typeapplication/json
object
error
required
object
code
required

Stable: branch on it.

string
Allowed values: validation_error unauthorized quota_exceeded insufficient_balance forbidden module_not_in_plan organization_suspended not_found conflict too_many_requests internal_error service_unavailable
message
required

English, for people; may change.

string
details
required

Each problem, as path: message (validation errors).

Array<string>

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).

Media typeapplication/json
object
error
required
object
code
required

Stable: branch on it.

string
Allowed values: validation_error unauthorized quota_exceeded insufficient_balance forbidden module_not_in_plan organization_suspended not_found conflict too_many_requests internal_error service_unavailable
message
required

English, for people; may change.

string
details
required

Each problem, as path: message (validation errors).

Array<string>

Example

{
"error": {
"code": "validation_error"
}
}

It doesn’t exist in your organization.

Media typeapplication/json
object
error
required
object
code
required

Stable: branch on it.

string
Allowed values: validation_error unauthorized quota_exceeded insufficient_balance forbidden module_not_in_plan organization_suspended not_found conflict too_many_requests internal_error service_unavailable
message
required

English, for people; may change.

string
details
required

Each problem, as path: message (validation errors).

Array<string>

Example

{
"error": {
"code": "validation_error"
}
}

Too many requests: wait and retry. Answered by the gateway, so the body may differ.

Media typeapplication/json
object
error
required
object
code
required

Stable: branch on it.

string
Allowed values: validation_error unauthorized quota_exceeded insufficient_balance forbidden module_not_in_plan organization_suspended not_found conflict too_many_requests internal_error service_unavailable
message
required

English, for people; may change.

string
details
required

Each problem, as path: message (validation errors).

Array<string>

Example

{
"error": {
"code": "validation_error"
}
}

Ours: retry, and tell us if it persists.

Media typeapplication/json
object
error
required
object
code
required

Stable: branch on it.

string
Allowed values: validation_error unauthorized quota_exceeded insufficient_balance forbidden module_not_in_plan organization_suspended not_found conflict too_many_requests internal_error service_unavailable
message
required

English, for people; may change.

string
details
required

Each problem, as path: message (validation errors).

Array<string>

Example

{
"error": {
"code": "validation_error"
}
}

Momentarily unavailable: retry in a few seconds.

Media typeapplication/json
object
error
required
object
code
required

Stable: branch on it.

string
Allowed values: validation_error unauthorized quota_exceeded insufficient_balance forbidden module_not_in_plan organization_suspended not_found conflict too_many_requests internal_error service_unavailable
message
required

English, for people; may change.

string
details
required

Each problem, as path: message (validation errors).

Array<string>

Example

{
"error": {
"code": "validation_error"
}
}