Updated on 2026-11-12 GMT+08:00

Updating an Asset

Function

This API is used to modify the attributes of a specified asset on ModelArts, including the asset name, description, series, capability, enabling status, tag, and customized attributes.

It is used when you need to modify the metadata of an existing asset or adjust the asset status. Before using this API, ensure that you have the project access permission and know the ID of the target asset. The platform verifies the existence and ownership of the asset and applies the update to the target asset and the assets in the same group. If the asset does not exist, the asset is a preset asset and cannot be modified, 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:updateAsset

    Write

    workspace *

    g:EnterpriseProjectId

    -

    -

    asset *

    -

URI

PUT /v2/{project_id}/assets/{asset_id}

Table 1 Path Parameters

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

Table 2 Query Parameters

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

Table 3 Request header 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

Table 4 Request body parameters

Parameter

Mandatory

Type

Description

asset_name

No

String

Definition: Asset name.

Constraints: The value can contain 2 to 128 characters and must start with a letter and end with a letter or digit. Only letters, digits, hyphens (-), and underscores (_) are allowed.

Range: N/A

Default Value: N/A

asset_desc

No

String

Definition: Asset description.

Constraints: The value can contain 0 to 256 characters.

Range: N/A

Default Value: N/A

asset_group_desc

No

String

Definition: Asset group description.

Constraints: The value can contain 0 to 256 characters.

Range: N/A

Default Value: N/A

asset_series

No

String

Definition: Asset brand, for example, DeepSeek, Qwen, Wan, GPT, Llama, GLM, ERNIE, Mistral, Kimi, and others.

Constraints: The value can contain 1 to 40 characters.

Range: N/A

Default Value: N/A

asset_capabilities

No

Array of strings

Definition: Asset capabilities, represented as a list of free-form text strings (not a strict enumeration). The following convention values are recommended: TextGeneration, ImageUnderstanding, ImageGeneration, VideoGeneration, AgenticRL, or Other.

Constraints: The value can contain 1 to 40 characters.

status

No

String

Definition: Dataset online/offline status.

Constraints: N/A

Range

  • online

  • offline

  • waiting

Default Value: N/A

enabled

No

Boolean

Definition: Whether the asset is available.

Constraints: N/A

Range

  • true: available

  • false: unavailable

Default Value: N/A

is_deleted

No

Boolean

Definition: Whether the dataset is soft deleted.

Constraints: N/A

Range:

true: deleted

false: not deleted

Default Value: N/A

tags

No

map<string, object>

Definition: Asset tag.

Constraints: N/A

properties

No

Properties object

Definition: Extended information about a dataset asset.

Constraints: N/A

Table 5 Properties

Parameter

Mandatory

Type

Description

dataset_num

No

Integer

Definition: Number of records in the dataset.

Constraints: N/A

Range: N/A

Default Value: N/A

dataset_size

No

Long

Definition: Total size of asset files in the dataset.

Constraints: N/A

Range: N/A

Default Value: N/A

prompt_config

No

String

Definition: Relative address of the dataset evaluation template.

Constraints: N/A

Range: N/A

Default Value: N/A

data_copyright

No

String

Definition: Dataset copyright information, including the dataset information, license, and address.

Constraints: N/A

Range: N/A

Default Value: N/A

manifest_file_path

No

String

Definition: Dataset index file address.

Constraints: N/A

Range: N/A

Default Value: N/A

arguments

No

Array of OperatorArgument objects

Definition: Operator parameter list.

Constraints: N/A

updater

No

String

Definition: Dataset modifier information.

Constraints: N/A

Range: N/A

Default Value: N/A

Table 6 OperatorArgument

Parameter

Mandatory

Type

Description

key

Yes

String

Definition: Parameter key.

name

Yes

String

Definition: Parameter name.

type

Yes

String

Definition: Parameter type.

tips

No

String

Definition: Parameter description.

min

No

Float

Definition: Minimum value of a parameter. This parameter is mandatory for numeric parameters.

max

No

Float

Definition: Maximum value of a parameter. This parameter is mandatory for numeric parameters.

between

No

Boolean

Definition: Whether the value is of the interval type.

items

No

Array of OperatorArgItem objects

Definition: Parameter option list.

default_value

No

String

Definition: Default parameter value, which must be provided for mandatory parameters that are invisible to users.

required

No

Boolean

Definition: Whether the parameter is mandatory. The default value is false.

visible

No

Boolean

Definition: Whether this parameter is displayed on the GUI for users to configure. The default value is true.

arg_display_type

No

String

Definition: Parameter frontend component type.

task_category

No

Array of strings

Definition: Task type supported by the dataset. This parameter is available when type is set to dataset.

dataset_catalog

No

Array of strings

Definition: Dataset source. This parameter is available when type is set to dataset.

asset_types

No

String

Definition: Asset type. This parameter is available when type is set to large_model. Use commas (,) to separate multiple asset types.

asset_codes

No

String

Definition: Asset code. This parameter is available when type is set to large_model. Use commas (,) to separate multiple asset codes.

sub_asset_type

No

String

Definition: Sub-asset type of a model. This parameter is available when type is set to large_model.

depend_args

No

Array of DependArg objects

Definition: List of other parameters on which the current parameter depends.

Table 7 OperatorArgItem

Parameter

Mandatory

Type

Description

name

Yes

String

Definition: Parameter name.

value

Yes

String

Definition: Parameter value.

tips

No

String

Definition: Parameter description.

Table 8 DependArg

Parameter

Mandatory

Type

Description

key

Yes

String

Definition: Key value of the dependency parameter.

value

Yes

String

Definition: Value of the dependency parameter. Use commas (,) to separate multiple values.

Response Parameters

Status code: 200

Table 9 Response body parameters

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

  • TEMPLATE

  • DATASET

  • WORKFLOW

  • IMAGE

  • ALGORITHM

  • MODEL

  • DATASET_TEMPLATE

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

  • online

  • offline

  • waiting

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.

Table 10 AssetActionRsp

Parameter

Type

Description

action_type

String

Definition: Asset action type.

Range: N/A

action_dir

String

Definition: Address of the asset action configuration file.

Range: N/A

Example Requests

https://{endpoint}/v2/{project_id}/assets/{asset_id}

{
  "asset_name" : "Qwen3-8B-SFT-update",
  "asset_desc" : "Qwen3-8B fine-tuning model, with updated model details.",
  "asset_group_desc" : "A batch of Qwen3-8B fine-tuning models.",
  "asset_series" : "Qwen",
  "asset_capabilities" : [ "TextGeneration" ]
}

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 updated.

Error Codes

See Error Codes.