Obtaining the Server Alarm Trend
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/alarms/trend
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 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
from |
Yes |
Integer |
Definition Query start timestamp, in seconds. Constraints from must be smaller than to. Range The value is in timestamp format. Default Value N/A |
to |
Yes |
Integer |
Definition Query end timestamp, in seconds. Constraints from must be smaller than to. Range The value is in timestamp format. 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 |
---|---|---|
fault_hosts |
Array of FaultHost objects |
Definition Trend of faulty servers. Constraints N/A |
alarm_daily_new_trends |
Array of AlarmDailyTrend objects |
Definition Daily new alarms. Constraints N/A |
Parameter |
Type |
Description |
---|---|---|
fault_date |
DateTime |
Definition Alarm time. Constraints N/A Range N/A Default Value N/A |
new_fault_host |
Integer |
Definition The number of new faulty servers. Constraints N/A Range N/A Default Value N/A |
fault_host |
Array of strings |
Definition SN of a faulty server. Constraints N/A Range N/A Default Value N/A |
Parameter |
Type |
Description |
---|---|---|
alarm_date |
DateTime |
Definition Alarm time. Constraints N/A Range N/A Default Value N/A |
alarm_devices |
Array of AlarmDevice objects |
Definition Alarm device information, including the device type and the number of alarms. Constraints N/A |
alarm_levels |
Array of AlarmLevel objects |
Definition Alarm severity. Constraints N/A |
Parameter |
Type |
Description |
---|---|---|
alarm_device |
String |
Definition Alarm hardware. Constraints N/A Range N/A Default Value N/A |
alarm_number |
Integer |
Definition The number of alarms. Constraints N/A Range N/A Default Value N/A |
Parameter |
Type |
Description |
---|---|---|
alarm_level |
Integer |
Definition Alarm severity. Constraints N/A Range N/A Default Value N/A |
alarm_number |
Integer |
Definition The number of alarms. Constraints N/A Range N/A Default Value N/A |
Status code: 400
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
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
Parameter |
Type |
Description |
---|---|---|
- |
String |
- |
Status code: 500
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 alarm trend
GET https://{endpoint}/v1/{project_id}/physicalservers/alarms/trend?from={from}&to={to}
Example Responses
Status code: 200
{ "fault_hosts" : [ { "fault_date" : "2025-06-04T00:00:00+08:00", "new_fault_host" : 0, "fault_host" : [ ] } ], "alarm_daily_new_trends" : [ { "alarm_date" : "2025-06-04T00:00:00+08:00", "alarm_devices" : [ { "alarm_device" : "power_health", "alarm_number" : 0 }, { "alarm_device" : "nic_health", "alarm_number" : 0 }, { "alarm_device" : "memory_health", "alarm_number" : 0 }, { "alarm_device" : "fan_health", "alarm_number" : 0 }, { "alarm_device" : "disk_health", "alarm_number" : 0 }, { "alarm_device" : "cpu_health", "alarm_number" : 0 }, { "alarm_device" : "other_health", "alarm_number" : 0 } ], "alarm_levels" : [ { "alarm_level" : 1, "alarm_number" : 0 }, { "alarm_level" : 2, "alarm_number" : 0 }, { "alarm_level" : 3, "alarm_number" : 0 }, { "alarm_level" : 4, "alarm_number" : 0 } ] } ] }
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.
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