Managing Multiple Versions

Many of the assets in SHIFT are a work in progress. Also, many of our users work in post production and the state of the assets they're working with changes frequently. The need to version an asset is common.

The same versioning capabilities available in the SHIFT app are also available to you in the SHIFT API.

Let's assume that you've previously uploaded a rough cut to SHIFT and after review you have a few changes that a ready for another round of review. You've uploaded the latest cut to SHIFT but don't want to confuse your reviewers with too many files that are similar. Instead, 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 take two assets and combine them into one naming the current version "latest-cut". You can continue to add new versions to the asset in this way. If you want to list all of the versions for a given asset you can like this.

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

And 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?