Skip to content

Presigned R2 GET plan by content hash (one round-trip)

POST
/v1/datasets/download/presign-by-hash
curl --request POST \
--url https://example.com/v1/datasets/download/presign-by-hash \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "content_hash": "example", "path": "", "ttl_seconds": 300 }'

Resolve a file by its BLAKE3 content hash within the caller’s own dataset and return the presigned GET plan in ONE round-trip (the git smudge fast path — no tree listing, no separate presign call). Read-only: never creates an alias row. {found: false} on miss.

x-api-key
string | null
Media type application/json
PresignByHashBody
object
name
required
string
content_hash
required
string
path
string
""
ttl_seconds
integer
default: 300

Successful Response

Media type application/json
Example generated
example

Validation Error

Media type application/json
HTTPValidationError
object
detail
Array<object>
ValidationError
object
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": {}
}
]
}