飞书告警与排班管理
20:19:10
暂无排班
暂无人员
工作日 21:00-10:00
节假日全天
/api/alert?content=...&mode=auto# Query Params: content=告警内容 mode=auto
/api/schedule{
"date": "2024-12-05",
"userIds": ["ou_xxx"]
}暂无告警记录
/api/alert发送告警(参数通过 URL Query 传递)Query 参数:
content * - 告警内容(支持 Markdown,需 URL 编码)mode - 模式:auto | message_only | urgent_now | rotationchatId - 自定义群聊 IDuserIds - 自定义加急用户 ID 列表(逗号分隔)urgentTypes - 加急类型(逗号分隔):app,sms,phone模式说明:
轮播流程:
curl 示例:
# 自动模式(推荐) curl -X POST -G "http://localhost:3000/api/alert" \ --data-urlencode "content=服务异常" # 仅发送消息 curl -X POST -G "http://localhost:3000/api/alert" \ --data-urlencode "content=测试消息" \ -d "mode=message_only" # 立即加急 curl -X POST -G "http://localhost:3000/api/alert" \ --data-urlencode "content=紧急!" \ -d "mode=urgent_now" \ -d "urgentTypes=app,phone" # 指定用户加急 curl -X POST -G "http://localhost:3000/api/alert" \ --data-urlencode "content=告警" \ -d "userIds=ou_xxx,ou_yyy"
/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