Manage transformations
Learn how to start and manage transformations using the Python SDK.
阅读时间1 分钟最后更新于 10 个月前
Before you begin
To access and create transformations, make sure the app has the right accesses. Read more about managing Identity.How do I...?
Start a transformation
To start a transformation on a given dataset, follow these steps:- Pass all the information to identify the dataset.
- Pass the you would like to start.
WorkflowType
WorkflowType- THUMBNAIL_GENERATION
- GLB_PREVIEW
- DATA_STREAMING
- TRANSCODE_VIDEO
transformation = unity_cloud.assets.start_transformation( org_id = "012345678912", project_id = "1234abcd-ab12-cd34-ef56-123456abcdef", asset_id = "0123456789abcdefghijklmn", asset_version = "1234abcd-ab12-cd34-ef56-123456abcdef", dataset_id = "1234abcd-12ab-34cd-56ef-123456abcdef", workflow_type = unity_cloud.WorkflowType.THUMBNAIL_GENERATION)
Get a transformation
To get a previously started transformation on a dataset whether already completed or not, pass the information of the dataset and the id of the transformation.transformation = unity_cloud.assets.get_transformation( org_id = "012345678912", project_id = "1234abcd-ab12-cd34-ef56-123456abcdef", asset_id = "0123456789abcdefghijklmn", asset_version = "1234abcd-ab12-cd34-ef56-123456abcdef", dataset_id = "1234abcd-12ab-34cd-56ef-123456abcdef", workflow_id = "012345678912")
List transformations
You can list transformations from an organization and project by using one or many of those optional arguments:- asset_id : The asset affected by the transformation. Leave empty to search all assets.
- asset_version : The version of the asset. Leave empty to search all asset versions.
- dataset_id: The dataset ID. Leave empty to search through all possible datasets.
- transformation_status. The transformation status. Leave empty to search all transformation statuses.
- user_id: The user that started the transformation. Leave empty to search all users.
- limit_to: The maximum of amount of results that should be returned. Leave empty to return everything.
- skip: Use in combination of limit_to to page through results.
transformations = unity_cloud.assets.list_transformations(org_id = "012345678912",project_id = "1234abcd-ab12-cd34-ef56-123456abcdef",<optional arguments>)