> ## 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.

# 获取组织安全 Profile 设置

> 获取组织默认选择的安全 Profile。

返回该组织默认选用的安全 Profile：`default` 适用于该组织中新建的会话，`automations_default` 适用于由自动化启动的会话。

## 权限

需要在组织级别具有 `ManageSecureModeProfiles` 权限的[服务用户](https://docs.devin.ai/zh/api-reference/v3/service-users/members-service-users.md)或[个人访问令牌](https://docs.devin.ai/zh/api-reference/personal-access-tokens.md)。正在运行的 Devin 会话所使用的令牌将被拒绝，因此会话无法修改约束其自身的 Profile。

## 行为

* `selection` 的取值为 `inherit` (自身没有绑定，沿用企业默认值) 、`none` (显式禁用) 或 `profile` (锁定到 `profile_id`) 。
* 锁定 Profile 时，`profile_scope` 的取值为 `org` 或 `enterprise`，因为组织也可以锁定其所属企业共享的 Profile。
* 若上层有强制 Profile 生效，选择退出将不起作用。


## OpenAPI

````yaml zh/v3-openapi.yaml GET /v3beta1/organizations/{org_id}/security-profile-settings
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}/security-profile-settings:
    get:
      tags:
        - security-profiles
      summary: 获取组织安全 Profile 设置
      description: 获取组织默认选择的安全 Profile。
      operationId: >-
        handle_get_security_profile_settings_v3beta1_organizations__org_id__security_profile_settings_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/SecurityProfileSettingsResponse'
          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: 冲突
        '410':
          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:
    SecurityProfileSettingsResponse:
      additionalProperties: false
      properties:
        automations_default:
          $ref: '#/components/schemas/SecurityProfileDefaultState'
          description: 用于自动化触发的会话的默认值。其优先级介于组织/企业默认值与各自动化自身的绑定之间。
        default:
          $ref: '#/components/schemas/SecurityProfileDefaultState'
      required:
        - default
        - automations_default
      title: SecurityProfileSettingsResponse
      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
    SecurityProfileDefaultState:
      additionalProperties: false
      description: 单个已存储默认绑定的读取视图。
      properties:
        profile_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Profile Id
        profile_scope:
          anyOf:
            - enum:
                - org
                - enterprise
              type: string
            - type: 'null'
          description: >-
            所锁定 Profile 的所属范围。仅在 selection 为 'profile' 时设置；组织默认值可以锁定企业共享的
            Profile。
          title: Profile Scope
        selection:
          enum:
            - inherit
            - none
            - profile
          title: Selection
          type: string
      required:
        - selection
      title: SecurityProfileDefaultState
      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.