Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: luhuayi <luhuayi@huawei.com> Co-committed-by: luhuayi <luhuayi@huawei.com>
9.4 KiB
Querying Resource Statistics
Function
This API is used to query resource statistics.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/resource-statistics
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Definition Project ID. To obtain the value, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
namespace |
No |
String |
Definition Namespace. Constraints N/A Range The value can only be dws. Default Value dws |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
cluster_statistics |
StatusStatistics object |
Definition Cluster resource statistics. Range N/A |
node_statistics |
StatusStatistics object |
Definition Node resource statistics. Range N/A |
Example Requests
Query resource statistics.
GET https://{Endpoint}/v1/0536cdee2200d5912f7cc00b877980f1/resource-statistics
Example Responses
Status code: 200
Resource statistics queried.
{
"cluster_statistics" : {
"active" : 2,
"total" : 2
},
"node_statistics" : {
"active" : 6,
"total" : 36
}
}
Status Codes
Status Code |
Description |
|---|---|
200 |
Resource statistics queried. |
400 |
Request error. |
401 |
Authentication failed. |
403 |
You do not have required permissions. |
500 |
Internal server error. |
503 |
Service unavailable. |