Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default
branch - master
for most enrollments. The file will still be visible on historical views.
See Datasets Core Concepts for details on using branches and transactions.
To delete a File from a specific Branch specify the Branch's identifier as branchId
. A new delete Transaction
will be created and committed on this branch.
To delete a File using a manually opened Transaction, specify the Transaction's resource identifier
as transactionRid
. The transaction must be of type DELETE
. This is useful for deleting multiple files in a
single transaction. See createTransaction to
open a transaction.
Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:datasets-write
.
string
The Resource Identifier (RID) of the Dataset on which to delete the File.
string
The File path within the Dataset.
string
The identifier (name) of the Branch on which to delete the File. Defaults to master
for most enrollments.
string
The Resource Identifier (RID) of the open delete Transaction on which to delete the File.
1
2
3
curl -X DELETE \
-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&transactionRid=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 branch, or the client token does not have access to it. | |
Parameters | datasetRid, branchId, path | |
Create | Error Code | PERMISSION_DENIED |
Status Code | 403 | |
Description | The provided token does not have permission to create a transaction on this dataset. | |
Parameters | datasetRid, branchId | |
Abort | Error Code | PERMISSION_DENIED |
Status Code | 403 | |
Description | The provided token does not have permission to abort the given transaction on the given dataset. | |
Parameters | datasetRid, transactionRid | |
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 | |
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 | |
Open | Error Code | CONFLICT |
Status Code | 409 | |
Description | A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. | |
Parameters | datasetRid, branchId | |
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 | |
Commit | Error Code | PERMISSION_DENIED |
Status Code | 403 | |
Description | The provided token does not have permission to commit the given transaction on the given dataset. | |
Parameters | datasetRid, transactionRid | |
Invalid | Error Code | INVALID_ARGUMENT |
Status Code | 400 | |
Description | The given transaction type is not valid. Valid transaction types are `SNAPSHOT`, `UPDATE`, `APPEND`, and `DELETE`. | |
Parameters | datasetRid, transactionRid, transactionType | |
Put | Error Code | PERMISSION_DENIED |
Status Code | 403 | |
Description | todo | |
Parameters | datasetRid, branchId | |
Transaction | Error Code | INVALID_ARGUMENT |
Status Code | 400 | |
Description | The given transaction is not open. | |
Parameters | datasetRid, transactionRid, transactionStatus |
See Errors for a general overview of errors in the platform.