Help Center/ ModelArts/ API Reference/ Asset Center/ Querying YAML Content in README
Updated on 2026-11-12 GMT+08:00

Querying YAML Content in README

Function

This API is used to obtain the YAML content in the README file of a specified asset on ModelArts.

It is used when you need to view the extended metadata of a preconfigured asset. You can use this API to parse and return the YAML segment in README. Before using this API, ensure that you have the project access permission and know the ID of the target asset. The platform reads the corresponding README file based on the asset ID, parses the YAML content in the file, and returns the content in JSON format. If the asset does not exist, the asset is not a preset asset, the README file is not found, or you do not have the required permissions, the API returns an error message or empty data.

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:showAssetExtendMessage

    Read

    workspace *

    g:EnterpriseProjectId

    -

    -

    asset *

    -

URI

GET /v2/{project_id}/assets/{asset_id}/extend-message

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

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

{User defined key}

Map<String,Object>

Extended content of the asset in the README file.

Example Requests

https://{endpoint}/v2/{project_id}/assets/{asset_id}/extend-message

Example Responses

Status code: 200

{
  "basic_info" : [ {
    "title" : "Model Type",
    "key" : "model_type",
    "value" : "Image understanding"
  }, {
    "title" : "Languages",
    "key" : "support_language",
    "value" : "30+ languages"
  }, {
    "title" : "Input Type",
    "key" : "input_type",
    "value" : "Text + image"
  }, {
    "title" : "Output Type",
    "key" : "output_type",
    "value" : "Text"
  }, {
    "title" : "Parameter Size",
    "key" : "parameter_size",
    "value" : "30B"
  }, {
    "title" : "Context Length",
    "key" : "context_size",
    "value" : "32K"
  } ],
  "model_capability" : [ {
    "title" : "Non-Thinking",
    "value" : "Supported"
  }, {
    "title" : "Prefix Caching",
    "value" : "Supported"
  } ],
  "infer_feature" : [ {
    "card_specification" : "Snt9b1/Snt9b2/Snt9b3",
    "features" : [ {
      "title" : "Inference Precision",
      "value" : "INT8",
      "icon" : "asset-detail/modeldeploy-fp16.svg",
      "group_name" : "Inference Precision",
      "group" : "inference_precision"
    }, {
      "value" : "Ascend-vLLM",
      "group_name" : "Inference Framework",
      "group" : "inference_framework"
    }, {
      "value" : "Snt9b1/Snt9b2/Snt9b3",
      "group_name" : "PU Type",
      "group" : "card_type"
    }, {
      "value" : 2,
      "group_name" : "Minimum Inference PUs",
      "group" : "card_num"
    } ]
  } ]
}

Status Codes

Status Code

Description

200

YAML content in README is returned.

Error Codes

See Error Codes.