Version Stacks - Determining Current Version

When reordering versions, we can send “prev_asset_id” and “next_asset_id”. When fetching children of a version stack, how do we determine the current version? Is it always the first asset in the response, or do we need to iterate through the entire stack and find the asset with the lowest “index” value?

One thing you can try is appending ?include=cover_asset to the API call you’re making to get the children of a version stack.

By adding that query param, you’re asking the back-end to include what we consider to be the “cover asset” for a given folder or version stack. You’ll then have a new key at the root of the response model called cover_asset and that’s guaranteed to be the top (most recent) item in the stack.

It’s been a while since I’ve tried to do this, so please let me know if you run into any issues and I’ll come up with another answer!