飞书告警与排班管理
15:32:41
暂无排班
暂无人员
工作日 21:00-10:00
节假日全天
/api/alert{
"content": "告警内容",
"mode": "auto"
}/api/schedule{
"date": "2024-12-05",
"userIds": ["ou_xxx"]
}暂无告警记录
/api/alert发送告警请求参数:
content * - 告警内容(支持 Markdown)mode - 模式:auto | message_only | urgent_now | rotationchatId - 自定义群聊 IDuserIds - 自定义加急用户 ID 列表urgentTypes - 加急类型:app | sms | phone模式说明:
轮播流程:
curl 示例:
# 自动模式(推荐)
curl -X POST http://localhost:3000/api/alert \
-H "Content-Type: application/json" \
-d '{"content": "**服务异常**\n服务响应超时"}'
# 仅发送消息
curl -X POST http://localhost:3000/api/alert \
-H "Content-Type: application/json" \
-d '{"content": "测试消息", "mode": "message_only"}'
# 立即加急
curl -X POST http://localhost:3000/api/alert \
-H "Content-Type: application/json" \
-d '{"content": "紧急!", "mode": "urgent_now", "urgentTypes": ["app", "phone"]}'/api/alert获取当前状态curl http://localhost:3000/api/alert
/api/alerts获取告警记录curl http://localhost:3000/api/alerts
/api/users获取用户列表curl http://localhost:3000/api/users
/api/schedule获取排班列表curl http://localhost:3000/api/schedule
/api/timerules获取时间规则curl http://localhost:3000/api/timerules