Help Center/ ModelArts/ API Reference/ Resource Tag Management/ Obtaining All Tags of Resource Pools
Updated on 2025-11-19 GMT+08:00

Obtaining All Tags of Resource Pools

Function

This API is used to obtain all tags of resource pools in the current project. By default, all workspaces are queried, but tag data is not returned for workspaces to which you do not have permissions. This API is used when you need to manage, classify, or collect statistics on resource pool tags. Before using this API, ensure that you have the required permission and the resource pool exists. After the API is called, the system returns the resource pool tags of all accessible workspaces in the current project. If you do not have the required permission, the resource pool does not exist, or the project is not created, the API will return 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.

URI

GET /v1/{project_id}/pools/tags

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition: User project ID. For details, see Obtaining a Project ID and Name.

Constraints: N/A

Range: N/A

Default Value: N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Definition: Maximum number of records returned on each page. The default value is 200.

Constraints: N/A

Range: N/A

Default Value: N/A

offset

No

Integer

Definition: Start page for pagination display. The default value is 0.

Constraints: N/A

Range: N/A

Default Value: N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

tags

Array of PoolTag objects

Definition: Resource tag list.

Table 4 PoolTag

Parameter

Type

Description

key

String

Definition: Tag of the resource type.

Range: N/A

values

Array of strings

Definition: Tag value of the resource type.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Status code: 403

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Example Requests

https://{endpoint}/v1/{project_id}/pools/tags

Example Responses

Status code: 200

Obtaining all tags of a specified resource type in a project

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

Status Codes

Status Code

Description

200

Obtaining all tags of a specified resource type in a project

400

Invalid parameter.

401

Authentication failed.

403

Insufficient permission.

Error Codes

See Error Codes.