Updated on 2025-05-29 GMT+08:00

Querying Hardware Alarm Information

Function

Query alarms of hardware devices.

SLA Item

Definition

Request success rate

≥ 99%

Availability

Tier 2

Data consistency

Strongly consistent

Throughput

60 times/minute

TP50 request latency

200 ms

TP99.9 request latency

300 ms

Precautions

None

Calling Method

GET

URI

/rest/dataapi/homs/open-api/v1/DeviceAlarm/info

Path parameters

None

Query parameters

Parameter

Mandatory

Type

Value Range

Description

cleared

No

String

None

Alarm clearance flag. The value can be 0 (uncleared) or 1 (cleared).

service_type

No

String

None

Cloud service name, which can be Server or Network.

begin_time

Yes

String

Millisecond timestamp.

Start time.

end_time

Yes

String

Millisecond timestamp.

End time.

page_size

Yes

int

0~1000

Page size.

offset_value

Yes

int

None

Start value for the query.

Request

  • Request header parameters

    Parameter

    Mandatory

    Type

    Value Range

    Description

    X-APIG-Appcode

    Yes

    String

    None

    AppCode allocated by SRE

    x-auth-token

    Yes

    String

    None

    IAM authentication token for the calling party APIG

    x-hcso-domainid

    Yes (HCS Online scenario)

    No (other scenarios)

    String

    None

    ID of the accessed tenant.

    x-hcso-appcode

    Yes

    String

    None

    AppCode allocated by SRE

  • Request body parameters

    None

  • Sample request
    GET /rest/dataapi/homs/open-api/v1/DeviceAlarm/info HTTP/1.1 
    Host: example.com 
    Content-Type: application/json 
    Accept: application/json
    X-APIG-Appcode: xxx 
    x-auth-token: xxx 
    x-hcso-domainid: xxx
    x-hcso-appcode: xxx

Response

  • Response parameters
    • Response status code 200: The Data object is returned. The Data object has the following attributes.

      Parameter

      Mandatory

      Type

      Value Range

      Description

      total

      Yes

      int32

      None

      Total number of data records.

      list

      Yes

      List<Item>

      None

      Process object information.

      The Item object has the following attributes.

      Parameter

      Mandatory

      Type

      Value Range

      Description

      csn

      Yes

      String

      None

      Alarm sequence number.

      alarm_name

      Yes

      String

      None

      Alarm name.

      alarm_id

      Yes

      int32

      None

      Alarm ID.

      severity

      Yes

      String

      None

      Alarm severity. The value can be 1 (critical), 2 (major), 3 (minor), or 4 (warning).

      event_type

      Yes

      String

      None

      Event type.

      origin_system_type

      Yes

      String

      None

      Source system type.

      origin_system_name

      Yes

      String

      None

      Source system name.

      moi

      Yes

      String

      None

      Information for alarm locating, which uniquely identifies the alarm.

      additional_information

      Yes

      String

      None

      Additional information.

      latest_occur_utc

      Yes

      String

      None

      UTC time when the latest alarm is generated.

      first_occur_utc

      Yes

      String

      None

      UTC time when an alarm occurs for the first time.

      meName

      Yes

      String

      None

      Alarm object name.

      count

      Yes

      String

      None

      Number of alarm occurrences.

      probable_cause

      Yes

      String

      None

      Possible cause of an alarm.

      region

      Yes

      String

      None

      Region name.

      dc_name

      Yes

      String

      None

      Data center name.

      res_pool_name

      Yes

      String

      None

      Information about the pod for which an alarm is reported.

      azone_name

      Yes

      String

      None

      AZ name.

      tenant

      Yes

      String

      None

      Tenant name.

      nativeMeDn

      Yes

      String

      None

      Alarm IP address.

      moc

      Yes

      String

      None

      Object type.

      cleared

      Yes

      String

      None

      Whether the alarm is cleared.

      clear_category

      Yes

      String

      None

      Whether an alarm can be automatically cleared.

      clear_utc

      Yes

      String

      None

      UTC time when an alarm is cleared.

      clear_user

      Yes

      String

      None

      User who clears an alarm.

      clear_type

      Yes

      String

      None

      Alarm clearance type.

      acked

      Yes

      String

      None

      Alarm acknowledgment flag. The value can be 0 (unacknowledged) or 1 (acknowledged).

      ack_user

      Yes

      String

      None

      User who acknowledges the alarm.

      ack_utc

      Yes

      String

      None

      UTC time when the alarm is acknowledged.

      merge_key

      Yes

      String

      None

      Merging key.

      me_category

      Yes

      String

      None

      Cloud service for which the alarm is generated.

      me_type

      Yes

      String

      None

      Service for which the alarm is generated.

      product_name

      Yes

      String

      None

      Microservice for which the alarm is generated.

      LogicalRegionId

      Yes

      String

      None

      Region code.

      serviceAffectedType

      Yes

      String

      None

      Whether the alarm affects services.

      affectedService

      Yes

      String

      None

      Name of the service affected by the alarm.

      meDn

      Yes

      String

      None

      Alarm object ID.

  • Sample response
    HTTP/1.1 200 OK 
    Date:Tue,18 Jul 2023 09:58:01 GMT
    Server: example.com
    Content-Type: application/json;charset=UTF8 
    { 
    "total": "Total number",
        "list": [ 
                 { 
                 "csn": "12346578", 
    "alarm_name": "Alarm name",
    "alarm_id": "Alarm ID",
    "severity": "Alarm severity: 1-critical, 2-major, 3-minor, 4-warning",
    "event_type": "Event type",
    "origin_system_type": "Source system type",
    "origin_system_name": "Source system name",
    "moi": "Object ID used to locate an alarm",
    "additional_information": "Additional information",
    "latest_occur_utc": "UTC time when the latest alarm is generated",
    "first_occur_utc": "UTC time when an alarm occurs for the first time.",
    "meName": "Alarm object name",
    "count": "Number of alarm occurrences",
    "probable_cause": "Possible cause of an alarm.",
    "region": "Region name",
    "dc_name": "Data center name",
    "res_pool_name": "Information about the pod for which an alarm is reported.",
    "azone_name": "Availability zone name",
    "tenant": "Tenant name",
    "nativeMeDn": "Alarm IP address",
    "moc": "Object type",
    "cleared": "Whether the alarm is cleared.",
    "clear_category": "Whether an alarm can be automatically cleared.",
    "clear_utc": "UTC when an alarm is cleared",
    "clear_user": "User who clears an alarm.",
    "clear_type": "Alarm clearance type.",
    "acked": "Alarm acknowledgment flag. The value can be 0 (unacknowledged) or 1 (acknowledged).",
    "ack_user": "User who acknowledges the alarm.",
    "ack_utc": "UTC time when an alarm is acknowledged.",
    "merge_key": "Merging key",
    "me_category": "Cloud service for which the alarm is generated.",
    "me_type": "Service for which the alarm is generated",
    "product_name": "Microservice for which the alarm is generated.",
                 "LogicalRegionId": "cn-north-201", 
    "serviceAffectedType": "Affected service ID.",
    "affectedService": "Name of the service affected by an alarm.",
    "meDn": "Alarm object ID"
                  } 
                ] 
    }

Status Codes

Status Code

Description

200

Operation successful.

400

Parameter error.

401

Token authentication failed.

403

Authentication failed.

404

REST API not found.

Operation Severity

Minor