查询资产详情
功能介绍
该接口用于查询资产库中指定媒体资产的详情。
调用方法
请参见如何调用API。
URI
GET /v1/{project_id}/digital-assets/{asset_id}
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
project_id |
是 |
String |
项目ID,获取方法请参考获取项目ID。 |
asset_id |
是 |
String |
资产ID。 |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
X-Auth-Token |
否 |
String |
用户Token。使用Token鉴权方式时必选。 通过调用IAM服务获取用户Token接口获取。 响应消息头中X-Subject-Token的值。 |
Authorization |
否 |
String |
使用AK/SK方式认证时必选,携带的鉴权信息。 |
X-Sdk-Date |
否 |
String |
使用AK/SK方式认证时必选,请求的发生时间。 格式为(YYYYMMDD'T'HHMMSS'Z')。 |
X-App-UserId |
否 |
String |
第三方用户ID。不允许输入中文。 |
响应参数
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
X-Request-Id |
String |
请求ID。 |
参数 |
参数类型 |
描述 |
---|---|---|
project_id |
String |
租户id |
asset_id |
String |
资产ID。 |
asset_name |
String |
资产名称。 |
asset_description |
String |
资产描述。 |
app_user_id |
String |
第三方用户ID。 说明:
|
create_time |
String |
资产创建时间。 |
update_time |
String |
资产更新时间。 |
asset_type |
String |
资产类型。 公共资产类型:
分身数字人资产类型:
3D数字人资产类型:
|
asset_state |
String |
资产状态。
|
fail_type |
String |
失败原因。
|
reason |
String |
冻结/解冻/失败 原因。 |
tags |
Array of strings |
标签列表。 |
asset_extra_meta |
AssetExtraMeta object |
资产元数据。根据资产类型选择其中一个填写。 |
system_properties |
Array of SystemProperty objects |
设置系统属性。 |
files |
Array of AssetFileInfo objects |
资产下的文件。 |
参数 |
参数类型 |
描述 |
---|---|---|
human_model_meta |
HumanModelAssetMeta object |
数字人模型元数据。 |
voice_model_meta |
VoiceModelAssetMeta object |
音色模型元数据。 |
ppt_meta |
PPTAssetMeta object |
PPT资产元数据信息。 |
animation_meta |
AnimationAssetMeta object |
动作动画资产元数据。 |
scene_meta |
SceneAssetMeta object |
场景元数据。 |
material_meta |
MaterialAssetMeta object |
素材元数据。 |
human_model_2d_meta |
HumanModel2DAssetMeta object |
分身模型元数据 |
image_meta |
ImageAssetMeta object |
图片元数据 |
video_meta |
VideoAssetMeta object |
视频元数据,自动提取获得。 |
audio_meta |
AudioAssetMeta object |
音频元数据,自动提取获得。 |
参数 |
参数类型 |
描述 |
---|---|---|
style_id |
String |
数字人模型风格ID。
|
modeling_type |
String |
数字人模型建模类型。
|
modeling_job_id |
String |
建模任务ID。 |
model_properties |
HumanModelMetaProperties object |
记录模型配置信息 |
components |
Array of ComponentInfo objects |
可替换组件列表。 |
参数 |
参数类型 |
描述 |
---|---|---|
whole_model_base_file_id |
String |
当前模型中的WHOLE_MODEL是基于哪个file_id生成的,如果当前记录的信息与MAIN文件的file_id一致,那就认为已经生成过,无需再进行全模型导出 |
load_model_file_id |
String |
当前用于加载的file_id信息,若为空或未匹配到,则使用MAIN文件 |
参数 |
参数类型 |
描述 |
---|---|---|
component_name |
String |
组件名称。 |
component_type |
String |
组件类型。 |
component_desc |
String |
组件描述。 |
参数 |
参数类型 |
描述 |
---|---|---|
order |
Integer |
展示顺序 |
model_type |
String |
音色资产类型。
|
sex |
String |
音色性别。
默认UNKNOW。 |
language |
String |
音色语言。
默认UNKNOW。 |
speed_ratio |
Float |
语速缩放比例 |
volume_ratio |
Float |
音量缩放比例 |
is_realtime_voice |
Boolean |
该音色是否支持实时合成,默认是true。 说明:
|
voice_capability |
VoiceCapability object |
音色资产支持的能力集。 说明:
音色能力集只允许查询,不允许设置 |
external_voice_meta |
ExternalVoiceAssetMeta object |
第三方TTS音色元数据。 |
参数 |
参数类型 |
描述 |
---|---|---|
is_support_phoneme |
Boolean |
是否支持多音字。 |
is_support_break_time |
Boolean |
是否支持停顿。 |
is_support_break_strength |
Boolean |
是否支持韵律。 |
is_support_speed |
Boolean |
是否支持全局语速。 |
is_support_prosody |
Boolean |
是否支持局部语速。 |
is_support_ssml_say_as |
Boolean |
是否支持SSML的say-as标签。 |
is_support_ssml_sub |
Boolean |
是否支持SSML的sub标签。 |
is_support_word |
Boolean |
是否支持连读。 |
参数 |
参数类型 |
描述 |
---|---|---|
provider |
String |
第三方TTS供应商类型。
|
参数 |
参数类型 |
描述 |
---|---|---|
auto_analysis |
Boolean |
PPT是否需要自动解析。 |
ppt_analysis_status |
String |
PPT解析状态。
|
error_info |
ErrorResponse object |
错误信息 |
page_count |
Integer |
PPT页面总数。 |
pages |
Array of PPTPageInfo objects |
PPT页面图片。 |
参数 |
参数类型 |
描述 |
---|---|---|
page_no |
Integer |
页面编号。 |
file_id |
String |
页面对应图片文件ID。 |
page_content |
String |
讲解词(从备注中提取)。 |
参数 |
参数类型 |
描述 |
---|---|---|
style_id |
String |
数字人模型风格ID。 |
duration |
Float |
动作动画时长。 |
auto_analysis |
Boolean |
动作是否需要自动解析。 |
voice_delay |
Float |
语音延迟播放时长。 单位秒。 使用场景举例:入场动画3秒,voice_delay设置成4秒,则语音从入场动画开始后第4秒开始播放。 |
animation_insert_restriction |
String |
动画插入位置限制。
|
参数 |
参数类型 |
描述 |
---|---|---|
components |
Array of SceneComponentInfo objects |
可操作组件列表(如屏幕,灯光,摄像机)。 |
default_configs |
Map<String,SceneComponentInfo> |
默认场景设置(机位,初始人位置)。 |
参数 |
参数类型 |
描述 |
---|---|---|
index |
Integer |
组件索引。 |
component_name |
String |
组件名称。 |
component_type |
String |
组件类型。
|
component_desc |
String |
组件描述。 |
参数 |
参数类型 |
描述 |
---|---|---|
component_name |
String |
素材组件名称。 |
component_type |
String |
素材组件类型。
|
component_desc |
String |
素材组件描述。 |
参数 |
参数类型 |
描述 |
---|---|---|
is_action_editable |
Boolean |
分身数字人的动作是否可编辑。默认不可编辑。 |
is_real_background |
Boolean |
是否是实景分身数字人。实景分身数字人不做背景替换。 |
support_live |
Boolean |
是否支持直播 |
model_version |
String |
分身数字人模型版本。默认是V2版本模型。
|
model_resolution |
String |
分身数字人模型分辨率。默认是1080P。
|
device_names |
Array of strings |
已执行编译任务 |
参数 |
参数类型 |
描述 |
---|---|---|
codec |
String |
图片编码格式,自动提取。 |
width |
Integer |
图片宽度,自动提取 |
height |
Integer |
图片高度,自动提取 |
size |
Number |
大小 |
mode |
String |
Horizontal=横向;Vertical=纵向 |
error_info |
ErrorResponse object |
错误信息 |
参数 |
参数类型 |
描述 |
---|---|---|
video_codec |
String |
视频编码格式 |
width |
Integer |
视频宽度 |
height |
Integer |
视频高度 |
frame_rate |
String |
帧率 |
video_bit_rate |
Integer |
视频平均码率,单位kbps |
duration |
Integer |
时长,单位秒 |
audio_codec |
String |
音频编码格式 |
audio_bit_rate |
Integer |
音频平均码率,单位kbps |
audio_channels |
Integer |
音频声道数 |
sample |
Integer |
采样率,HZ |
mode |
String |
Horizontal=横向;Vertical=纵向 |
error_info |
ErrorResponse object |
错误信息 |
参数 |
参数类型 |
描述 |
---|---|---|
duration |
Integer |
时长,单位秒 |
audio_codec |
String |
音频编码格式 |
audio_bit_rate |
Integer |
音频平均码率,单位kbps |
audio_channels |
Integer |
音频声道数 |
sample |
Integer |
采样率,HZ |
error_info |
ErrorResponse object |
错误信息 |
参数 |
参数类型 |
描述 |
---|---|---|
action |
String |
操作。
|
key |
String |
系统属性。 公共资产属性:
分身数字人资产属性:
3D数字人资产属性:
|
value |
String |
属性值。 |
参数 |
参数类型 |
描述 |
---|---|---|
file_id |
String |
文件ID。 |
file_name |
String |
文件名创建文件时候不区分大小写,最大长度256,最小长度1。 |
file_md5 |
String |
文件内容MD5值,固定24位。 |
file_size |
Long |
文件总的大小,最小1,最大5368709120。 |
file_type |
String |
文件类型(默认提取文件后缀)。 |
asset_file_category |
String |
文件在资产中的分类。每种资产类型包含的文件分类不同。
说明:
|
download_url |
String |
文件下载URL,有效期为24小时。 |
state |
String |
文件状态枚举:
|
reason |
String |
审核失败原因 |
状态码: 400
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
错误码。 |
error_msg |
String |
错误描述。 |
状态码: 404
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
错误码。 |
error_msg |
String |
错误描述。 |
请求示例
GET https://{endpoint}/v1/6a6a1f8354f64dd9b9a614def7b59d83/digital-assets/93769b5a-c8c6-4692-9c95-53933a1f0c93
响应示例
状态码: 200
成功。
{ "asset_id" : "93769b5a-c8c6-4692-9c95-53933a1f0c93", "asset_name" : "男教师", "asset_description" : "男教师模型", "create_time" : "2021-10-30T12:30:35Z", "asset_type" : "HUMAN_MODEL", "asset_state" : "ACTIVED", "files" : [ { "file_id" : "24bad716-87b1-45e5-8912-6102f7693265", "file_name" : "male001.bin", "file_md5" : "38b8c2c1093dd0fec383a9d9ac940515", "file_size" : 31032142, "file_type" : "bin", "asset_file_category" : "MAIN", "download_url" : "https://{endpoint}:443/05a8ae5925000fb72f83c0091083231a/ca40212e1cdb64ab5f74446bcddb8eb9/model/image/24bad716-87b1-45e5-8912-6102f7693265.bin?AccessKeyId=F8DE4LGO7EOYY0CM9ERJ&Expires=1657527524&Signature=BWgSQpc4lMFFrtj2ae67fw679%2Bc%3D" }, { "file_id" : "6dd0c018-7b8e-46aa-8a45-3075c161c500", "file_name" : "male001.png", "file_md5" : "38b8c2c1093dd0fec383a9d9ac940515", "file_size" : 110321, "file_type" : "png", "asset_file_category" : "COVER", "download_url" : "https://{endpoint}:443/05a8ae5925000fb72f83c0091083231a/ca40212e1cdb64ab5f74446bcddb8eb9/model/image/6dd0c018-7b8e-46aa-8a45-3075c161c500.png?AccessKeyId=F8DE4LGO7EOYY0CM9ERJ&Expires=1657527524&Signature=BWgSQpc4lMFFrtj2ae67fw679%2Bc%3D" } ] }
状态码: 400
{ "error_code" : "MSS.00000003", "error_msg" : "Invalid parameter" }
状态码: 404
{ "error_code" : "MSS.00000002", "error_msg" : "Not Found" }
SDK代码示例
SDK代码示例如下。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
package com.huaweicloud.sdk.test; import com.huaweicloud.sdk.core.auth.ICredential; import com.huaweicloud.sdk.core.auth.BasicCredentials; import com.huaweicloud.sdk.core.exception.ConnectionException; import com.huaweicloud.sdk.core.exception.RequestTimeoutException; import com.huaweicloud.sdk.core.exception.ServiceResponseException; import com.huaweicloud.sdk.metastudio.v1.region.MetaStudioRegion; import com.huaweicloud.sdk.metastudio.v1.*; import com.huaweicloud.sdk.metastudio.v1.model.*; public class ShowAssetSolution { public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment String ak = System.getenv("CLOUD_SDK_AK"); String sk = System.getenv("CLOUD_SDK_SK"); String projectId = "{project_id}"; ICredential auth = new BasicCredentials() .withProjectId(projectId) .withAk(ak) .withSk(sk); MetaStudioClient client = MetaStudioClient.newBuilder() .withCredential(auth) .withRegion(MetaStudioRegion.valueOf("<YOUR REGION>")) .build(); ShowAssetRequest request = new ShowAssetRequest(); request.withAssetId("{asset_id}"); try { ShowAssetResponse response = client.showAsset(request); System.out.println(response.toString()); } catch (ConnectionException e) { e.printStackTrace(); } catch (RequestTimeoutException e) { e.printStackTrace(); } catch (ServiceResponseException e) { e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getRequestId()); System.out.println(e.getErrorCode()); System.out.println(e.getErrorMsg()); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# coding: utf-8 import os from huaweicloudsdkcore.auth.credentials import BasicCredentials from huaweicloudsdkmetastudio.v1.region.metastudio_region import MetaStudioRegion from huaweicloudsdkcore.exceptions import exceptions from huaweicloudsdkmetastudio.v1 import * if __name__ == "__main__": # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak = os.environ["CLOUD_SDK_AK"] sk = os.environ["CLOUD_SDK_SK"] projectId = "{project_id}" credentials = BasicCredentials(ak, sk, projectId) client = MetaStudioClient.new_builder() \ .with_credentials(credentials) \ .with_region(MetaStudioRegion.value_of("<YOUR REGION>")) \ .build() try: request = ShowAssetRequest() request.asset_id = "{asset_id}" response = client.show_asset(request) print(response) except exceptions.ClientRequestException as e: print(e.status_code) print(e.request_id) print(e.error_code) print(e.error_msg) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" metastudio "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/metastudio/v1" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/metastudio/v1/model" region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/metastudio/v1/region" ) func main() { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak := os.Getenv("CLOUD_SDK_AK") sk := os.Getenv("CLOUD_SDK_SK") projectId := "{project_id}" auth := basic.NewCredentialsBuilder(). WithAk(ak). WithSk(sk). WithProjectId(projectId). Build() client := metastudio.NewMetaStudioClient( metastudio.MetaStudioClientBuilder(). WithRegion(region.ValueOf("<YOUR REGION>")). WithCredential(auth). Build()) request := &model.ShowAssetRequest{} request.AssetId = "{asset_id}" response, err := client.ShowAsset(request) if err == nil { fmt.Printf("%+v\n", response) } else { fmt.Println(err) } } |
更多编程语言的SDK代码示例,请参见API Explorer的代码示例页签,可生成自动对应的SDK代码示例。
状态码
状态码 |
描述 |
---|---|
200 |
成功。 |
400 |
请求传参异常,包含错误码及对应描述。 |
404 |
无内容。 |
错误码
请参见错误码。