Updated on 2025-07-25 GMT+08:00

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

Table 1 URI parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

The project ID.

Constraints

N/A

Range

The project ID of the account

Default Value

N/A

Request Parameters

Table 2 Request header parameter

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

Table 3 Response body parameters

Parameter

Type

Description

server_status

ServerStatus object

Definition

Response object of the server operating status.

Constraints

N/A

server_power_status

ServerPowerStatus object

Definition

Server power status object.

Constraints

N/A

Table 4 ServerStatus

Parameter

Type

Description

total

ServerState object

Definition

All objects of the servers in all operating statuses.

Constraints

N/A

ok

Map<String,ServerState>

Definition

All objects of the servers in the ok operating state.

Constraints

N/A

warning

Array of ServerState objects

Definition

All objects of the servers in the warning operating state.

Constraints

N/A

critical

Array of ServerState objects

Definition

All objects of the servers in the critical operating state.

Constraints

N/A

health

Array of ServerState objects

Definition

All objects of the servers in the health operating state.

Constraints

N/A

unhealth

Array of ServerState objects

Definition

All objects of the servers in the unhealth operating state.

Constraints

N/A

isolation

Array of ServerState objects

Definition

All objects of the servers in the isolation operating state.

Constraints

N/A

Table 5 ServerState

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

Table 6 ServerPowerStatus

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 server power supplies in the unknown state.

Constraints

N/A

Range

N/A

Default Value

N/A

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

Constraints

N/A

Range

N/A

Default Value

N/A

error_msg

String

Definition

Error message.

Constraints

N/A

Range

N/A

Default Value

N/A

Status code: 401

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

Constraints

N/A

Range

N/A

Default Value

N/A

error_msg

String

Definition

Error message.

Constraints

N/A

Range

N/A

Default Value

N/A

Status code: 429

Table 9 Response body parameter

Parameter

Type

Description

-

String

-

Status code: 500

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code.

Constraints

N/A

Range

N/A

Default Value

N/A

error_msg

String

Definition

Error message.

Constraints

N/A

Range

N/A

Default Value

N/A

Example Requests

Request for 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

For details, see Error Codes.