Obtaining Statistics About Dedicated Resource Pool Jobs
Function
This API is used to obtain statistics about dedicated resource pool jobs.
URI
GET /v2/{project_id}/statistics/pools/{pool_name}/workloads
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID and Name. |
|
pool_name |
Yes |
String |
ID of the resource pool to which a job belongs. The value is the metadata.name field in the resource pool details. |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
statics |
WorkloadListStatistics object |
Statistics on jobs in the resource pool. |
|
Parameter |
Type |
Description |
|---|---|---|
|
total |
Integer |
Number of statistics lists. |
|
items |
Array of WorkloadStatistics objects |
Statistics of different job types. |
|
Parameter |
Type |
Description |
|---|---|---|
|
type |
String |
Job type. Options:
|
|
total |
Integer |
Number of jobs |
|
status |
WorkloadStatusStatistics object |
Number of jobs in different statuses |
|
Parameter |
Type |
Description |
|---|---|---|
|
Queue |
String |
Number of jobs queued in the resource pool. |
|
Pending |
String |
Number of jobs being scheduled in the resource pool. |
|
Abnormal |
String |
Number of abnormal jobs. |
|
Terminating |
String |
Number of jobs that are being terminated. |
|
Creating |
String |
Number of jobs that are being created. |
|
Running |
String |
Number of running jobs. |
|
Completed |
String |
Number of completed jobs. |
|
Terminated |
String |
Number of terminated jobs. |
|
Failed |
String |
Number of jobs that fail to be executed. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code |
|
error_msg |
String |
Error message |
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code |
|
error_msg |
String |
Error message |
Example Requests
Obtain statistics for resource pool jobs.
GET https://{endpoint}/v2/{project_id}/statistics/pools/{pool_name}/workloads
Example Responses
Status code: 200
OK
{
"statistics" : {
"total" : 234,
"items" : [ {
"type" : "train",
"total" : 234,
"status" : {
"Pending" : 0,
"Queue" : 234,
"Running" : 0
}
} ]
}
}
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.