latestOpenAPI 3.1.0Apache License Version 2.02026-08-17498525913.3 KB

40169ccdec5c

alarm-controller

Create or Update Alarm (saveAlarm)

Creates or Updates the Alarm. When creating alarm, platform generates Alarm Id as time-based UUID. The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. Referencing non-existing Alarm Id will cause 'Not Found' error.

Platform also deduplicate the alarms based on the entity id of originator and alarm 'type'. For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Alarm entity.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

post/api/alarm

Request body

typestring required

representing type of the Alarm

severity'CRITICAL' | 'MAJOR' | 'MINOR' | 'WARNING' | 'INDETERMINATE' required

Alarm severity

acknowledgedboolean required

Acknowledged

clearedboolean required

Cleared

startTsinteger

Timestamp of the alarm start time, in milliseconds

endTsinteger

Timestamp of the alarm end time(last time update), in milliseconds

ackTsinteger

Timestamp of the alarm acknowledgement, in milliseconds

clearTsinteger

Timestamp of the alarm clearing, in milliseconds

assignTsinteger

Timestamp of the alarm assignment, in milliseconds

{"stackTrail":"components:schemas:JsonNode","oasType":"schema","type":"unknown","description":"A value representing the any type (object or primitive)","example":{}}
propagateboolean

Propagation flag to specify if alarm should be propagated to parent entities of alarm originator

propagateToOwnerboolean

Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator

propagateToTenantboolean

Propagation flag to specify if alarm should be propagated to the tenant entity

propagateRelationTypesstring[]

JSON array of relation types that should be used for propagation. By default, 'propagateRelationTypes' array is empty which means that the alarm will be propagated based on any relation type to parent entities. This parameter should be used only in case when 'propagate' parameter is set to true, otherwise, 'propagateRelationTypes' array will be ignored.

createdTimeinteger

Timestamp of the alarm creation, in milliseconds

namestring required

representing type of the Alarm

status'ACTIVE_UNACK' | 'ACTIVE_ACK' | 'CLEARED_UNACK' | 'CLEARED_ACK' required

status of the Alarm

Example request

{
  "tenantId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "TENANT"
  },
  "customerId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "CUSTOMER"
  },
  "type": "High Temperature Alarm",
  "originator": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "DEVICE"
  },
  "severity": "CRITICAL",
  "acknowledged": true,
  "assigneeId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "USER"
  },
  "startTs": 1634058704565,
  "endTs": 1634111163522,
  "ackTs": 1634115221948,
  "clearTs": 1634114528465,
  "assignTs": 1634115928465,
  "details": {},
  "propagate": true,
  "propagateToOwner": true,
  "propagateToTenant": true,
  "id": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "ALARM"
  },
  "createdTime": 1634058704567,
  "name": "High Temperature Alarm",
  "status": "ACTIVE_UNACK"
}

Response

OK

typestring required

representing type of the Alarm

severity'CRITICAL' | 'MAJOR' | 'MINOR' | 'WARNING' | 'INDETERMINATE' required

Alarm severity

acknowledgedboolean required

Acknowledged

clearedboolean required

Cleared

startTsinteger

Timestamp of the alarm start time, in milliseconds

endTsinteger

Timestamp of the alarm end time(last time update), in milliseconds

ackTsinteger

Timestamp of the alarm acknowledgement, in milliseconds

clearTsinteger

Timestamp of the alarm clearing, in milliseconds

assignTsinteger

Timestamp of the alarm assignment, in milliseconds

{"stackTrail":"components:schemas:JsonNode","oasType":"schema","type":"unknown","description":"A value representing the any type (object or primitive)","example":{}}
propagateboolean

Propagation flag to specify if alarm should be propagated to parent entities of alarm originator

propagateToOwnerboolean

Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator

propagateToTenantboolean

Propagation flag to specify if alarm should be propagated to the tenant entity

propagateRelationTypesstring[]

JSON array of relation types that should be used for propagation. By default, 'propagateRelationTypes' array is empty which means that the alarm will be propagated based on any relation type to parent entities. This parameter should be used only in case when 'propagate' parameter is set to true, otherwise, 'propagateRelationTypes' array will be ignored.

createdTimeinteger

Timestamp of the alarm creation, in milliseconds

namestring required

representing type of the Alarm

status'ACTIVE_UNACK' | 'ACTIVE_ACK' | 'CLEARED_UNACK' | 'CLEARED_ACK' required

status of the Alarm

Example response

{
  "tenantId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "TENANT"
  },
  "customerId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "CUSTOMER"
  },
  "type": "High Temperature Alarm",
  "originator": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "DEVICE"
  },
  "severity": "CRITICAL",
  "acknowledged": true,
  "assigneeId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "USER"
  },
  "startTs": 1634058704565,
  "endTs": 1634111163522,
  "ackTs": 1634115221948,
  "clearTs": 1634114528465,
  "assignTs": 1634115928465,
  "details": {},
  "propagate": true,
  "propagateToOwner": true,
  "propagateToTenant": true,
  "id": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "ALARM"
  },
  "createdTime": 1634058704567,
  "name": "High Temperature Alarm",
  "status": "ACTIVE_UNACK"
}