Querying the List of Physical Servers
Function
This API is used to query the list of physical servers.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/physicalservers
|
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 |
|---|---|---|
|
servers |
Array of PhysicalServer objects |
Definition Pagination of the server list. Constraints N/A |
|
page_info |
PageInfo object |
Definition Pagination information. Constraints N/A |
|
count |
Integer |
Definition The total number of servers. Constraints N/A Range N/A Default Value N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Definition Server ID. Constraints N/A Range The value is in UUID format. Default Value N/A |
|
name |
String |
Definition Name of a physical server, which is used as the hostname when an instance is created. Constraints N/A Range N/A Default Value N/A |
|
project_id |
String |
Definition Project ID. Constraints N/A Range Project ID of the account. Default Value N/A |
|
domain_id |
String |
Definition Tenant ID. Constraints N/A Range N/A Default Value N/A |
|
manage_state |
String |
Definition Server management status. Constraints N/A Range
Default Value N/A |
|
power_state |
String |
Definition Power supply status. The power_state value changes according to different operations and events. The common status transition process is as follows:
Constraints N/A Range Default Value N/A |
|
health_state |
String |
Definition Hardware health status. Constraints N/A Range The system detects potential problems or minor exceptions. The server can still run properly, but the risk increases. The system detects a severe hardware fault or an extreme exception. The problem has affected the stability, performance, or availability of the server. The health status cannot be detected. The status is unknown. Default Value N/A |
|
onboard_time |
String |
Definition Onboarding time. Constraints N/A Range The value is in RFC 3339 format, for example, 2025-04-22T12:03:18.50083+08:00. Default Value N/A |
|
location |
Location object |
Definition Location of the physical server. Constraints N/A |
|
hardware_attributes |
HardwareSummary object |
Definition Hardware overview information, including the server manufacturer, model, and serial number. Constraints N/A |
|
tags |
Array of Tag objects |
Definition Tags. Constraints N/A |
|
error |
ErrorStatus object |
Definition Error object returned upon a failure. Constraints N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
dc |
String |
Definition Data center name. Constraints N/A Range Maximum length: 256 bytes. Only letters (case-sensitive), digits, underscores (_), hyphens (-), and periods (.) are allowed. Default Value N/A |
|
rack |
String |
Definition Cabinet name. Constraints N/A Range Maximum length: 128 bytes. Only letters (case-sensitive), digits, underscores (_), hyphens (-), and periods (.) are allowed. It cannot start with hyphens (-) or periods (.) Default Value N/A |
|
unit |
String |
Definition Rack U space. Constraints N/A Range Maximum length: 128 characters. Default Value N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
sn |
String |
Definition serial number Constraints N/A Range N/A Default Value N/A |
|
manufacturer |
String |
Definition Manufacturer. Constraints N/A Range N/A Default Value N/A |
|
model |
String |
Definition Model. Constraints N/A Range N/A Default Value N/A |
|
main_board_manufacturer |
String |
Definition Mainboard vendor. Constraints N/A Range N/A Default Value N/A |
|
main_board_serial_number |
String |
The mainboard serial number. |
|
Parameter |
Type |
Description |
|---|---|---|
|
key |
String |
Definition Tag key. Constraints N/A Range Default Value N/A |
|
value |
String |
Definition Tag value. Constraints N/A Range Default Value N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Definition Error code. |
|
error_msg |
String |
Definition Error description. |
|
error_type |
String |
Definition Error type. Constraints N/A Range Default Value N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
next_marker |
String |
Definition Query address of the next page. Constraints N/A Range N/A Default Value N/A |
|
previous_marker |
String |
Definition Query address of the previous page. Constraints N/A Range N/A Default Value N/A |
|
current_count |
Integer |
Definition Number of records returned on this page. 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
Querying the list of physical servers
GET https://{endpoint}/v1/{project_id}/physicalservers?marker={marker}&limit={limit}
Example Responses
Status code: 200
Physical servers are returned by page.
{
"servers" : [ {
"id" : "0195d690-cfd4-7303-a1e1-707f2f863921",
"name" : "test-host-102",
"project_id" : "e750c9499ffb4244add7398a0af4f215",
"domain_id" : "aef171e13fe24458a819bb42870571d9",
"manage_state" : "ready",
"power_state" : "",
"health_state" : "",
"onboard_time" : "2025-03-27T15:46:09.492642+08:00",
"location" : {
"dc" : "Room_room_003",
"rack" : "cabinet_room_003_1",
"unit" : "SN_26_151_241_102"
},
"hardware_attributes" : {
"sn" : "SN_26_151_241_102",
"manufacturer" : "Huawei",
"model" : "2288H v108"
},
"tags" : [ {
"key" : "2",
"value" : "3"
} ],
"error" : {
"error_code" : "",
"error_msg" : "inspect imetal job failed, please contact oncall",
"error_type" : "verify_server_error"
}
} ],
"page_info" : {
"next_marker" : "0197f36d-d84f-7d92-8d00-dd29b81b9498",
"current_count" : 1000
},
"count" : 1763
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Physical servers are returned by page. |
|
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
