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

# 获取组织默认平台（Devin API）

> 通过 v3 组织 API 读取组织默认的 Devin 会话运行位置（托管平台标签或 outpost pool）

返回新会话的组织级默认运行位置，即 webapp 中 **Settings > Devin > Default platform** 下显示的值。

<h2 id="permissions">
  权限
</h2>

需要使用该组织成员身份的[服务用户](/zh/api-reference/v3/service-users/members-service-users)或[个人访问令牌](/zh/api-reference/personal-access-tokens)。

<h2 id="behavior">
  行为
</h2>

* 托管默认值通过 `platform` 返回 (例如 `linux` 或 `windows`) 。
* outpost 默认值通过 `outpost_pool_id` 返回；如果该池对组织仍然可用，还会一并返回其 `outpost_pool_name`。
* 未设置默认值时，这三个字段均为 `null`，会话将在标准托管平台上运行。
* 用户的个人默认值 (会话输入框中平台选择器里的星标) 优先于此值，但仅对该用户自己的会话生效。


## OpenAPI

````yaml zh/v3-openapi.yaml GET /v3beta1/organizations/{org_id}/default-platform
openapi: 3.1.0
info:
  description: 采用 Service User 身份验证和 RBAC 的 Devin v3 API
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3beta1/organizations/{org_id}/default-platform:
    get:
      tags:
        - organization-settings
      summary: 获取组织默认平台
      description: |-
        获取组织中新会话的默认运行位置。

        这是在设置 > Devin 下显示的组织级默认值；
        如果用户设置了个人默认值，其会话将优先使用该值。
        即使已存储的默认值不再对该组织可用，
        仍会返回该值（但在创建会话时会跳过）。
      operationId: >-
        handle_get_org_default_platform_v3beta1_organizations__org_id__default_platform_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/OrgDefaultPlatformResponse'
          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:
    OrgDefaultPlatformResponse:
      description: 组织中新会话的默认运行位置。
      properties:
        outpost_pool_id:
          anyOf:
            - type: string
            - type: 'null'
          description: 新会话默认使用的 outpost 资源池。默认运行位置为托管平台或未设置时，为 Null。
          title: Outpost Pool Id
        outpost_pool_name:
          anyOf:
            - type: string
            - type: 'null'
          description: 默认 outpost 资源池的名称。默认运行位置不是 outpost 资源池，或该资源池已不再对组织可用时，为 Null。
          title: Outpost Pool Name
        platform:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            新会话默认使用的托管平台标签（例如 'linux'、'windows'）。默认运行位置为 outpost 资源池或未设置时，为
            Null。
          title: Platform
      required:
        - platform
        - outpost_pool_id
        - outpost_pool_name
      title: OrgDefaultPlatformResponse
      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
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          description: 因操作被阻止而拒绝请求时返回的机器可读代码（例如 "user_frozen"、"migrated_session"）。
          title: Error Code
        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
  securitySchemes:
    bearerAuth:
      description: 服务用户凭据（前缀：cog_）
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.