Gets the content of a File contained in a Dataset. By default this retrieves the file's content 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 content from a specific Branch specify the Branch's identifier as branchId. This will
retrieve the content 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 content from the resolved view of a transaction specify the Transaction's resource identifier
as endTransactionRid. This will retrieve the content 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 content 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 the content for the most recent version of the file since the startTransactionRid up to the
endTransactionRid. Note that an intermediate snapshot transaction will remove all files from the view. Behavior
is undefined when the start and end transactions do not belong to the same root-to-leaf path.
To get a file's content 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.
stringThe Resource Identifier (RID) of the Dataset that contains the File.
stringThe File's path within the Dataset.
stringThe identifier (name) of the Branch that contains the File. Defaults to master for most enrollments.
stringThe Resource Identifier (RID) of the start Transaction.
stringThe Resource Identifier (RID) of the end Transaction.
1
2
3
curl \
\t-H "Authorization: Bearer $TOKEN" \
"https://$HOSTNAME/api/v1/datasets/ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da/files/q3-data%2fmy-file.csv/content?branchId=master&startTransactionRid=ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4&endTransactionRid=ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4"| Error Name | ||
|---|---|---|
Invalid | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | The given parameters are individually valid but cannot be used in the given combination. | |
| Parameters | validCombinations, providedParameters | |
File | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | The requested file could not be found on the given transaction range, or the client token does not have access to it. | |
| Parameters | datasetRid, startTransactionRid, endTransactionRid, path | |
File | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | The requested file could not be found on the given branch, or the client token does not have access to it. | |
| Parameters | datasetRid, branchId, path | |
Invalid | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. | |
| Parameters | branchId | |
Branch | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | The requested branch could not be found, or the client token does not have access to it. | |
| Parameters | datasetRid, branchId | |
Dataset | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | The requested dataset could not be found, or the client token does not have access to it. | |
| Parameters | datasetRid | |
Transaction | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | The requested transaction could not be found on the dataset, or the client token does not have access to it. | |
| Parameters | datasetRid, transactionRid | |
See Errors for a general overview of errors in the platform.