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

# get staged diff

> diff the staged (uncommitted) finding changes against the version's committed findings



## OpenAPI

````yaml /api-reference/security.json get /security/versions/{version_id}/diff/staged
openapi: 3.1.2
info:
  title: Bevor Security API
  version: 1.0.0
servers: []
security: []
tags:
  - name: analysis
    description: Analyses, which own a lineage of versions and track a HEAD.
  - name: analysis version
    description: 'Versions of an analysis: creation, lineage, diffs, and pipeline runs.'
  - name: finding
    description: Findings on an analysis version, their staged edits, and comments.
  - name: remediation
    description: Remediations generated for findings.
  - name: summary
    description: Aggregated reporting over analyses, projects, and users.
  - name: chat
    description: Audit chat threads and messages.
paths:
  /security/versions/{version_id}/diff/staged:
    get:
      tags:
        - analysis version
      summary: get staged diff
      description: >-
        diff the staged (uncommitted) finding changes against the version's
        committed findings
      parameters:
        - name: version_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                properties:
                  results:
                    items:
                      $ref: '#/components/schemas/FindingDiffItem'
                    title: Results
                    type: array
                title: ResultsResponse[FindingDiffItem]
                type: object
        '400':
          description: Error Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - BearerAuth: []
components:
  schemas:
    FindingDiffItem:
      properties:
        id:
          title: Id
          type: string
        operation:
          enum:
            - add
            - update
            - delete
          title: Operation
          type: string
        reason:
          enum:
            - edit
            - code
          title: Reason
          type: string
        previous:
          $ref: '#/components/schemas/FindingBareSchema'
          nullable: true
        current:
          $ref: '#/components/schemas/FindingBareSchema'
          nullable: true
        changed_fields:
          items:
            type: string
          title: Changed Fields
          type: array
      required:
        - id
        - operation
        - reason
      title: FindingDiffItem
      type: object
    ApiError:
      properties:
        code:
          enum:
            - auth.session_expired
            - auth.session_revoked
            - auth.session_invalid
            - auth.user_does_not_exist
            - auth.invalid_team_membership
            - auth.unauthorized
            - auth.key_revoked
            - auth.key_invalid
            - auth.payment_required
            - auth.team_required
            - auth.invalid_permissions
            - error.not_found
            - error.invalid_scope
            - error.limit
            - error.entity_deleted
            - error.invalid_state
            - error.conflict
            - error.integrity
            - error.database
            - error.validation
            - error.server
            - analysis.entrypoint_failure
            - code.unsupported
            - code.node_invalid
            - code.conflict
            - app.rate_limit
            - payment.error
            - payment.failed
          title: Code
          type: string
        message:
          title: Message
          type: string
      required:
        - code
        - message
      title: ApiError
      type: object
    FindingBareSchema:
      properties:
        version:
          $ref: '#/components/schemas/AnalysisVersionRef'
        created_at:
          format: date-time
          title: Created At
          type: string
        origin_finding_id:
          title: Origin Finding Id
          type: string
        is_acknowledged:
          title: Is Acknowledged
          type: boolean
        type:
          title: Type
          type: string
        level:
          enum:
            - critical
            - high
            - medium
            - low
          title: Level
          type: string
        name:
          title: Name
          type: string
        explanation:
          title: Explanation
          type: string
        recommendation:
          type: string
          nullable: true
        reference:
          type: string
          nullable: true
        source:
          title: Source
          type: string
      required:
        - version
        - created_at
        - origin_finding_id
        - is_acknowledged
        - type
        - level
        - name
        - explanation
        - source
      title: FindingBareSchema
      type: object
    AnalysisVersionRef:
      properties:
        id:
          title: Id
          type: string
        analysis_id:
          title: Analysis Id
          type: string
      required:
        - id
        - analysis_id
      title: AnalysisVersionRef
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key in Bearer token format

````