Skip to content

Complete upload

POST
/v0/namespaces/{namespace}/uploads/{upload_id}/complete

Completes an upload session once the caller confirms the expected content reference. The response may include a short-lived validation token for a following file write.

namespace
required
string

Namespace id

upload_id
required
string

Upload session id

Request to complete an upload.

The two shapes correspond to who knew the content identity first. A service-proxied or direct_put session was handed its reference before any byte moved, so its completion names that reference back. A direct_multipart session was never told one — there was nothing to tell — so its completion carries the claim instead and the server builds the reference from the identity it has held all along.

object
content_ref
One of:
null
multipart
One of:
null
multipart_parts

Required for direct_multipart: every part the client uploaded, in ascending part order. The server holds no part records of its own, so this list is what it assembles the object from.

array | null

One uploaded part, as the client observed the provider accept it.

The server keeps no durable record of any part. Part bookkeeping is the client’s, exactly as it is in the provider’s own multipart API, and this is where the client hands it back.

object
crc64nvme
required

CRC-64/NVME the part was signed and accepted with, lowercase hex.

string
etag
required

Entity tag the provider returned for the accepted part.

string
part_number
required

One-based part number.

integer format: int32

Upload completed

Response after an upload session is completed.

object
content_ref
required

Verified immutable content selected by the completed session.

object
content_id
required

Immutable identity of the referenced object.

string
kind
required

Content strategy used by the referenced object.

string
size_bytes
required

Complete byte length of the referenced content.

integer format: int64
storage_checksum
required

Mandatory checksum over the complete object, used to verify the stored bytes against this reference without downloading them.

object
algorithm
required

Algorithm that produced value.

string
Allowed values: sha256 crc64nvme crc32c
value
required

Lowercase hex of the raw checksum bytes.

The algorithm is its own field, so the value carries no prefix. Provider APIs that report base64 are converted at the adapter.

string
whole_file_sha256

SHA-256 over the complete payload, lowercase hex, when a trusted party computed it.

Present means the LoonFS write path hashed the whole stream itself, or a provider validated a signed whole-object SHA-256 on the write. There are no client-claimed digests: absent means nobody trustworthy hashed these bytes, never “the client did not tell us”.

string | null
namespace_id
required

Namespace that owns the completed session.

string
upload_id
required

Session whose result is now frozen for idempotent completion retries.

string
validated_content_token

Opaque server proof for a later commit, or None when the backend needs no token.

string | null

Invalid completion request

HTTP error body used by LoonFS APIs.

object
code
required

Stable machine-readable reason from the ErrorCode registry.

Carried as a string so clients keep working when a newer server introduces a code they do not know; use ErrorCode::parse for typed access.

string
details
One of:
null
feature

For not_supported errors, the capability-document feature key the client should reconcile against.

string | null
message
required

Human-readable error message.

string
request_id

Correlation id the server assigned to the failed request; the same value is sent as the x-request-id response header.

string | null

Unauthorized

HTTP error body used by LoonFS APIs.

object
code
required

Stable machine-readable reason from the ErrorCode registry.

Carried as a string so clients keep working when a newer server introduces a code they do not know; use ErrorCode::parse for typed access.

string
details
One of:
null
feature

For not_supported errors, the capability-document feature key the client should reconcile against.

string | null
message
required

Human-readable error message.

string
request_id

Correlation id the server assigned to the failed request; the same value is sent as the x-request-id response header.

string | null

Namespace or upload not found

HTTP error body used by LoonFS APIs.

object
code
required

Stable machine-readable reason from the ErrorCode registry.

Carried as a string so clients keep working when a newer server introduces a code they do not know; use ErrorCode::parse for typed access.

string
details
One of:
null
feature

For not_supported errors, the capability-document feature key the client should reconcile against.

string | null
message
required

Human-readable error message.

string
request_id

Correlation id the server assigned to the failed request; the same value is sent as the x-request-id response header.

string | null

Upload completion conflict

HTTP error body used by LoonFS APIs.

object
code
required

Stable machine-readable reason from the ErrorCode registry.

Carried as a string so clients keep working when a newer server introduces a code they do not know; use ErrorCode::parse for typed access.

string
details
One of:
null
feature

For not_supported errors, the capability-document feature key the client should reconcile against.

string | null
message
required

Human-readable error message.

string
request_id

Correlation id the server assigned to the failed request; the same value is sent as the x-request-id response header.

string | null

Namespace deleted

HTTP error body used by LoonFS APIs.

object
code
required

Stable machine-readable reason from the ErrorCode registry.

Carried as a string so clients keep working when a newer server introduces a code they do not know; use ErrorCode::parse for typed access.

string
details
One of:
null
feature

For not_supported errors, the capability-document feature key the client should reconcile against.

string | null
message
required

Human-readable error message.

string
request_id

Correlation id the server assigned to the failed request; the same value is sent as the x-request-id response header.

string | null