Help Center/ ModelArts/ API Reference/ Tag Management/ Obtaining All Resource Tags of Nodes
Updated on 2025-05-30 GMT+08:00

Obtaining All Resource Tags of Nodes

Function

This API is used to obtain all tags of nodes in the current project. By default, all workspaces are queried. Tag data is not returned for workspaces on which the user does not have permission.

URI

GET /v1/{project_id}/nodes/tags

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID and Name.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

pool

No

String

Resource pool ID. The value is the metadata.name field in the resource pool details. If this parameter is specified, the resource tags of all nodes in the specified resource pool is returned.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

tags

Tag object

Resource tag list

Table 4 Tag

Parameter

Type

Description

key

String

Tag key

value

String

Tag value

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error codes of ModelArts

error_msg

String

Error message

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error codes of ModelArts

error_msg

String

Error message

Status code: 403

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error codes of ModelArts

error_msg

String

Error message

Example Requests

The following is an example of how to query resource tags of nodes in a specified resource pool.

https://{endpoint}/v1/{project_id}/nodes/tags?pool={pool_name}

Example Responses

Status code: 200

All tags of nodes in the project are obtained.

{
  "tags" : [ {
    "key" : "model_version",
    "values" : [ "0.1", "0.2" ]
  }, {
    "key" : "conda_version",
    "values" : [ "10.2", "11.0" ]
  } ]
}

Status Codes

Status Code

Description

200

All tags of nodes in the project are obtained.

400

Invalid parameter.

401

Authentication failed.

403

Insufficient permission.

Error Codes

See Error Codes.