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

# Get commit diff

> Retrieves the diff (file changes) for a specific commit compared to its previous commit.



## OpenAPI

````yaml /openapi/brms.json get /api/projects/{projectId}/commits/{commitId}/diff
openapi: 3.0.3
info:
  title: GoRules BRMS
  version: local
servers: []
security: []
tags:
  - name: AI
    description: >-
      AI-powered assistant for interactive conversations and decision logic
      generation
  - name: Audit log
    description: Track and export organisation activity logs for compliance and monitoring
  - name: Branches
    description: >-
      Manage feature branches for collaborative decision development with
      commits and merging
  - name: Change requests
    description: Review and approve changes before merging or deploying to environments
  - name: Cloud
    description: Cloud-specific endpoints for organisation and client management
  - name: Decision
    description: Evaluate and simulate decision graphs with trace and performance data
  - name: Deployment workflows
    description: Manage deployment workflow runs and job approvals
  - name: Deployments
    description: Configure cloud storage providers for release deployments
  - name: Document
    description: Manage decision documents, versions, and file operations within projects
  - name: Environment
    description: >-
      Configure deployment environments with approval workflows and access
      tokens
  - name: Group
    description: Manage permission groups for project-level access control
  - name: Infrastructure
    description: Health check and infrastructure status endpoints
  - name: Integration
    description: Configure external integrations for HTTP requests and data sources
  - name: Invitation
    description: Manage organisation invitations for new members
  - name: Member
    description: Manage project membership and group assignments
  - name: Organisation
    description: Manage organisation settings, preferences, and licensing
  - name: Personal access token
    description: Create and manage personal access tokens for API authentication
  - name: Profile
    description: Manage current user profile settings
  - name: Project
    description: Create and manage projects with approval workflows
  - name: Release
    description: >-
      Package, version, and deploy decision documents. Learn more about
      [Releases](https://gorules.io/developers/brms/multi-environment)
  - name: Roles
    description: Define custom roles with permissions for organisation-wide access control
  - name: Security
    description: Manage project access tokens for API authentication
  - name: Templates
    description: Browse and apply project templates for quick onboarding
  - name: Test events
    description: Manage test events for decision evaluation and testing
  - name: User
    description: Manage organisation users, invitations, and service accounts
paths:
  /api/projects/{projectId}/commits/{commitId}/diff:
    get:
      tags:
        - Branches
      summary: Get commit diff
      description: >-
        Retrieves the diff (file changes) for a specific commit compared to its
        previous commit.
      operationId: getCommitDiff
      parameters:
        - schema:
            anyOf:
              - type: string
                enum:
                  - 'true'
                  - 'false'
                  - 'True'
                  - 'False'
                  - 'TRUE'
                  - 'FALSE'
              - type: boolean
            default: true
          in: query
          name: content
          description: Whether to include file content in the response
        - schema:
            type: string
            format: uuid
          in: path
          name: projectId
          required: true
          description: Project ID
        - schema:
            type: string
            format: uuid
          in: path
          name: commitId
          required: true
          description: Commit ID
      responses:
        '200':
          description: Commit diff with file changes and statistics
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Commit ID
                  message:
                    type: string
                    nullable: true
                    description: Commit message
                  branchId:
                    type: string
                    format: uuid
                    description: Branch ID
                  projectId:
                    type: string
                    format: uuid
                    description: Project ID
                  createdById:
                    type: string
                    nullable: true
                    format: uuid
                    description: ID of user who created the commit
                  createdBy:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: User ID
                      email:
                        type: string
                        description: User email
                      firstName:
                        type: string
                        nullable: true
                        description: User first name
                      lastName:
                        type: string
                        nullable: true
                        description: User last name
                    required:
                      - id
                      - email
                      - firstName
                      - lastName
                    description: User who created the commit
                  createdAt:
                    type: string
                    format: date-time
                    description: Creation timestamp
                  files:
                    type: array
                    items: {}
                    description: Commit files
                  branch:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: Branch ID
                      name:
                        type: string
                        description: Branch name
                      default:
                        type: boolean
                        description: Whether this is the default (main) branch
                      projectId:
                        type: string
                        format: uuid
                        description: Project ID
                      baseCommitId:
                        type: string
                        nullable: true
                        format: uuid
                        description: Base commit ID
                      createdById:
                        type: string
                        nullable: true
                        format: uuid
                        description: ID of user who created the branch
                      createdBy:
                        type: object
                        nullable: true
                        properties:
                          id:
                            type: string
                            format: uuid
                            description: User ID
                          email:
                            type: string
                            description: User email
                          firstName:
                            type: string
                            nullable: true
                            description: User first name
                          lastName:
                            type: string
                            nullable: true
                            description: User last name
                        required:
                          - id
                          - email
                          - firstName
                          - lastName
                        description: User who created the branch
                      createdAt:
                        type: string
                        format: date-time
                        description: Creation timestamp
                      updatedAt:
                        type: string
                        format: date-time
                        description: Last update timestamp
                      changeRequests:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: Change request ID
                            status:
                              type: string
                              description: Change request status
                            type:
                              type: string
                              description: Change request type
                            branchId:
                              type: string
                              nullable: true
                              format: uuid
                              description: Associated branch ID
                            projectId:
                              type: string
                              format: uuid
                              description: Associated project ID
                            createdAt:
                              type: string
                              format: date-time
                              description: Creation timestamp
                          required:
                            - id
                            - status
                            - type
                            - branchId
                            - projectId
                            - createdAt
                          description: Change request associated with the branch
                        description: Pending change requests
                    required:
                      - id
                      - name
                      - default
                      - projectId
                      - baseCommitId
                      - createdById
                      - createdAt
                      - updatedAt
                    description: Branch the commit belongs to
                  previousCommit:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: Commit ID
                      message:
                        type: string
                        nullable: true
                        description: Commit message
                      branchId:
                        type: string
                        format: uuid
                        description: Branch ID
                      projectId:
                        type: string
                        format: uuid
                        description: Project ID
                      createdById:
                        type: string
                        nullable: true
                        format: uuid
                        description: ID of user who created the commit
                      createdBy:
                        type: object
                        nullable: true
                        properties:
                          id:
                            type: string
                            format: uuid
                            description: User ID
                          email:
                            type: string
                            description: User email
                          firstName:
                            type: string
                            nullable: true
                            description: User first name
                          lastName:
                            type: string
                            nullable: true
                            description: User last name
                        required:
                          - id
                          - email
                          - firstName
                          - lastName
                        description: User who created the commit
                      createdAt:
                        type: string
                        format: date-time
                        description: Creation timestamp
                      files:
                        type: array
                        items: {}
                        description: Commit files
                    required:
                      - id
                      - message
                      - branchId
                      - projectId
                      - createdById
                      - createdAt
                    description: Previous commit
                  changes:
                    type: array
                    nullable: true
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - added
                            - deleted
                            - modified
                            - renamed
                          description: Type of change
                        file:
                          description: File for added/deleted changes
                        from:
                          description: Original file for modified/renamed changes
                        to:
                          description: New file for modified/renamed changes
                      required:
                        - type
                      description: File system change
                    description: List of file changes
                  stats:
                    type: object
                    properties:
                      filesAdded:
                        type: number
                        description: Number of files added
                      filesDeleted:
                        type: number
                        description: Number of files deleted
                      filesModified:
                        type: number
                        description: Number of files modified
                      filesRenamed:
                        type: number
                        description: Number of files renamed
                      totalChanges:
                        type: number
                        description: Total number of changes
                    required:
                      - filesAdded
                      - filesDeleted
                      - filesModified
                      - totalChanges
                    description: Change statistics
                required:
                  - id
                  - message
                  - branchId
                  - projectId
                  - createdById
                  - createdAt
                  - branch
                  - changes
                  - stats
                description: Commit diff with file changes and statistics
      security:
        - personalAccessToken: []
        - internalAuth: []
components:
  securitySchemes:
    personalAccessToken:
      type: http
      scheme: bearer
      description: Personal access token is obtained through your profile
    internalAuth:
      type: http
      scheme: internal
      description: Cannot be used directly

````