告警
这里只列出已经产生的告警通知。邮件发送记录、取消告警显示和 OCAP 不在本页。
接口跑在客户自己的 SPC 服务器上,本文的地址都是相对路径 /v1/...,不是 simplespc.cn。除登录外,请求头携带 Authorization: Bearer <token>。多数成功响应含 success(1 成功 / 0 失败)、msg、data;数据同步接口例外,见检测数据页。控制图、判异和过程能力的计算见 开放接口与 AI 集成。
告警通知历史
鉴权:是。
说明
分页列出 spc_moniter_notification(未删除),按 create_time 降序。Layui 表格:成功额外带 code: 0。create_time 为 Unix 秒。
地址
/v1/query/get_moniter_notification_history
调用方式
GET
请求内容
GET /v1/query/get_moniter_notification_history?page=1&limit=50&start_time_search=2026-09-01%2000:00:00&end_time_search=2026-09-02%2023:59:59&search_str_search=轴径| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| page | int | 否 | 页码,缺省 1 |
| limit | int | 否 | 每页条数,缺省 10。历史页前端常用 50 |
| start_time_search | string | 否 | create_time 下限 |
| end_time_search | string | 否 | create_time 上限 |
| search_str_search | string | 否 | 模糊匹配 cat_path、item_title、item_id |
返回内容
{
"success": 1,
"code": 0,
"msg": "获取监控通知历史成功",
"count": 120,
"data": [
{
"id": 88,
"create_time": 1756777500,
"item_id": 32,
"item_title": "轴径",
"cat_path": "车间>>轴",
"chart_type": "I-MR",
"chart_type_name": "单值",
"title": "判异",
"notification_desc": "连续 7 点在中心线同一侧",
"notification_type": 1,
"last_data_id": 9001,
"image_relative_path": "/static/…",
"image_absolute_path": "D:/…"
}
]
}异常:success=0,code 为 1。缺少 Token 时 HTTP 401。
