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

# 列出代码扫描 Profile（Devin API）

> 列出组织可用的 Devin 代码扫描 Profile，包括组织所有和账户共享的发现及摄取 Profile

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

需要具备组织级 `ViewCodeScans` 权限的[服务用户](/zh/api-reference/v3/service-users/members-service-users)或[个人访问令牌](/zh/api-reference/personal-access-tokens)。

<div id="behavior">
  ## 行为
</div>

按创建时间从新到旧返回 Profile 摘要 (不含指导文本) ，包括组织所有的 Profile 以及账户级共享的 Profile (共享 Profile 的 `org_id` 为 `null`) 。每个摘要均包含 Profile 的 `mode` (`discover` 或 `ingest`) 和 `scan_type`，这两个字段决定该 Profile 能否传递给[启动代码扫描](/zh/api-reference/v3/code-scans/organizations-code-scans-start)或[启动摄取扫描](/zh/api-reference/v3/code-scans/organizations-code-scans-start-ingestion)。

结果使用不透明游标 (`after` / `first`) 进行分页。使用[获取代码扫描 Profile](/zh/api-reference/v3/code-scans/organizations-code-scans-profile)可读取 Profile 的完整指导。企业作用域的对应接口为[列出代码扫描 Profile (企业) ](/zh/api-reference/v3/code-scans/enterprise-code-scans-profiles)。


## OpenAPI

````yaml zh/v3-openapi.yaml GET /v3/organizations/{org_id}/code-scans/profiles
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}/code-scans/profiles:
    get:
      tags:
        - code-scans
      summary: 列出代码扫描 Profile
      description: >-
        列出该组织的代码扫描 Profile。


        按时间从新到旧返回 Profile 摘要（不含指导内容），包括组织自有和账户级共享的 Profile。结果通过不透明游标（``after`` /
        ``first``）分页。
      operationId: >-
        handle_list_code_scan_profiles_v3_organizations__org_id__code_scans_profiles_get
      parameters:
        - description: Organization ID（前缀：org-）
          in: path
          name: org_id
          required: true
          schema:
            example: org-abc123def456
            title: Org Id
            type: string
        - in: query
          name: after
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: After
        - in: query
          name: first
          required: false
          schema:
            default: 100
            maximum: 200
            minimum: 1
            title: First
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PaginatedResponse_CodeScanProfileSummaryResponse_
          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:
    PaginatedResponse_CodeScanProfileSummaryResponse_:
      properties:
        end_cursor:
          anyOf:
            - type: string
            - type: 'null'
          description: 用于获取下一页的游标；如果这是最后一页，则为 None。
          title: End Cursor
        has_next_page:
          default: false
          description: 此页之后是否还有更多项。
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/CodeScanProfileSummaryResponse'
          title: Items
          type: array
        total:
          anyOf:
            - type: integer
            - type: 'null'
          description: 可选的总数（为提升性能可省略）。
          title: Total
      required:
        - items
      title: PaginatedResponse[CodeScanProfileSummaryResponse]
      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
    CodeScanProfileSummaryResponse:
      description: 代码扫描 Profile 的摘要，不包含其指导说明。
      properties:
        created_at:
          description: Profile 的创建时间（Unix 秒）。
          title: Created At
          type: integer
        description:
          anyOf:
            - type: string
            - type: 'null'
          description: Profile 的描述（如有）。
          title: Description
        mode:
          description: Profile 模式：discover 或 ingest。
          enum:
            - discover
            - ingest
          title: Mode
          type: string
        name:
          description: Profile 的名称。
          title: Name
          type: string
        org_id:
          anyOf:
            - type: string
            - type: 'null'
          description: 拥有该 Profile 的组织。当 Profile 在账户级范围内共享时，该值为 Null。
          title: Org Id
        profile_id:
          description: Profile 的唯一标识符。
          title: Profile Id
          type: string
        scan_type:
          description: 该 Profile 配置的扫描类型。
          enum:
            - security
            - performance
            - db-queries
            - test-coverage
            - dead-code
            - code-quality
            - telemetry
            - accessibility
            - general
            - migration-docs
          title: Scan Type
          type: string
        visibility:
          description: 该 Profile 是由单个组织拥有，还是在整个账户范围内共享。
          enum:
            - org
            - account
          title: Visibility
          type: string
      required:
        - profile_id
        - name
        - description
        - visibility
        - org_id
        - scan_type
        - mode
        - created_at
      title: CodeScanProfileSummaryResponse
      type: object
  securitySchemes:
    bearerAuth:
      description: 服务用户凭据（前缀：cog_）
      scheme: bearer
      type: http

````