- Base
- Cache
- CodeConfig
- Data
- DosingLog
- ImportExport
- ModelConfig
- WestModelParameter
- DataCleanEndTrigger
- Alarm
保存报警日志
POST
/api/Alarm/AddAlarmLogs
Alarm
报警日志、报警阈值。
保存所有系统中产生的报警日志。比如实测数据或预测数据超出报警配置中的阈值设定值,需要保存产生的报警数据时。
报警日志列表
请求参数
Body 参数application/json
array of:
alarmTime
string <date-time>
必需
predictionTime
string <date-time>
必需
pointType
integer <int32>
必需
extInfo
string | null
可选
indicator
string
指标编码
>= 1 字符
pointName
string | null
可选
nodeCode
string
必需
>= 1 字符
grade
integer <int32>
必需
value
number <double>
必需
message
string
报警提示信息。
>= 1 字符
alarmType
enum<integer> <int32>
必需
枚举值:
01234
示例
[
{
"alarmTime": "2025-03-06T15:14:55.906Z",
"predictionTime": "2025-03-07T15:14:55.906Z",
"pointType": 0,
"extInfo": "",
"indicator": "TSS",
"pointName": "",
"nodeCode": ".sensor_out.TSS",
"grade": 1,
"value": 183.67221,
"message": "超出尾水标准 正常范围[0,10],当前值183.67221;",
"alarmType": 2
},
{
"alarmTime": "2025-03-06T15:14:55.906Z",
"predictionTime": "2025-03-07T15:14:55.906Z",
"pointType": 0,
"extInfo": "",
"indicator": "TP",
"pointName": "",
"nodeCode": ".sensor_out.TP",
"grade": 0,
"value": 4.745655,
"message": "超出预警阈值 正常范围[0,0.4],当前值4.745655;",
"alarmType": 2
}
]
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://online-products.dhichina.cn/gateway/wwtp-paas-service/api/Alarm/AddAlarmLogs' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"alarmTime": "2025-03-06T15:14:55.906Z",
"predictionTime": "2025-03-07T15:14:55.906Z",
"pointType": 0,
"extInfo": "",
"indicator": "TSS",
"pointName": "",
"nodeCode": ".sensor_out.TSS",
"grade": 1,
"value": 183.67221,
"message": "超出尾水标准 正常范围[0,10],当前值183.67221;",
"alarmType": 2
},
{
"alarmTime": "2025-03-06T15:14:55.906Z",
"predictionTime": "2025-03-07T15:14:55.906Z",
"pointType": 0,
"extInfo": "",
"indicator": "TP",
"pointName": "",
"nodeCode": ".sensor_out.TP",
"grade": 0,
"value": 4.745655,
"message": "超出预警阈值 正常范围[0,0.4],当前值4.745655;",
"alarmType": 2
}
]'
返回响应
🟢200成功
application/json
Body
object {0}
示例
{
"status": true,
"code": "000000",
"message": null,
"traceId": null
}