跳转到主要内容
告警与响应相关接口/值班
POSTOnCall起始版本 1.0同步需要认证

验证值班排班表

校验调度计划配置返回冲突报告。

调试可用性

在线调试

使用当前认证信息和示例参数提交 Mock 请求。

请求参数

请求体字段

  • nameString必填

    资源名称。

    示例: Platform On-Call

  • descriptionString必填

    资源的详细描述。

    示例: 24x7 platform on-call rotation

  • timezoneString必填

    时区。

    示例: Asia/Shanghai

  • rotationTypeString必填

    轮换类型。

    示例: weekly

  • shiftDurationString必填

    班次时长。

    示例: 168h

响应状态

200 OK

该 API 成功时返回以下响应结构。

  • hasConflictBoolean

    是否存在冲突。

    示例: true

  • conflictsList

    冲突列表。

    示例: (nested array)

    • typeString

      类型。

      示例: overlap

    • userIdString

      用户ID。

      示例: user-abc123

    • userNameString

      用户名称。

      示例: Alice Smith

    • detailsString

      详细信息。

      示例: Overlapping shifts on 2024-06-01

  • suggestionsList

    建议。

    示例: (nested array)

    • typeString

      类型。

      示例: swap_shift

    • descriptionString

      资源的详细描述。

      示例: Swap shift between user-abc123 and user-xyz789

请求地址

POST/api/v1/oncall/schedules/validate

/api/v1/oncall/schedules/validate

操作 ID

ValidateOnCallSchedule

永久链接

请求示例

curl -X POST '{host}/api/v1/oncall/schedules/validate' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"name":"Platform On-Call","description":"24x7 platform on-call rotation","timezone":"Asia/Shanghai","rotationType":"weekly","shiftDuration":"168h","members":"(nested array)","startDate":"2026-01-15T08:00:00Z"}'

响应示例

200
{
  "hasConflict": true,
  "conflicts": [
    {}
  ],
  "suggestions": [
    {}
  ]
}

变更历史

此 API 暂无变更历史记录。

查看全部变更历史