Alarm - Alarm settings
The Admin interface handles web service calls from the Admin web gui. The base url for this is at:
/api/alarm-center-admin
A JSON file with OpenAPI data about all business-related admin APIs can be downloaded here
.
Get alarm setting
Gets details about a specific alarm:
- GET /v1/alarm-settings/{id}
Return the info of an alarm setting
- Parameters
id (integer) – Setting ID
- Status Codes
200 OK – Success
- DELETE /v1/alarm-settings/{id}
Deletes an alarm setting
- Parameters
id (integer) – The id of the setting
- Status Codes
200 OK – Success
Returns a plain Json negative message if there was a problem retrieving the detail or a Json positive response with the requested details:
{
ID: 1234, // Int
Guid: '777ded6e-34f7-4af9-88de-bb3b1ae06878', // Guid
CreatedDate: '2020-01-01 01:30:00', // Date
CommunityID: 567, // Int
Type: 0, // Int
Priority: 0, // Int (nullable)
MeasurementUnit: 0, // Int (nullable)
ThresholdType: 0, // Int (nullable)
ThresholdTriggerDirection: 0, // Int
Key: 'Threshold', // String
Value: '5', // String (nullable)
IsDefault: false // Boolean
}
The field Type
can be one of the AlarmTypes (Alarm) enumeration.
The field Priority
can be one of the AlarmPriority enumeration.
The field MeasurementUnit
can be one of the ThresholdMeasurementUnits enumeration.
The field Key
can be one of the value described in Alarm Settings.
The field ThresholdType
can be one of the AdditionalValueTypes (Alarm) enumeration.
The field ThresholdTriggerDirection
is set to 0 for every ThresholdType other than Number. For Number types,
a value of 1 means that a lower registered value means an higher priority, while a value of -1 means that an
higher registered value means an higher priority.
Get default alarm settings
Gets the list of the default alarm settings (it’s a Paged List APIs, as explained in the introduction):
The API accepts the following filters in the query params: * types (comma separated list of alarm types, as int value, to be extracted) * priority (single alarm priority, as int value, to be extracted)
Returns a Json positive response with the list of alarms limited by the page settings:
[
{
ID: 1234, // Int
Guid: '777ded6e-34f7-4af9-88de-bb3b1ae06878', // Guid
CreatedDate: '2020-01-01 01:30:00', // Date
CommunityID: 567, // Int
Type: 0, // Int
Priority: 0, // Int (nullable)
MeasurementUnit: 0, // Int (nullable)
ThresholdType: 0, // Int (nullable)
ThresholdTriggerDirection: 0, // Int
Key: 'Threshold', // String
Value: '5', // String (nullable)
IsDefaut: true // Boolean
},
{ .. }
]
The field Type
can be one of the AlarmTypes (Alarm) enumeration.
The field Priority
can be one of the AlarmPriority enumeration.
The field MeasurementUnit
can be one of the ThresholdMeasurementUnits enumeration.
The field Key
can be one of the value described in Alarm Settings.
The field ThresholdType
can be one of the AdditionalValueTypes (Alarm) enumeration.
The field ThresholdTriggerDirection
is set to 0 for every ThresholdType other than Number. For Number types,
a value of 1 means that a lower registered value means an higher priority, while a value of -1 means that an
higher registered value means an higher priority.
The field IsDefault
is always set to true
.
The API will return an Unauthorized response if the requesting user is not the SuperAdmin.
Get customized setting for community
Gets the list of the alarm type for which exists at least one customization for the specified community, and the total customization count (it’s a Paged List APIs, as explained in the introduction):
The API accepts the following filters in the query params: * types (comma separated list of alarm types, as int value, to be extracted)
Returns a Json positive response with the list of alarms limited by the page settings:
[
{
Type: 0, // Int
Count: 0 // Int (nullable)
},
{ .. }
]
The field Type
can be one of the AlarmTypes (Alarm) enumeration.
Get community alarm settings by type
Gets the list of the alarms settings for a specified community and type (it’s a Paged List APIs, as explained in the introduction):
Returns a Json positive response with the list of alarms limited by the page settings:
[
{
ID: 1234, // Int
Guid: '777ded6e-34f7-4af9-88de-bb3b1ae06878', // Guid
CreatedDate: '2020-01-01 01:30:00', // Date
CommunityID: 567, // Int
Type: 0, // Int
Priority: 0, // Int (nullable)
MeasurementUnit: 0, // Int (nullable)
ThresholdType: 0, // Int (nullable)
ThresholdTriggerDirection: 0, // Int
Key: 'Threshold', // String
Value: '5' // String (nullable)
},
{ .. }
]
The field Type
can be one of the AlarmTypes (Alarm) enumeration.
The field Priority
can be one of the AlarmPriority enumeration.
The field MeasurementUnit
can be one of the ThresholdMeasurementUnits enumeration.
The field Key
can be one of the value described in Alarm Settings.
The field ThresholdType
can be one of the AdditionalValueTypes (Alarm) enumeration.
The field ThresholdTriggerDirection
is set to 0 for every ThresholdType other than Number. For Number types,
a value of 1 means that a lower registered value means an higher priority, while a value of -1 means that an
higher registered value means an higher priority.
The field IsDefault
is always set to false
.
Add or edit alarm notes
Persists edits about a new or an existing alarm:
With a request body like this
{
ID: 123, // Int
Community: 'a13e9044-efd2-4f8e-8eb6-f76297d01cff', // Guid
AlarmType: 0, // Int
AlarmPriority: 0, // Int (nullable)
Key: "Threshold", // String
Value: "5" // String (nullable)
}
The field Type
can be one of the AlarmTypes (Alarm) enumeration.
The field Priority
can be one of the AlarmPriority enumeration, is mandatory for Threshold settings and have to be null for Localization settings.
The field Key
can be one of the value described in Alarm Settings.
It will return a plain Json positive response if the record was successfully added or updated.
Some of the possible error messages are:
err_InvalidElement
No alarm to edit was found for the provided ID, no ID was provided, one of the mandatory fields (Community, AlarmType, AlarmPriority, Key) was not provided, the Priority field is set for Localization settings / not set for Threshold settings, or an user that is not SuperAdmin is editing a default setting
err_NoCommunityFound
No community was found for the provided Guid.