Update Schedule
POST
/schedule/updateRequest
Body Params application/json
layers
array [object {10}]
Rules
layer_name
string
Rule name
mode
enum<integer>
Mode (Normal/Temporary)
Rules with mode=1 are placed after those with mode=0
Allowed values:
01
groups
array [object {2}]
On-call group
rotation_duration
integer
On-call cycle
Unit: seconds, minimum granularity 1800
fair_rotation
boolean
Fair rotation switch
handoff_time
integer
Handover time
Handover time in seconds from Monday 00:00 for weekly rotation cycle
layer_start
integer
Start time
Minimum granularity half hour
layer_end
integer
End time
Minimum granularity half hour
restrict_mode
enum<integer>
Cycle restriction mode
0 No restriction, 1 Daily granularity, 2 Weekly granularity
Allowed values:
012
restrict_periods
array [object {2}]
optional
notify
object
On-call rotation notifications
advance_in_time
integer
Advance notice time
Unit: seconds
by
object
Personal notifications
webhooks
array [object {2}]
Webhook notifications
schedule_id
integer
required
schedule_name
string
optional
team_id
integer
Team ID
description
string
Remarks
Example
{
"layers": [
{
"layer_name": "string",
"mode": 0,
"groups": [
{
"group_name": "string",
"members": [
{
"role_id": 0,
"person_ids": [
0
]
}
]
}
],
"rotation_duration": 0,
"fair_rotation": true,
"handoff_time": 0,
"layer_start": 0,
"layer_end": 0,
"restrict_mode": 0,
"restrict_periods": [
{
"restrict_start": 0,
"restrict_end": 0
}
]
}
],
"notify": {
"advance_in_time": 0,
"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"
}
Request samples
Responses
成功(200)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
error
object
required
code
enum<string>
Error code
Allowed values:
InvalidParameterInvalidContentTypeUnauthorizedAccessDeniedMethodNotAllowedRequestTooFrequentlyRequestVerifyRequiredDangerousOperationRequestLockedRouteNotFoundBalanceNotEnoughUndonedOrderExistResourceNotFoundInternalErrorReferenceExist
message
string
Error description
Example
{
"error": {
"code": "0",
"message": ""
}
}
Last modified: 2 个月前