Managing Multiple Versions

The need to version an asset in Shift is common. Many assets are works in progress, and many of our users work in post production, where the state of assets changes frequently.

The same versioning capabilities available in the Shift app are also available in the Shift API.

Let's assume that you uploaded a rough cut to Shift. After a first round of review, you have a few changes that are ready for a second round. You upload the latest cut to Shift but don't want to confuse your reviewers with too many files that are similar. In this case, you can combine multiple files into a single file with multiple versions. Here's how.

curl --request POST \
  --url https://api.shift.io/v3/assets/versions \
  --header 'content-type: application/json' \
  --data '{"currentAssetId":"ASSET_ID_OF_THE_PREVIOUS_VERSION","newAssetId":"ASSET_ID_OF_THE_NEW_VERSION","versionId":"latest-cut"}'

In the above example, we combine two assets into one and name the current version "latest-cut." You can continue to add new versions to the asset in this way. Here's how to list all of the versions for a given asset:

curl --request GET \
  --url https://api.shift.io/v3/assets/ASSET_ID/versions \
  --header 'content-type: application/json' \

Removing a version is similar:

curl --request DELETE \
  --url https://api.shift.io/v3/assets/ASSET_ID/versions \
  --header 'content-type: application/json' \

What’s Next
Did this page help you?