Confirm Alarm Information
Path
http://{supOS ip:port}/open-api/supos/oodm/v2/alerts/ack
Request body
{
"ackAll": false,
"userName": "Emma",
"fullNames": [
"11401uuid08fb884b9a4743d08464e95c64074d09"
]
}
- ackAll: Boolean. Whether to confirm all
- userName: String. User to confirm the alarm
- fullName: Array of strings. Instance ID triggered by the alarm and alarm alias
Response
400: General internal error of OODM.
{
"code": 10001001,
"data": {},
"detail": "string",
"message": "string"
}
Create Alarms in Batches
Path
http://{supOS ip:port}/open-api/supos/oodm/v2/alarms
Request body
{
"dtos": [
{
"templateName": "system.employee", //Required. Template namespace.template alias. String.
"attributeName": "system.p1", //Required. Attribute name space.attribute alias. String.
"instanceName": "zhangsan", //String. Instance name.
"displayName": "alarm1", //Required. String. Alarm name.
"priority": 2, //Required. Integer. Alarm priority from 1-10.
"enable": false, //Boolean. Whether to enable the alarm. The default is false.
"operator": "EQ", //Required. String.
"limitValue": "11", //Required. String. Limit value of the property (value if the property is a number and true/false if the property is boolean)
"deadBand": 12, //Required. Double. Deadband value.
"deadBandType": "NUMERIC", //Required. String. Numeric or percent.
"comment": "test data", //String. Alarm description.
"alarmType": "test alarm"
}
]
}
Response
400: General internal error of OODM.
{
"code": 10001001,
"data": {},
"detail": "string",
"message": "string"
}
Get Alarms
Run complex filtering on alarms.
Path
http://{supOS ip:port}/open-api/supos/oodm/v2/alarms
Query parameters
Parameter | Type | Description |
---|---|---|
instanceEnName | string | Instance alias. |
instanceDisplayName | string | Instance name. Get all instances with the same name under multiple namespaces. |
instanceLabelNames | array of strings | List of instance labels. Get all instance labels with the same name under multiple namespaces. |
attributeEnName | string | Attribute alias. Get all attributes with the same alias under multiple namespaces. |
attributeDisplayName | string | Attribure name. Get all attributes with the same name under multiple namespaces. |
attributeComment | string | Attribute description. Fuzzy matching is available. |
attributeLabelNames | array of strings | List of attribute labels.Get all labels with the same name under multiple namespaces. |
alarmEnName | string | Alarm alias. Use comma to separate multiple aliases. |
alarmDisplayName | string | Alarm name. Fuzzy matching is available. |
alarmComment | string | Alarm description. Fuzzy matching is available. |
alarmPriority | integer | Alarm priority between 1-10. |
alarmEnabled | boolean | Whether the alarm is enabled. |
alarmType | string | Alarm type. |
page | integer | The starting page number. The default is 1. |
perPage | integer | The number of returned data on every page. The default is 20 per page and the maximum is 500. |
excludeFunctionSetAlarm | boolean | Whether to exclude function set alarms. |
Request body
instanceEnName=employee&attributeLabelNames=system.aaa&
alarmDisplayName=xxx&alarmEnable=true //search for enabled alarms with "xxx" in its name under a property bound with the label system.aaa inside the instance employee
Response
- 200: Successful.
{
"list": [
{
"displayName": "alarm1",
"priority": 2,
"enable": false,
"operator": "EQ",
"limitValue": "11",
"deadBand": 12,
"deadBandType": "NUMERIC",
"comment": "test data",
"alarmType": "test alarm",
"id": 11145,
"enName": "uuid08fb884b9a4743d08464e95c64074d09",
"templateEnName": "testTemplate",
"templateDisplayName": "test template",
"instanceEnName": "testEntity",
"instanceDisplayName": "test instance",
"attributeEnName": "p1",
"attributeDisplayName": "p1",
"attributeComment": "teat property p1",
"instanceLabels": [
{
"displayName": "data1",
"id": 11119,
"enName": "metadata1"
}
],
"attributeLabels": [
{
"displayName": "data1",
"id": 11119,
"enName": "metadata1"
}
]
}
],
"pagination": {}
}
- 400: General internal error of OODM.
{
"code": 10001001,
"data": {},
"detail": "string",
"message": "string"
}
Edit Alarm Information
Path
http://{supOS ip:port}/open-api/supos/oodm/v2/alarms/{name} //name is alarm alias. Presently is the automatically generated UUID during creation
Request body
{
"displayName": "boiler overheating alarm",
"priority": 8,
"enable": true,
"operator": "GE",
"limitValue": "100",
"deadBand": 10,
"deadBandType": "NUMERIC",
"comment": "trigger alarm when the boiler temperature is over 100°C.",
"alarmType": "temperature alarm"
}
Response
- 200: Successful.
{
"code": 200,
"message": "ok",
"data": null,
"detail": null
}
- 400: General internal error of OODM.
{
"code": 10001013,
"message": "priority:0 illegal: must integer from 1-10",
"data": {},
"detail": "string"
}
Delete Alarms
Delete alarm metadata. Returns successful when alarms not found as well.
Path
http://{supOS ip:port}/open-api/supos/oodm/v2/alarms/{name} //name is alarm alias. Presently is the automatically generated UUID during creation
Query parameters
Request body
{
"displayName": "boiler overheating alarm",
"priority": 8,
"enable": true,
"operator": "GE",
"limitValue": "100",
"deadBand": 10,
"deadBandType": "NUMERIC",
"comment": "trigger alarm when the boiler temperature is over 100°C.",
"alarmType": "temperature alarm"
}
Response
204 OK
Get Alarms under Specified Attribute
Path
http://{supOS ip:port}/open-api/supos/oodm/v2/attributes/{attributeFullName}/alarms
attributeFullName: Full path of the attribute. Template namespace.template alias.instance alias.attribute namesoace.attribure alias.
Response
- 200: Successful.
[
{
"displayName": "alarm1",
"priority": 2,
"enable": false,
"operator": "EQ",
"limitValue": "11",
"deadBand": 12,
"deadBandType": "NUMERIC",
"comment": "test data",
"alarmType": "test alarm",
"enName": "alarm1",
"id": 11145,
"instanceId": "11234"
}
]
- 400: General internal error of OODM.
{
"code": 10001001,
"data": {},
"detail": "string",
"message": "string"
}
Get Authorized Alarm Receivers
Corresponding empty array will be returned when alarm full path does not exist or no authorized users. To handle high concurrency, user list of each alarm is saved in cache for 5 minutes (user data changes may be delayed).
Path
http://{supOS ip:port}/open-api/supos/oodm/v2/alarms/authorized-users
Query parameters
alarmFullPaths: Full path of the attribute. Template namespace.template alias.instance alias.alarm alias. Use comma to separate multiple alarms.
info
The maximum number of alarms is 100. Error happens when exceeding 100.
Response
- 200: Successful.
{
"system.Template_823.msa_test_05.p1_a1": [
"admin",
"test"
],
"system.Template_829.msa_test_09.p1_a2": []
}
- 400: General internal error of OODM.
{
"code": 90900002,
"message": "alarmFullPaths cannot be empty",
"data": {},
"detail": "string"
}