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

# Show what a data-model branch changed against its base (git diff of branches)

The committed changes on `branchName` since it forked from `baseBranch`, which defaults to its parent branch, else the deploy branch.


## OpenAPI

````yaml /api-reference/api.yaml get /build/api/v1/deployments/{deploymentId}/data-model/branch-diff
openapi: 3.1.0
info:
  title: Cube Platform API
  version: 1.0.0
  description: >-
    Programmatically manage Cube: deployments and everything scoped to them

    (environments, folders, reports, workbooks, notifications, workspace, and
    agents),

    plus account-level users, groups, policies, embedding, and AI settings.
    Data-model

    authoring, dev mode, branches, and uploads live under /build/api/v1 — same
    host and

    token, routed to the build pods.
servers:
  - url: https://{tenant}.cubecloud.dev
    description: Your tenant host. Replace the whole host if you use a custom domain.
    variables:
      tenant:
        default: your-tenant
        description: Your Cube tenant subdomain
security:
  - bearerAuth: []
tags:
  - name: Deployments
  - name: Deployment Creation
  - name: Environments
  - name: Env Variables
  - name: Regions
  - name: Data Model
  - name: Data Model Uploads
  - name: GitHub
  - name: GitHub Connection
  - name: dbt Sync
  - name: Databricks Metric View Publication
  - name: Databricks Metric View Integration
  - name: Snowflake Semantic View Sync
  - name: Folders
  - name: Reports
  - name: External Documents
  - name: Workbooks
  - name: Workbook Promotions
  - name: Dashboard Exports
  - name: Notifications
  - name: Scheduled Tasks
  - name: Workspace
  - name: Agents
  - name: Users
  - name: Users Admin
  - name: API Keys
  - name: Roles
  - name: User Attributes
  - name: User Attribute Values
  - name: Tenant Settings
  - name: OAuth Integrations
  - name: User OAuth Tokens
  - name: OIDC Token Configs
  - name: App Theme
  - name: Embed
  - name: Embed Tenants
  - name: Dashboard Embed Access
  - name: Usage Analytics
  - name: OpenAPI Spec
  - name: Audit Log
  - name: Chat History
  - name: Data Model History
  - name: Ossie Conversion
  - name: Report Deliveries
paths:
  /build/api/v1/deployments/{deploymentId}/data-model/branch-diff:
    get:
      tags:
        - Data Model History
      summary: >-
        Show what a data-model branch changed against its base (git diff of
        branches)
      operationId: getBranchDiff
      parameters:
        - in: path
          name: deploymentId
          required: true
          schema:
            type: integer
        - in: query
          name: branchName
          required: true
          schema:
            type: string
          description: The branch whose changes to show.
        - in: query
          name: baseBranch
          required: false
          schema:
            type: string
          description: The branch to compare against.
        - in: query
          name: maxDiffBytes
          required: false
          schema:
            type: integer
          description: >-
            Cuts the unified diff at this many bytes (default 12000);
            `diffTruncated` says when. A diff of many files can still be large:
            narrow it to a commit or a file first.
        - in: query
          name: maxFiles
          required: false
          schema:
            minimum: 1
            type: integer
          description: >-
            Lists at most this many changed files (default 50); `totalFiles`
            says how many there were when the list is cut. `insertions` and
            `deletions` always cover the whole change.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BranchDiffResponse'
          description: ''
components:
  schemas:
    BranchDiffResponse:
      properties:
        baseBranch:
          type: string
        baseRef:
          type: string
        branchName:
          type: string
        deletions:
          type: number
        diff:
          type: string
        diffOmittedReason:
          oneOf:
            - type: string
            - type: 'null'
        diffTruncated:
          type: boolean
        files:
          items:
            $ref: '#/components/schemas/BranchDiffFile'
          type: array
        insertions:
          type: number
        totalFiles:
          oneOf:
            - type: number
            - type: 'null'
        usedMergeBase:
          type: boolean
      required:
        - branchName
        - baseBranch
        - baseRef
        - usedMergeBase
        - files
        - insertions
        - deletions
        - diff
        - diffTruncated
      type: object
    BranchDiffFile:
      properties:
        binary:
          oneOf:
            - type: boolean
            - type: 'null'
        deletions:
          oneOf:
            - type: number
            - type: 'null'
        insertions:
          oneOf:
            - type: number
            - type: 'null'
        path:
          type: string
        previousPath:
          oneOf:
            - type: string
            - type: 'null'
        status:
          type: string
      required:
        - path
        - status
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Token authentication. Send `Authorization: Bearer <YOUR_TOKEN>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.