Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest
view of the default branch - master
for most enrollments.
See Datasets Core Concepts for details on using branches and transactions.
To get a file's metadata from a specific Branch specify the Branch's identifier as branchId
. This will
retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest
ancestor transaction of the branch if there are no snapshot transactions.
To get a file's metadata from the resolved view of a transaction specify the Transaction's resource identifier
as endTransactionRid
. This will retrieve metadata for the most recent version of the file since the latest snapshot
transaction, or the earliest ancestor transaction if there are no snapshot transactions.
To get a file's metadata from the resolved view of a range of transactions specify the the start transaction's
resource identifier as startTransactionRid
and the end transaction's resource identifier as endTransactionRid
.
This will retrieve metadata for the most recent version of the file since the startTransactionRid
up to the
endTransactionRid
. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path.
To get a file's metadata from a specific transaction specify the Transaction's resource identifier as both the
startTransactionRid
and endTransactionRid
.
Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:datasets-read
.
string
The Resource Identifier (RID) of the Dataset that contains the File.
string
The File's path within the Dataset.
string
The identifier (name) of the Branch that contains the File. Defaults to master
for most enrollments.
string
The Resource Identifier (RID) of the start Transaction.
string
The Resource Identifier (RID) of the end Transaction.
object
string
The path to a File within Foundry. Examples: my-file.txt
, path/to/my-file.jpg
, dataframe.snappy.parquet
.
string
The Resource Identifier (RID) of a Transaction.
string
string
1
2
3
curl \
-H "Authorization: Bearer $TOKEN" \
"https://$HOSTNAME/api/v1/datasets/ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da/files/q3-data%2fmy-file.csv?branchId=master&startTransactionRid=ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4&endTransactionRid=ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4"
1
2
3
4
5
6
{
"path": "q3-data/my-file.csv",
"transactionRid": "ri.foundry.main.transaction.bf9515c2-02d4-4703-8f84-c3b3c190254d",
"sizeBytes": "74930",
"updatedTime": "2022-10-10T16:44:55.192Z"
}