Help Center/ ModelArts/ API Reference/ Model Training/ Training Job Management (New Version)/ Query the Image Saving Task of a Training Job
Updated on 2026-09-01 GMT+08:00

Query the Image Saving Task of a Training Job

Function

This API is used to obtain the image saving task information of a specified training job on ModelArts.

This API applies to the following scenario: When you need to view the image saving task status of a specific training job, you can use this API to obtain the task information. Before using this API, ensure that you have obtained the training job ID and have the permission to view image saving tasks. After the query is complete, the platform returns the status, configurations, and other information of the image saving task. If the training job ID does not exist or you do not have the operation 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:trainJob:get

    Read

    trainJob *

    g:ResourceTag/<tag-key>

    -

    -

    -

    • modelarts:poolType

    • modelarts:poolId

URI

GET /v2/{project_id}/training-jobs/{training_job_id}/tasks/{task_id}/save-image-job

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

Constraints: N/A

Range: The value can contain 1 to 64 characters. Only letters, digits, and hyphens (-) are allowed.

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

task_id

Yes

String

Definition: Task ID of a training job. You can obtain the value from the status.tasks field in the training job details.

Constraints: N/A

Range: For a single node, the default value is worker-0. For multiple nodes, the value is worker-0, worker-1, and so on.

Default Value: N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

name

String

Definition: Image name.

Range: The name can contain a maximum of 512 characters. Lowercase letters, digits, hyphens (-), underscores (_), and periods (.) are allowed.

namespace

String

Definition: Organization to which the image belongs. You can create and view an organization on the Organization Management page of the SWR console.

Range: N/A

tag

String

Definition: Image tag.

Range: The value can contain a maximum of 64 characters. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed.

description

String

Definition: Image description.

Range: Up to 512 characters

status

String

Definition: Image status.

Range:

  • INIT: The instance is being initialized.

  • CREATING: The image is being saved. In this state, the training job is unavailable.

  • CREATE_FAILED: Saving the image failed.

  • ACTIVE: The image is saved. You can view the saved image on the SWR console and create a training job based on the saved image.

message

String

Definition: Creation information displayed during image saving.

Range: N/A

create_time

Long

Definition: Time when the image was created, which is a Unix timestamp in milliseconds, for example, 1686718209968.

Range: N/A

Example Requests

Query the worker-0 image saving task of the training job whose UUID is 2cd88daa-31a4-40a8-a58f-d186b0e93e4f.

GET https://{endpoint}/v2/{project_id}/training-jobs/2cd88daa-31a4-40a8-a58f-d186b0e93e4f/tasks/worker-0/save-image-job

Example Responses

Status code: 200

The image saving task of the training job is queried successfully.

{
  "name" : "imagesave",
  "namespace" : "dev",
  "tag" : "0.1",
  "description" : "hello world!",
  "status" : "ACTIVE",
  "message" : "building",
  "create_time" : 1686718209968
}

Status Codes

Status Code

Description

200

The image saving task of the training job is queried successfully.

Error Codes

See Error Codes.