Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lai, Weijian <laiweijian4@huawei.com> Co-committed-by: Lai, Weijian <laiweijian4@huawei.com>
15 KiB
Querying dedicated resource pool Job Statistics
Function
This API is used to query dedicated resource pool job statistics.
Debugging
You can debug this API through automatic authentication in or use the SDK sample code generated by API Explorer.
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 |
Resource pool to which a job belongs. |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
statistics |
statistics object |
Statistics of a job. |
Parameter |
Type |
Description |
---|---|---|
total |
Integer |
Number of statistics lists. |
items |
Array of WorkloadStatistics objects |
Statistics of a specific job type. |
Parameter |
Type |
Description |
---|---|---|
type |
String |
Type of a job. The options are as follows:
|
total |
Integer |
Number of jobs. |
status |
status object |
Number of jobs in different states. |
Parameter |
Type |
Description |
---|---|---|
Queue |
Integer |
Number of jobs in the queue. |
Pending |
Integer |
Number of jobs in waiting state. |
Abnormal |
Integer |
Number of abnormal jobs. |
Terminating |
Integer |
Number of jobs being terminated. |
Creating |
Integer |
Number of jobs being created. |
Running |
Integer |
Number of running jobs. |
Completed |
Integer |
Number of completed jobs. |
Terminated |
Integer |
Number of terminated jobs. |
Failed |
Integer |
Number of jobs that fail to be executed. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Example Requests
None
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.