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
|
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
|
Parameter |
Type |
Description |
|---|---|---|
|
statistics |
statistics object |
Definition: Job 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. |
|
Parameter |
Type |
Description |
|---|---|---|
|
type |
String |
Definition: Job type. Range
|
|
total |
Integer |
Definition: Number of jobs. Range: N/A |
|
status |
status object |
Definition: Number of jobs in different states. |
|
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
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Range: N/A |
|
error_msg |
String |
Definition: Error message. Range: N/A |
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot