Obtaining Server Overview
Function
This API is used to query the server overview, server startup status, and server operating status.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/physicalservers/status
Parameter | Mandatory | Type | Description |
|---|---|---|---|
project_id | Yes | String | Definition Project ID. Constraints N/A Range Project ID of the account. Default Value N/A |
Request Parameters
Parameter | Mandatory | Type | Description |
|---|---|---|---|
X-Auth-Token | Yes | String | Definition Requests for calling an API can be authenticated using a token. If token-based authentication is used, this parameter is mandatory and must be set to a user token. Constraints N/A Range N/A Default Value N/A |
Response Parameters
Status code: 200
Parameter | Type | Description |
|---|---|---|
server_status | ServerStatus object | Definition Server overview statistics. Constraints N/A |
server_power_status | ServerPowerStatus object | Definition Objects of server power statuses. Constraints N/A |
Parameter | Type | Description |
|---|---|---|
total | ServerState object | Definition The total number of servers. Constraints N/A |
ok | ServerState object | Definition Server overview when the server status is OK. Constraints N/A |
warning | ServerState object | Definition Server overview when the server status is Warning. Constraints N/A |
critical | ServerState object | Definition Server overview when the server status is Critical. Constraints N/A |
health | ServerState object | Definition Server overview when the server status is Health. Constraints N/A |
unhealth | ServerState object | Definition Server overview when the server status is Unhealth. Constraints N/A |
isolation | ServerState object | Definition Server overview when the server status is Isolation. Constraints N/A |
Parameter | Type | Description |
|---|---|---|
count | Integer | Definition Quantity. Constraints N/A Range N/A Default Value N/A |
dc_stats | Map<String,String> | Definition Mapping between data center names and quantities. Constraints N/A |
Parameter | Type | Description |
|---|---|---|
on | Integer | Definition The number of servers in the power-on state. Constraints N/A Range N/A Default Value N/A |
off | Integer | Definition The number of servers in the power-off state. Constraints N/A Range N/A Default Value N/A |
unknown | Integer | Definition The number of servers whose power supply in the unknown state. Constraints N/A Range N/A Default Value N/A |
Status code: 400
Parameter | Type | Description |
|---|---|---|
error_code | String | Definition Error code. |
error_msg | String | Definition Error description. |
Status code: 401
Parameter | Type | Description |
|---|---|---|
error_code | String | Definition Error code. |
error_msg | String | Definition Error description. |
Status code: 429
Parameter | Type | Description |
|---|---|---|
- | String |
Status code: 500
Parameter | Type | Description |
|---|---|---|
error_code | String | Definition Error code. |
error_msg | String | Definition Error description. |
Example Requests
Obtaining server overview
GET https://{endpoint}/v1/{project_id}/physicalservers/status Example Responses
Status code: 200
{
"server_status" : {
"total" : {
"count" : 1758,
"dc_stats" : {
"BBB" : 599,
"DC-062501" : 1,
"DC-Room" : 1,
"EquipmentRoom_001" : 16,
"EquipmentRoom_0707" : 501,
"EquipmentRoom_0707_new" : 2,
"EquipmentRoom_CloudDC_pytest" : 2,
"Equipment_room001" : 2,
"Room_001" : 2,
"Room_002" : 1,
"Room_room_003" : 3,
"chennantest001" : 1,
"chntest001" : 5,
"chntest002" : 1,
"irack_dc_TEST" : 26,
"pref_donot_operation_dc_1" : 56,
"pref_room_1003" : 1,
"pref_room_1883" : 1,
"pref_room_1903" : 1,
"rooooooom_1347" : 1,
"rooooooom_698" : 513,
"rooooooom_700" : 20,
"rooooooom_701" : 1,
"test" : 1
}
},
"ok" : {
"count" : 12,
"dc_stats" : {
"BBB" : 9,
"EquipmentRoom_001" : 1,
"rooooooom_698" : 1,
"rooooooom_700" : 1
}
},
"warning" : {
"count" : 0,
"dc_stats" : { }
},
"critical" : {
"count" : 1,
"dc_stats" : {
"rooooooom_700" : 1
}
},
"health" : {
"count" : 12,
"dc_stats" : {
"BBB" : 9,
"EquipmentRoom_001" : 1,
"rooooooom_698" : 1,
"rooooooom_700" : 1
}
},
"isolation" : {
"count" : 0,
"dc_stats" : { }
}
},
"server_power_status" : {
"on" : 9,
"off" : 4,
"unknown" : 1745
}
} Status Codes
Status Code | Description |
|---|---|
200 | |
400 | Invalid request parameter. |
401 | The request is not authenticated. |
429 | The request is overloaded. |
500 | Internal server error. |
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
