Querying Asset Details
Function
This API is used to obtain details about a specified asset on ModelArts.
It is used when you need to view the complete metadata, storage location, supported operations, and extended information of an asset. Before using this API, ensure that you have the project access permission and know the ID of the target asset. The platform queries and returns the asset details based on the asset ID. If the asset does not exist or you do not have the required permissions, the API returns an error message.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
modelarts:asset:showAssetDetail
Read
workspace *
g:EnterpriseProjectId
-
-
asset *
-
URI
GET /v2/{project_id}/assets/{asset_id}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition: Huawei Cloud project ID. To obtain a project ID, go to the ModelArts Studio console, press F12 to access the developer tool, refresh the page, find the /rest/me API in the Network tab, and then locate the project_id field in the response of the API. Constraints: The value can contain 1 to 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. Range: N/A Default Value: N/A |
| asset_id | Yes | String | Definition: Asset ID. Constraints: The value can contain 1 to 36 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. Range: N/A Default Value: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| workspace_id | No | String | Definition: Workspace ID. To obtain the value, click the target project name on the platform, and check the project settings page. Constraints: The value can contain 1 to 32 characters. Only letters and digits are allowed. Range: N/A Default Value: N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition: User token. During API authentication using a token, the token is added to requests to get permissions for calling the API. To obtain the token, call /v3/auth/tokens of IAM. The value of X-Subject-Token in the response header is the token. Constraints: N/A Range: N/A Default Value: N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| asset_id | String | Definition: Asset ID. Range: N/A |
| parent_asset_id | String | Definition: Parent asset ID. Range: N/A |
| root_asset_id | String | Definition: Root asset ID. Range: N/A |
| api_version | String | Definition: Asset API version. Range: v1 or v2 |
| asset_name | String | Definition: Asset name. Range: N/A |
| asset_group_id | String | Definition: ID of the asset group to which the asset is to be added. Range: The value can contain 0 to 36 characters. It must be an existing group ID. |
| workspace_id | String | Definition: Workspace ID. To obtain the value, click the target project name on the platform, and check the project settings page. Range: The value can contain 1 to 32 characters. Only letters and digits are allowed. |
| asset_type | String | Definition: Asset type. Range |
| sub_asset_type | String | Definition: Asset subtype. Range: N/A |
| asset_desc | String | Definition: Asset description. Range: The value can contain 0 to 256 characters. |
| asset_code | String | Definition: Asset code. Range: The value can contain 1 to 60 characters. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. |
| asset_version | String | Definition: Asset version. Range: The value must be a number or in the format of x.y.z, where x, y, and z are numbers. |
| tags | map<string, object> | Definition: Asset tag. Range: N/A |
| support_actions | AnyType | Definition: List of operations supported by the asset, for example, SFT (supervised fine-tuning), LORA (LoRA fine-tuning), ONLINE-DEPLOY (real-time deployment), and AgenticRL (reinforcement learning). |
| asset_location | String | Definition: Address for storing the asset file. The value can be an OBS URL or a relative path. Range: The value can contain 0 to 1,024 characters. |
| actions | Array of AssetActionRsp objects | Definition: Supported operation details of an asset. |
| status | String | Definition: Asset status. Range |
| dataset_usage | String | Definition: Dataset usage. Range: The value can contain 1 to 40 characters. |
| dataset_file_formats | Array of strings | Definition: Dataset storage format, for example, JSONL, TXT, MOBI, EPUB, DOCX, or PDF. |
| dataset_type | String | Definition: Dataset modality category, such as audio, images, or video. Range: 1 to 40 characters. |
| dataset_sub_type | String | Definition: Dataset modal segmentation value, for example, semantic segmentation. Range: The value can contain 1 to 40 characters. |
| dataset_schema_format | String | Definition: Dataset logic specification, for example, Pangu format. Range: The value can contain 1 to 40 characters. |
Example Requests
https://{endpoint}/v2/{project_id}/assets/{asset_id} Example Responses
Status code: 200
{
"asset_name" : "Pangu-AIKits-ImageSearch-Large-Tagging",
"asset_desc" : "Pangu-AI Kits-ImageSearch-Large-Tagging models are available on ModelArts Studio for the first time.",
"asset_version" : "0.1.7",
"asset_location" : "Pangu-AIKits-ImageSearch-Large-Tagging/0.1.7/models",
"asset_type" : "ImageSearch",
"sub_asset_type" : "",
"asset_code" : "Pangu-AIKits-ImageSearch-Large-Tagging"
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Asset is queried. |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot