1. 值班表
OncallBox-OpenAPI文档
  • 使用指南
  • 开放接口
    • 工单
      • 查询工单
      • 获取工单详情
      • 确认工单
      • 解决工单
    • 业务
      • 查询业务服务
      • 获取业务服务详情
    • 团队
      • 查询团队
      • 获取团队详情
    • 告警
      • 查询告警
      • 获取告警详情
    • 事件
      • 查询事件
      • 获取事件详情
    • 值班表
      • 查询值班表
        POST
      • 获取值班表详情
        GET
    • 响应策略
      • 查询响应策略
      • 获取响应策略详情
    • 成员
      • 查询成员
      • 获取成员详情
      • 删除成员
      • 设置成员角色
      • 更新成员信息
    • 告警供应商
      • 获取供应商列表
      • 获取供应商详情
  • 数据模型
    • 示例数据模型
      • Pet
      • Category
      • Tag
    • EnvelopeBase
    • ErrorEnvelope
    • EmptyEnvelope
    • ProviderListRequest
    • DeleteResult
    • Provider
    • DeleteResponseEnvelope
    • ProviderListData
    • IncidentQueryRequest
    • ProviderListEnvelope
    • IncidentActionRequest
    • ProviderEnvelope
    • IncidentChatGroup
    • Incident
    • IncidentStatusCount
    • IncidentQueryData
    • IncidentQueryResponseEnvelope
    • IncidentGetData
    • IncidentGetResponseEnvelope
    • ServiceQueryRequest
    • Service
    • ServiceQueryData
    • ServiceQueryResponseEnvelope
    • ServiceEnvelope
    • TeamQueryRequest
    • Team
    • TeamQueryData
    • TeamQueryResponseEnvelope
    • TeamEnvelope
    • AlertQueryRequest
    • Alert
    • AlertQueryData
    • AlertQueryResponseEnvelope
    • AlertEnvelope
    • EventQueryRequest
    • EventLink
    • EventImage
    • Event
    • EventQueryData
    • EventQueryResponseEnvelope
    • EventEnvelope
    • ScheduleQueryRequest
    • ScheduleUserIDs
    • ScheduleRestriction
    • ScheduleShift
    • ScheduleOverride
    • ScheduleRotation
    • Schedule
    • ScheduleQueryData
    • ScheduleQueryResponseEnvelope
    • ScheduleGetData
    • ScheduleGetResponseEnvelope
    • EscalationQueryRequest
    • EscalationInfo
    • NotifyPair
    • EscalationLevel
    • EscalationBindGroup
    • Escalation
    • EscalationQueryData
    • EscalationQueryResponseEnvelope
    • EscalationGetData
    • EscalationGetResponseEnvelope
    • MemberQueryRequest
    • MemberIdRequest
    • MemberRoleSetRequest
    • MemberUpdateRequest
    • Member
    • MemberQueryData
    • MemberQueryResponseEnvelope
    • MemberEnvelope
  1. 值班表

查询值班表

POST
/api/schedule/query

请求参数

Authorization
API Key
在 header 添加参数
X-Client-Key
示例:
X-Client-Key: ********************
API Key
在 header 添加参数
X-Timestamp
示例:
X-Timestamp: ********************
API Key
在 header 添加参数
X-Sign
示例:
X-Sign: ********************
or
Body 参数application/json必填

示例
{
    "page": 1,
    "size": 20,
    "name": "primary-oncall",
    "ids": [
        "sch_1"
    ],
    "team_ids": [
        "team_1"
    ],
    "user_ids": [
        "user_1"
    ]
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/schedule/query' \
--header 'X-Client-Key: <api-key>' \
--header 'X-Timestamp: <api-key>' \
--header 'X-Sign: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "page": 1,
    "size": 20,
    "name": "primary-oncall",
    "ids": [
        "sch_1"
    ],
    "team_ids": [
        "team_1"
    ],
    "user_ids": [
        "user_1"
    ]
}'

返回响应

🟢200
application/json
查询成功
Body

示例
{
    "code": 0,
    "msg": "OK",
    "data": {
        "schedules": [
            {
                "id": "string",
                "name": "string",
                "description": "string",
                "time_zone": "string",
                "create_by": "string",
                "update_by": "string",
                "layers": [
                    {
                        "id": "string",
                        "name": "string",
                        "description": "string",
                        "rotation_type": 0,
                        "shift_length": 0,
                        "start": "string",
                        "end": "string",
                        "handoff": "string",
                        "user_groups": [
                            {
                                "user_ids": [
                                    "string"
                                ]
                            }
                        ],
                        "restrictions": [
                            {
                                "duration_seconds": 0,
                                "start_time_of_day": "string",
                                "start_day_of_week": 0
                            }
                        ],
                        "shifts": [
                            {
                                "id": "string",
                                "start": "string",
                                "end": "string",
                                "user_ids": [
                                    "string"
                                ]
                            }
                        ]
                    }
                ],
                "overrides": [
                    {
                        "id": "string",
                        "start": "string",
                        "end": "string",
                        "user_ids": [
                            "string"
                        ]
                    }
                ],
                "final_shifts": [
                    {
                        "id": "string",
                        "start": "string",
                        "end": "string",
                        "user_ids": [
                            "string"
                        ]
                    }
                ],
                "team_ids": [
                    "string"
                ],
                "user_ids": [
                    "string"
                ],
                "on_call_now": {
                    "id": "string",
                    "start": "string",
                    "end": "string",
                    "user_ids": [
                        "string"
                    ]
                }
            }
        ],
        "total": 0
    }
}
🟠401UnauthorizedResponse
修改于 2026-03-21 02:22:01
上一页
获取事件详情
下一页
获取值班表详情
Built with