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

# 获取自动化事件模式

> 返回所有受支持的触发器事件架构，以 source 和事件名称为键。

每个架构描述事件的负载字段、其条件支持的运算符以及 `replies` 的有效动词，
以便调用方为创建和更新端点构造有效的 `triggers`。

<div id="permissions">
  ## 权限
</div>

需要具有组织级别 `ViewOrgAutomations` 权限的服务用户。

<div id="usage">
  ## 用法
</div>

请在构建自动化之前调用此端点：它会返回所有受支持的触发事件类型 (按来源和事件名称索引) ，包括其 payload 字段、条件支持的运算符以及有效的 `replies` 动词，以便你为创建和更新端点构建有效的 `triggers`。未在该组织中启用的来源不会返回。


## OpenAPI

````yaml zh/v3-openapi.yaml GET /v3/organizations/{org_id}/automations/schemas
openapi: 3.1.0
info:
  description: 采用 Service User 身份验证和 RBAC 的 Devin v3 API
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/organizations/{org_id}/automations/schemas:
    get:
      tags:
        - automations
      summary: 获取自动化事件模式
      description: |-
        返回所有受支持的触发器事件架构，以 source 和事件名称为键。

        每个架构描述事件的负载字段、其条件支持的运算符以及 `replies` 的有效动词，
        以便调用方为创建和更新端点构造有效的 `triggers`。
      operationId: >-
        handle_get_automation_schemas_v3_organizations__org_id__automations_schemas_get
      parameters:
        - description: 组织 ID（前缀：org-）
          in: path
          name: org_id
          required: true
          schema:
            example: org-abc123def456
            title: Org Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationSchemasResponse'
          description: 成功响应
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 未授权
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 禁止访问
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 未找到
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 冲突
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 无法处理的内容
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 请求过多
components:
  schemas:
    AutomationSchemasResponse:
      additionalProperties: false
      properties:
        sources:
          additionalProperties:
            additionalProperties:
              $ref: '#/components/schemas/AutomationEventSchemaResponse'
            type: object
          description: 事件源 → 事件名称 → 架构。
          title: Sources
          type: object
        update_semantics:
          description: >-
            对此组织生效的 PATCH 语义：'replace_groups'（请求中提供的配置组会完全替换已存储的组）或
            'merge_patch'（对象遵循 RFC 7396：组存在时，省略的成员会保留其已存储的值，显式 null
            会清除；列表成员仍会完全替换——删除时需重新发送不含该元素的列表——但当某类型在两侧都恰好出现一次时，每个发送的元素都会与已存储的同类型元素合并；重复类型必须完整重新声明）。开放枚举——客户端必须能够兼容新值。
          title: Update Semantics
          type: string
      required:
        - update_semantics
        - sources
      title: AutomationSchemasResponse
      type: object
    ProblemDetail:
      description: >-
        v3 API 的 RFC 9457 application/problem+json 错误响应体。


        detail 沿用自旧版 {"detail": ...} 响应体，以保持向后兼容；其他成员字段为新增字段。errors
        包含字段级验证失败信息（仅 422）。
      properties:
        detail:
          anyOf:
            - type: string
            - type: 'null'
          description: 针对此次具体情况的、便于人理解的说明。
          title: Detail
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          description: 字段级验证错误（仅适用于 422 响应）。
          title: Errors
        instance:
          anyOf:
            - type: string
            - type: 'null'
          description: 此次出现对应的 URI 引用（请求路径）。
          title: Instance
        status:
          description: HTTP 状态码。
          title: Status
          type: integer
        title:
          description: 对问题类型的简短、便于理解的概述。
          title: Title
          type: string
        type:
          default: about:blank
          description: 用于标识问题类型的 URI 引用。
          title: Type
          type: string
      required:
        - title
        - status
      title: ProblemDetail
      type: object
    AutomationEventSchemaResponse:
      additionalProperties: false
      properties:
        category:
          title: Category
          type: string
        event_type:
          title: Event Type
          type: string
        fields:
          additionalProperties:
            $ref: '#/components/schemas/AutomationSchemaFieldDef'
          description: 条件字段路径 → 字段定义（类型、标签、是否必填、选项等）。
          title: Fields
          type: object
        name:
          title: Name
          type: string
        supported_replies:
          description: 此事件类型允许的 replies[].type 动词。
          items:
            type: string
          title: Supported Replies
          type: array
      required:
        - event_type
        - name
        - category
        - supported_replies
        - fields
      title: AutomationEventSchemaResponse
      type: object
    AutomationSchemaFieldDef:
      additionalProperties: false
      description: |-
        条件字段定义的扁平视图。

        仅为相应的 ``type`` 填充类型专属属性（``options``、``min``/``max``/``unit``、
        ``granularity``、``placeholder``）。
      properties:
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        fixed:
          default: false
          title: Fixed
          type: boolean
        granularity:
          anyOf:
            - enum:
                - date
                - datetime
              type: string
            - type: 'null'
          title: Granularity
        label:
          title: Label
          type: string
        max:
          anyOf:
            - type: number
            - type: 'null'
          title: Max
        min:
          anyOf:
            - type: number
            - type: 'null'
          title: Min
        multiple:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Multiple
        options:
          anyOf:
            - items:
                $ref: '#/components/schemas/AutomationSchemaSelectOption'
              type: array
            - type: 'null'
          title: Options
        placeholder:
          anyOf:
            - type: string
            - type: 'null'
          title: Placeholder
        required:
          default: false
          title: Required
          type: boolean
        type:
          enum:
            - string
            - number
            - boolean
            - date
            - select
            - rrule
            - slack_channel
            - linear_team
            - incident_io_team
            - incident_io_severity
            - incident_io_status
            - incident_io_incident_type
            - github_repo
            - gitlab_repo
            - linear_label
            - linear_state
            - linear_assignee
            - linear_project
            - jira_project
            - jira_label
            - jira_status
            - jira_assignee
            - jira_epic
            - slack_user
            - slack_reaction
            - pylon_tag
            - pylon_status
            - file_paths
          title: Type
          type: string
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
      required:
        - type
        - label
      title: AutomationSchemaFieldDef
      type: object
    AutomationSchemaSelectOption:
      additionalProperties: false
      properties:
        label:
          title: Label
          type: string
        value:
          title: Value
          type: string
      required:
        - value
        - label
      title: AutomationSchemaSelectOption
      type: object
  securitySchemes:
    bearerAuth:
      description: 服务用户凭据（前缀：cog_）
      scheme: bearer
      type: http

````