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

# Get Code Scan Profile (Devin API)

> Get a single Devin code scan profile, including its mode, scan type, include/exclude globs, and guidance, via the v3 organization API

## Permissions

Requires a [service user](/api-reference/v3/service-users/members-service-users) or [personal access token](/api-reference/personal-access-tokens) with the `ViewCodeScans` permission at the organization level.

## Behavior

Returns the profile's metadata, visibility (org-owned or shared account-wide), include/exclude globs, and all of its guidance fields (investigation, communication, and ingestion-source guidance). Find profile IDs with [List Code Scan Profiles](/api-reference/v3/code-scans/organizations-code-scans-profiles).

Returns `404` when the profile does not exist or is not visible to the organization.


## OpenAPI

````yaml v3-openapi.yaml GET /v3/organizations/{org_id}/code-scans/profiles/{profile_id}
openapi: 3.1.0
info:
  description: Devin v3 API with Service User authentication and RBAC
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/organizations/{org_id}/code-scans/profiles/{profile_id}:
    get:
      tags:
        - code-scans
      summary: Get Code Scan Profile
      description: |-
        Get a code scan profile by ID.

        Returns the profile's metadata, visibility (org-owned or shared
        account-wide), and all of its guidance fields. Returns ``404`` when the
        profile does not exist or is not visible to the organization.
      operationId: >-
        handle_get_code_scan_profile_v3_organizations__org_id__code_scans_profiles__profile_id__get
      parameters:
        - in: path
          name: profile_id
          required: true
          schema:
            title: Profile Id
            type: string
        - description: 'Organization ID (prefix: 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/CodeScanProfileDetailResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
components:
  schemas:
    CodeScanProfileDetailResponse:
      description: Full details of a code scan profile, including its guidance.
      properties:
        communication_guidance:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Guidance for the communication phase (acting on final findings, e.g.
            notifying owners or stakeholders), if any.
          title: Communication Guidance
        created_at:
          description: When the profile was created (unix seconds).
          title: Created At
          type: integer
        description:
          anyOf:
            - type: string
            - type: 'null'
          description: Description of the profile, if any.
          title: Description
        exclude_globs:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: Glob patterns of files to exclude from the scan, if any.
          title: Exclude Globs
        include_globs:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: Glob patterns of files to include in the scan, if any.
          title: Include Globs
        ingestion_source_guidance:
          anyOf:
            - type: string
            - type: 'null'
          description: Guidance describing the ingestion source, if any.
          title: Ingestion Source Guidance
        investigation_guidance:
          anyOf:
            - type: string
            - type: 'null'
          description: Guidance for the investigation phase, if any.
          title: Investigation Guidance
        mode:
          description: 'Profile mode: discover or ingest.'
          enum:
            - discover
            - ingest
          title: Mode
          type: string
        name:
          description: Name of the profile.
          title: Name
          type: string
        org_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Organization that owns the profile. Null when the profile is shared
            account-wide.
          title: Org Id
        post_ingestion_guidance:
          anyOf:
            - type: string
            - type: 'null'
          description: Guidance for the post-ingestion phase, if any.
          title: Post Ingestion Guidance
        profile_id:
          description: Unique identifier for the profile.
          title: Profile Id
          type: string
        remediation_guidance:
          anyOf:
            - type: string
            - type: 'null'
          description: Guidance for the remediation phase, if any.
          title: Remediation Guidance
        report_guidance:
          anyOf:
            - type: string
            - type: 'null'
          description: Guidance for the report phase, if any.
          title: Report Guidance
        scan_type:
          description: Type of scan the profile configures.
          enum:
            - security
            - performance
            - db-queries
            - test-coverage
            - dead-code
            - code-quality
            - telemetry
            - accessibility
            - general
            - migration-docs
          title: Scan Type
          type: string
        threat_model_guidance:
          anyOf:
            - type: string
            - type: 'null'
          description: Guidance describing the threat model, if any.
          title: Threat Model Guidance
        triage_guidance:
          anyOf:
            - type: string
            - type: 'null'
          description: Guidance for the triage phase, if any.
          title: Triage Guidance
        validation_guidance:
          anyOf:
            - type: string
            - type: 'null'
          description: Guidance for the validation phase, if any.
          title: Validation Guidance
        visibility:
          description: >-
            Whether the profile is owned by a single organization or shared
            across the whole account.
          enum:
            - org
            - account
          title: Visibility
          type: string
      required:
        - profile_id
        - name
        - description
        - visibility
        - org_id
        - scan_type
        - mode
        - include_globs
        - exclude_globs
        - threat_model_guidance
        - investigation_guidance
        - triage_guidance
        - validation_guidance
        - report_guidance
        - remediation_guidance
        - ingestion_source_guidance
        - post_ingestion_guidance
        - created_at
      title: CodeScanProfileDetailResponse
      type: object
    ProblemDetail:
      description: >-
        RFC 9457 application/problem+json error body for the v3 API.


        detail is retained from the legacy {"detail": ...} body for back-compat;
        the

        other members are additive. errors carries field-level validation
        failures

        (422 only).
      properties:
        detail:
          anyOf:
            - type: string
            - type: 'null'
          description: A human-readable explanation specific to this occurrence.
          title: Detail
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          description: Field-level validation errors (422 responses only).
          title: Errors
        instance:
          anyOf:
            - type: string
            - type: 'null'
          description: A URI reference (the request path) for this occurrence.
          title: Instance
        status:
          description: The HTTP status code.
          title: Status
          type: integer
        title:
          description: A short, human-readable summary of the problem type.
          title: Title
          type: string
        type:
          default: about:blank
          description: A URI reference identifying the problem type.
          title: Type
          type: string
      required:
        - title
        - status
      title: ProblemDetail
      type: object
  securitySchemes:
    bearerAuth:
      description: 'Service User credential (prefix: cog_)'
      scheme: bearer
      type: http

````