Datasets

Preview dataset restore

Changed on

Preview restoring a dataset to an earlier version, such as a dataset snapshot. Returns how many rows a restore would change, without modifying the dataset. Fails if more than 20,000 rows changed since the requested version. Requires read permission on the dataset.

post/v1/dataset/{dataset_id}/restore/preview

Request

  • Base URL
    https://api.braintrust.dev
  • Auth
    • HTTP bearer
    • or none

Path parameters

dataset_idstring uuid required

Dataset id

Request body

versionstring required

The dataset version to restore to, such as the xact_id of a dataset snapshot

Response

Number of rows the restore would change

rows_to_restoreinteger required

Number of rows that would be restored to their value at the requested version

rows_to_deleteinteger required

Number of rows created after the requested version that would be deleted

Changes