Help Center/ ModelArts/ API Reference/ Training Management/ Obtaining Tags of a Training Job
Updated on 2026-07-24 GMT+08:00

Obtaining Tags of a Training Job

Function

This API is used to obtain the tag information of an existing training job.

This API is used when you need to view the tags of a training job for classification, marking, or management. Before using this API, ensure that the training job exists and you have the required permission. After the query, you will obtain the details of all tags of a training job. If the training job does not exist or you do not have the required permission, 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.

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:tag:list

    List

    -

    -

    -

    -

URI

GET /v2/{project_id}/modelarts-training-job/{training_job_id}/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

training_job_id

Yes

String

Definition: Training job ID. For details, see Obtaining Training Jobs.

Constraints: N/A

Range: N/A

Default Value: N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

tags

Array of TmsTagResp objects

Definition: TMS tag list.

Table 3 TmsTagResp

Parameter

Type

Description

key

String

Definition: Key of a TMS tag.

Range: N/A

value

String

Definition: Value of a TMS tag.

Range: N/A

Example Requests

GET    https://{endpoint}/v2/{project_id}/modelarts-training-job/{training_job_id}/tags

Example Responses

Status code: 200

Queried.

{
  "tags" : [ {
    "key" : "111",
    "value" : "v2"
  }, {
    "key" : "k2",
    "value" : "v2"
  }, {
    "key" : "test",
    "value" : "1122"
  } ]
}

Status Codes

Status Code

Description

200

Queried.

Error Codes

See Error Codes.