Manage asset status
How to manage asset status
Read time 1 minuteLast updated 8 days ago
Before you begin
To access any assets, make sure the app has the right permissions. Read more about managing Identity.Get the reachable status of an asset
The status that an asset can reach depends on its current status and the assigned status flow. To list the reachable status of an asset, call theget_asset_reachable_statuses
reachable_status = unity_cloud.assets.get_asset_reachable_statuses( org_id = "012345678912", project_id = "1234abcd-ab12-cd34-ef56-123456abcdef", asset_id = "0123456789abcdefghijklmn", asset_version = '1234abcd-ab12-cd34-ef56-123456abcdef' )
Update asset status
Using the result ofget_asset_reachable_statuses
update_asset_status
unity_cloud.assets.update_asset_status( org_id = "012345678912", project_id = "1234abcd-ab12-cd34-ef56-123456abcdef", asset_id = "0123456789abcdefghijklmn", asset_version = '1234abcd-ab12-cd34-ef56-123456abcdef', status = "status" )
Get a status flow
To get the status flow of an asset, call theget_asset_status_flow
status_flow = unity_cloud.assets.get_asset_status_flow( org_id = "012345678912", project_id = "1234abcd-ab12-cd34-ef56-123456abcdef", asset_id = "0123456789abcdefghijklmn", asset_version = '1234abcd-ab12-cd34-ef56-123456abcdef' )
List all status flows
To list all status flows of an organization, call thelist_status_flow
status_flows = unity_cloud.assets.list_status_flow( org_id = "012345678912" )
Change the status flow assigned to an asset
To change the status flow assigned to an asset, call theupdate_asset_status_flow
unity_cloud.assets.update_asset_status_flow( org_id = "012345678912", project_id = "1234abcd-ab12-cd34-ef56-123456abcdef", asset_id = "0123456789abcdefghijklmn", asset_version = '1234abcd-ab12-cd34-ef56-123456abcdef', status_flow_id = "1234abcd-ab12-cd34-ef56-123456abcdef" )