更新值班表
POST
https://api.flashcat.cloud/schedule/update最后修改时间: 1 年前
请求参数
Body 参数application/json
layers
array [object {11}]
规则
layer_name
string
规则名
mode
enum<integer>
模式(普通/临时)
mode为1的规则放到为0的后面
枚举值:
01
groups
array [object {2}]
值班分组
rotation_duration
integer
值班周期
单位秒
>= 3600<= 2592000
fair_rotation
boolean
公平轮转开关
handoff_time
integer
接手时间
接手时间,1周粒度的值班周期使用,从周一00:00到接手的秒数
layer_start
integer
开始时间
最小粒度半小时
layer_end
integer
结束时间
最小粒度半小时
restrict_mode
enum<integer>
周期内限定模式
0 无限制 1 天粒度 2 周粒度
枚举值:
012
restrict_periods
array [object {2}]
限定时间区间列表
day_mask
object
日期掩码
notify
object
值班轮转通知
advance_in_time
integer
提前多久通知
单位s
fixed_time
object
固定时间通知
by
object
个人通知
webhooks
array [object {2}]
Webhooks通知
schedule_id
integer
必需
schedule_name
string
可选
team_id
integer
团队id
description
string
备注
示例
{
"layers": [
{
"layer_name": "string",
"mode": 0,
"groups": [
{
"group_name": "string",
"members": [
{
"role_id": 0,
"person_ids": [
0
]
}
]
}
],
"rotation_duration": 3600,
"fair_rotation": true,
"handoff_time": 0,
"layer_start": 0,
"layer_end": 0,
"restrict_mode": 0,
"restrict_periods": [
{
"restrict_start": 0,
"restrict_end": 0
}
],
"day_mask": {
"repeat": [
0
]
}
}
],
"notify": {
"advance_in_time": 0,
"fixed_time": {
"cycle": "day",
"start": "string"
},
"by": {
"follow_preference": true,
"personal_channels": [
"email"
]
},
"webhooks": [
{
"type": "feishu",
"settings": {
"token": "string",
"alias": "string",
"integration_id": 0,
"chat_ids": [
"string"
],
"sign_secret": "string"
}
}
]
},
"schedule_id": 0,
"schedule_name": "string",
"team_id": 0,
"description": "string"
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
error
object
必需
code
enum<string>
错误码
枚举值:
InvalidParameterInvalidContentTypeUnauthorizedAccessDeniedMethodNotAllowedRequestTooFrequentlyRequestVerifyRequiredDangerousOperationRequestLockedRouteNotFoundBalanceNotEnoughUndonedOrderExistResourceNotFoundInternalErrorReferenceExist
message
string
错误描述
示例
{
"error": {
"code": "0",
"message": ""
}
}
最后修改时间: 1 年前