Presigned R2 GET for a file
POST
/v1/datasets/download/presign
const url = 'https://example.com/v1/datasets/download/presign';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","file_id":"example","ttl_seconds":300}'};
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://example.com/v1/datasets/download/presign \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "file_id": "example", "ttl_seconds": 300 }'Presigned GET plan for one file. The file_id MUST belong to the caller’s own org — qds-api’s tenant-scope gate 404s a foreign file_id, so a customer can’t presign another account’s chunks by guessing one (no tree pre-fetch).
Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ” x-api-key
string | null
Request Body required
Section titled “Request Body required ” Media type application/json
DownloadPresignBody
object
name
required
string
file_id
required
string
ttl_seconds
integer
Responses
Section titled “ Responses ”Successful Response
Media type application/json
Example generated
exampleValidation Error
Media type application/json
HTTPValidationError
object
detail
Array<object>
ValidationErrorobject
loc
required
Location
Array<string | integer>
msg
required
Message
string
type
required
Error Type
string
input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}