Vlad Skrypnyk Posted September 7, 2023 Report Share Posted September 7, 2023 How I could remove existing asset using API ? Link to comment Share on other sites More sharing options...
Johan Boekhoven Posted September 18, 2023 Report Share Posted September 18, 2023 Here's my cleanup routine for assets that have no AssetVersion: def delete_empty_assets(): """Delete all assets that have no versions.""" assets = SESSION.query("select id, name from Asset where latest_version is none").all() for asset in assets: print(f"found asset: {asset['id']} : {asset['name']}") SESSION.delete(asset) SESSION.commit() SESSION is an instance of FtrackSession. Link to comment Share on other sites More sharing options...
Vlad Skrypnyk Posted September 28, 2023 Author Report Share Posted September 28, 2023 Big thanks for your answer, it is great Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now