Search documentation
karat

+

K

User Documentation ↗

Delete File

DELETE/api/v2/datasets/{datasetRid}/files/{filePath}
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

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.

Advanced Usage

See Datasets Core Concepts for details on using branches and transactions. To delete a File from a specific Branch specify the Branch's name as branchName. 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.

Path parameters

datasetRid
string

The Resource Identifier (RID) of a Dataset.

filePath
string

The path to a File within Foundry. Examples: my-file.txt, path/to/my-file.jpg, dataframe.snappy.parquet.

Query parameters

branchName
string
optional

The name of the Branch on which to delete the File. Defaults to master for most enrollments.

transactionRid
string
optional

The Resource Identifier (RID) of the open delete Transaction on which to delete the File.

preview
boolean
optional

Enables the use of preview functionality.

Examples

Request

Copied!
1 2 3 curl -X DELETE \ -H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/datasets/ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da/files/?branchName=master&transactionRid=ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4&preview=true"