查询值班表
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
cms:ListOncallSchedules |
list |
*OncallSchedule
|
无 | 无 |
请求语法
GET /oncallSchedules HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| oncallScheduleIds |
array |
否 |
值班表 ID。 |
|
|
string |
否 |
值班表 ID。 |
testId |
|
| oncallScheduleName |
string |
否 |
值班表名称。 |
testOncallScheduleName |
| pageNumber |
integer |
否 |
页面。默认为 1 |
1 |
| pageSize |
integer |
否 |
每页大小。默认 100 |
10 |
| workspace |
string |
否 |
工作空间名称 |
default-cms-5884500827389836-cn-hangzhou |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| oncallSchedules |
array<object> |
值班表列表。 |
|
|
array<object> |
值班表配置。 |
||
| oncallScheduleId |
string |
值班表唯一标识。 |
testId |
| oncallScheduleName |
string |
值班表名称。 |
testName |
| rotations |
array<object> |
班次列表。 |
|
|
object |
班次列表。 |
||
| activeDays |
array |
周几生效。 |
|
|
integer |
周几生效。 |
1 |
|
| contacts |
array |
联系人 ID。 |
|
|
string |
联系人 ID。 |
testId |
|
| rotationEndTime |
string |
班次结束时间。格式:HH:mm。 |
24:00 |
| rotationName |
string |
班次名称。 |
testName |
| rotationStartTime |
string |
班次开始时间。格式:HH:mm。 |
00:00 |
| shiftRecurrenceFrequency |
string |
换班周期单位。配合 shiftRecurrenceFrequency 使用,例如每 1 周换下一个值班人。 |
WEEKLY |
| startDate |
string |
班次开始日期,格式:yyyy-MM-dd。 |
2024-01-01 |
| timeZone |
string |
时区名称,使用 IANA Time Zone Database 标准,例如:Asia/Shanghai。 |
Asia/Shanghai |
| shiftLength |
integer |
换班周期长度。配合 shiftRecurrenceFrequency 使用,例如每 3 天换下一个值班人。 |
3 |
| shiftRobotId |
string |
换班提醒机器人 id。 |
testId |
| substitudes |
array<object> |
替班规则列表。 |
|
|
object |
|||
| startTime |
string |
替班起始时间。格式:YYYY-MM-DD HH:mm。 |
2024-10-10 09:00 |
| endTime |
string |
替班结束时间。格式:YYYY-MM-DD HH:mm。 |
2024-10-15 18:00 |
| replacedContactId |
string |
被替班人的联系人 ID。 |
testId |
| contactId |
string |
替班人的联系人 ID。 |
testId |
| workspace |
string |
工作空间名称 |
default-cms-5884500827389836-cn-hangzhou |
| requestId |
string |
请求 ID。 |
8FDE2569-626B-5176-9844-28877A***** |
| total |
integer |
总记录数。 |
2 |
示例
正常返回示例
JSON格式
{
"oncallSchedules": [
{
"oncallScheduleId": "testId",
"oncallScheduleName": "testName",
"rotations": [
{
"activeDays": [
1
],
"contacts": [
"testId"
],
"rotationEndTime": "24:00",
"rotationName": "testName",
"rotationStartTime": "00:00",
"shiftRecurrenceFrequency": "WEEKLY",
"startDate": "2024-01-01",
"timeZone": "Asia/Shanghai",
"shiftLength": 3
}
],
"shiftRobotId": "testId",
"substitudes": [
{
"startTime": "2024-10-10 09:00",
"endTime": "2024-10-15 18:00",
"replacedContactId": "testId",
"contactId": "testId"
}
],
"workspace": "default-cms-5884500827389836-cn-hangzhou"
}
],
"requestId": "8FDE2569-626B-5176-9844-28877A*****",
"total": 2
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 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. | 服务运行错误。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。