Skip to content

Begin download

POST
/v0/namespaces/{namespace}/filesystem/downloads

Authorizes one direct read of a file’s content object and returns a short-lived presigned GET capability, the resolved revision, and the content reference the client checks the arriving bytes against. Range is outside the signature, so one grant serves ranged, resumed, and parallel reads. Deployments that cannot presign answer 501 not_supported; the proxied GET /filesystem/content route stays available and is capped by download.max_content_bytes.

namespace
required
string

Namespace id

What a client names when it asks to read a file directly.

A path and, optionally, the revision it wants — the same two things the proxied content read takes, so a caller switching transports changes nothing about what it is asking for.

object
path
required

Absolute path of the file to read.

string
revision_no
One of:
null

Download authorized

A short-lived capability to read one file’s content object, plus everything the reader needs to check what arrives.

The raw object key is deliberately not here, exactly as it is not in a direct_put grant: a client learns a URL that expires, not an address it can revisit.

The grant names one immutable content object, so it does not go stale when the path moves on. A commit that replaces the file writes a new object and leaves this one alone; what the capability reads is what the requested revision held when the grant was issued, and the reference says which bytes those are.

object
absolute_path
required

Absolute path as rendered from stored display names.

string
access
required
One of:
ObjectTransferAccessPresignedUrl

Short-lived URL plus required headers for one object-store write.

object
expires_at_ms
required

Expiration timestamp in Unix milliseconds.

integer format: int64
headers

Headers that are covered by the signature and must be sent.

object
key
additional properties
string
kind
required
string
Allowed values: presigned_url
method
required

HTTP method the client must use.

string
url
required

Full presigned URL.

string
content_ref
required

Identity, byte length, and checksum evidence for the object the capability reads. A reader checks the bytes it receives against size_bytes, and against whole_file_sha256 when the reference carries one — a direct-multipart object never will, because nobody ever hashed it with SHA-256.

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 was read.

string
revision_no
required

Revision the capability reads, resolved from the request.

integer format: int64

Invalid path or revision

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, path, or revision 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

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

Direct download is unsupported

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