Roll back dataset transaction?

How do I roll back a transaction on a dataset? I want to undo the most recent UPDATE transaction. I can see the previous transactions in the dataset, but I can’t figure out how to revert to one of these.

Hi, to do a rollback to a specific transaction for a dataset resource, you can do it via a single API call:

You will need:

  1. your foundry instance base url which is usually in the form of: https://<MY_INSTANCE>
  2. the dataset resource ID or RID - this is usually part of the URL to the dataset and is in the form: ri.foundry.main.dataset.00000000-0000-0000-0000-000000000000
  3. your account API token - this can be generated from going to Account (bottom left) → Settings → Tokens and generating a new token
  4. the transaction ID you want to revert to - this can be found by going to the History tab of the dataset, selecting the transaction you want to revert to and there is an option to copy this ID (in your case it will be just the 2nd most recent txn)
  5. Name of branch you are working on - in the example below we assume master

Once you have these, you can execute the following curl call:

curl -X POST \
    "<FOUNDRY_INSTANCE_BASE_URL>/foundry-catalog/api/catalog/datasets<DATASET_RID>/branchesUpdate2/master" \
    -H "Authorization: Bearer <TOKEN>" \
    -H "Content-type: application/json" \
    -k \
    -w "\n"

If it works, you should get a successful reply:

{"id":"master","rid":"ri.foundry.main.branch.00000000-0000-0000-0000-000000000000","ancestorBranchIds":[],"creationTime":"<TIME YOU RAN THIS>","transactionRid":"<TRANSACTION ID TO REVERT BACK TO>"}

Remember to note the format of the strings in the curl call, extra spaces or missing quotes will cause it to fail!