Skip to content

Preview metadata for one file in a dataset repo

GET
/v1/datasets/file-preview
curl --request GET \
--url 'https://example.com/v1/datasets/file-preview?path=example&file=example'

Return persisted/derived metadata for one file.

The response never contains the file body. Callers that need the bytes must use the exact-download capability flow and fetch them from R2.

path
required

Dataset path (org/name)

string
<= 300 characters

Dataset path (org/name)

file
required

File path within the repo

string
<= 500 characters

File path within the repo

ref

Branch / tag / commit (default main)

string | null
<= 120 characters

Branch / tag / commit (default main)

x-api-key
string | null

Typed metadata; text bodies are explicitly omitted

Media type application/json
Example generated
example

Unknown file, ref, or non-QDS backend

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": {}
}
]
}