> ## Documentation Index
> Fetch the complete documentation index at: https://docs.olostep.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取日程

> 通过其ID检索单个日程。



## OpenAPI

````yaml zh/openapi/schedules.json GET /v1/schedules/{schedule_id}
openapi: 3.0.3
info:
  title: 调度 API
  version: 1.0.0
servers:
  - url: https://api.olostep.com
security: []
paths:
  /v1/schedules/{schedule_id}:
    get:
      summary: 获取计划
      description: 通过 ID 获取单个计划。
      parameters:
        - name: schedule_id
          in: path
          required: true
          description: 日程的唯一标识符。必须以 'schedule_' 开头。
          schema:
            type: string
            pattern: ^schedule_
      responses:
        '200':
          description: 成功检索到日程。
          content:
            application/json:
              schema:
                type: object
                properties:
                  schedule:
                    type: object
                    properties:
                      team_id:
                        type: string
                        description: 团队标识符
                      schedule_id:
                        type: string
                        description: 唯一的调度标识符
                      type:
                        type: string
                        enum:
                          - recurring
                          - onetime
                        description: 计划类型
                      endpoint:
                        type: string
                        description: 端点 URL
                      payload:
                        type: object
                        description: 随 API 调用发送的有效负载
                      cron_expression:
                        type: string
                        description: Cron 表达式（仅在重复调度中存在）
                      execute_at:
                        type: string
                        format: date-time
                        description: 执行日期时间（仅在一次性调度中存在）
                      expression_timezone:
                        type: string
                        description: 调度的时区
                      text:
                        type: string
                        description: 用于生成 cron 表达式的自然语言文本
                      schedule_name:
                        type: string
                        description: EventBridge 中的内部计划名称
                      schedule_group:
                        type: string
                        description: 计划组名称
                      created_at:
                        type: string
                        format: date-time
                        description: 调度创建时的 ISO 8601 日期时间
                      updated_at:
                        type: string
                        format: date-time
                        description: 计划最后更新的 ISO 8601 日期时间
                      state:
                        type: string
                        enum:
                          - ENABLED
                          - DELETED
                        description: 计划的当前状态
                      method:
                        type: string
                        enum:
                          - GET
                          - POST
                        description: 调度调用的 HTTP 方法
        '400':
          description: 由于无效的 schedule_id 格式导致请求错误。日程 ID 必须以 'schedule_' 开头。
        '401':
          description: 无效的 API 密钥。
        '404':
          description: 提供的 ID 未找到日程。
        '500':
          description: 获取日程时发生内部服务器错误。
      security:
        - Authorization: []
components:
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      description: Bearer认证头格式为Bearer <token>，其中<token>是你的认证令牌。

````