CreateOncallSchedule
Creates an on-call schedule.
Operation description
Creates an on-call schedule.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:CreateOncallSchedule |
create |
*OncallSchedule
|
None | None |
Request syntax
POST /oncallschedule HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body parameters. |
|
| rotations |
array<object> |
No |
The list of shifts. |
|
|
object |
No |
The shift. |
||
| activeDays |
array |
Yes |
The days of the week when the shift is active. |
|
|
integer |
No |
The days of the week when the shift is active. Valid values:
|
1 |
|
| contacts |
array |
Yes |
The list of contacts. |
|
|
string |
No |
The ID of the contact. |
testContactId |
|
| rotationEndTime |
string |
Yes |
The end time of the shift. Format: HH:mm. |
24:00 |
| rotationName |
string |
Yes |
The name of the shift. |
testRotationName |
| rotationStartTime |
string |
Yes |
The start time of the shift. Format: HH:mm. |
00:00 |
| shiftRecurrenceFrequency |
string |
Yes |
The unit of the shift rotation cycle. Used in conjunction with shiftLength. For example, rotate to the next on-call person every week. Valid values:
|
WEEKLY |
| startDate |
string |
Yes |
The start date of the shift. Format: yyyy-MM-dd. |
2024-08-14 |
| timeZone |
string |
Yes |
The name of the time zone. The IANA Time Zone Database standard is used. Example: |
Asia/Shanghai |
| shiftLength |
integer |
No |
The length of the shift rotation cycle. Used in conjunction with shiftRecurrenceFrequency. For example, rotate to the next on-call person every 3 days. |
1 |
| shiftRobotId |
string |
No |
The ID of the shift reminder chatbot. |
testRobotId |
| oncallScheduleId |
string |
No |
The unique identifier of the on-call schedule. |
testOncallScheduleId |
| oncallScheduleName |
string |
No |
The name of the on-call schedule. |
testOncallScheduleName |
| substitudes |
array<object> |
No |
The list of substitution rules. |
|
|
object |
No |
|||
| contactId |
string |
No |
The ID of the contact who acts as the substitute. |
testId |
| replacedContactId |
string |
No |
The ID of the contact who is being replaced. |
testId |
| startTime |
string |
No |
The start time of the substitution. Format: YYYY-MM-DD HH:mm. |
2024-10-10 09:00 |
| endTime |
string |
No |
The end time of the substitution. Format: YYYY-MM-DD HH:mm. |
2024-10-15 18:00 |
| workspace |
string |
No |
The name of the workspace. |
default-cms-5884500827389836-cn-hangzhou |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| oncallScheduleId |
string |
The unique identifier of the on-call schedule. |
testOncallScheduleId |
| requestId |
string |
The ID of the request. |
3B311FD9-A60B-55E0-A896-A0C73********* |
Examples
Success response
JSON format
{
"oncallScheduleId": "testOncallScheduleId",
"requestId": "3B311FD9-A60B-55E0-A896-A0C73*********"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ResourceExist | Resource already exist . | The resource already exists. |
| 400 | InvalidParameter | The parameter is missing or invalid. %s | |
| 400 | InvalidParameterValue | Invalid request: %s | |
| 500 | InternalUnknownError | The request processing has failed due to some unknown error. | A service runtime error occurred. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.