Preview Schedule
POST
/schedule/previewRequest
Body Params application/json
start
integer
Start time
Time automatically aligned to the previous half hour
end
integer
End time
Time automatically aligned to the previous half hour, interval with start should not exceed 30 days
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
Example
{
"start": 0,
"end": 0,
"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
}
]
}
]
}
Request samples
Responses
成功(200)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
data
object
required
start
integer
required
end
integer
required
schedule_id
integer
required
schedule_name
string
required
team_id
integer
required
layers
array [object {10}]
Rules
layer_schedules
array [object {3}]
Rule calculation
final_schedule
object
required
Final schedule
error
object
required
code
enum<string>
Error code
Allowed values:
InvalidParameterInvalidContentTypeUnauthorizedAccessDeniedMethodNotAllowedRequestTooFrequentlyRequestVerifyRequiredDangerousOperationRequestLockedRouteNotFoundBalanceNotEnoughUndonedOrderExistResourceNotFoundInternalErrorReferenceExist
message
string
Error description
Example
{
"data": {
"start": 0,
"end": 0,
"schedule_id": 0,
"schedule_name": "string",
"team_id": 0
},
"error": {}
}
Last modified: 2 个月前