Help Center/ ModelArts/ API Reference/ Resource Management/ Querying dedicated resource pool Job Statistics
Updated on 2025-11-19 GMT+08:00

Querying dedicated resource pool Job Statistics

Function

This API is used to obtain job statistics of a dedicated resource pool. This API is used when you need to obtain the job running information, resource usage, or job status distribution of a dedicated resource pool. Before using this API, ensure that the dedicated resource pool exists and you have the required permissions (such as administrator permissions or resource management permissions). After the API is called, the system returns the job statistics of the dedicated resource pool, including the total number of jobs, number of running jobs, number of completed jobs, and resource usage. If the dedicated resource pool does not exist, the user does not have the operation permission, or the resource pool is unavailable, the API returns 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 /v2/{project_id}/statistics/pools/{pool_name}/workloads

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

pool_name

Yes

String

Definition: Resource pool to which the job belongs.

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

statistics

statistics object

Definition: Job statistics.

Table 3 statistics

Parameter

Type

Description

total

Integer

Definition: Number of statistics lists.

Range: N/A

items

Array of WorkloadStatistics objects

Definition: Statistics of a specific job type.

Table 4 WorkloadStatistics

Parameter

Type

Description

type

String

Definition: Job type.

Range

  • train: training job

  • infer: inference job

  • notebook: notebook job

total

Integer

Definition: Number of jobs.

Range: N/A

status

status object

Definition: Number of jobs in different states.

Table 5 status

Parameter

Type

Description

Queue

Integer

Definition: Number of queuing jobs.

Range: N/A

Pending

Integer

Definition: Number of pending jobs.

Range: N/A

Abnormal

Integer

Definition: Number of abnormal jobs.

Range: N/A

Terminating

Integer

Definition: Number of jobs being terminated.

Range: N/A

Creating

Integer

Definition: Number of jobs being created.

Range: N/A

Running

Integer

Definition: Number of running jobs.

Range: N/A

Completed

Integer

Definition: Number of completed jobs.

Range: N/A

Terminated

Integer

Definition: Number of terminated jobs.

Range: N/A

Failed

Integer

Definition: Number of jobs that fail to be executed.

Range: N/A

Status code: 400

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

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

GET https://{endpoint}/v2/{project_id}/statistics/pools/{pool_name}/workloads

Example Responses

Status code: 400

Bad Request.

{
  "error_code" : "ModelArts.50004000",
  "error_msg" : "Bad request."
}

Status code: 404

Not Found.

{
  "error_code" : "ModelArts.50015001",
  "error_msg" : "Pool {name} not found."
}

Status Codes

Status Code

Description

200

OK.

400

Bad Request.

404

Not Found.

Error Codes

See Error Codes.