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

# Get component merge history

> Get a component's MERGE_TO_MAIN version history with per-version diff metrics and downstream breakage indicators, ordered newest-first.



## OpenAPI

````yaml /api-reference/bundled.yaml get /v0/component/merge-history/{id}
openapi: 3.1.0
info:
  title: Gable API
  description: >
    API to interact with the Gable platform

    ## Authorization

    All API requests require an API key to be passed in the `X-API-KEY` header.
    For instructions on finding your API key and api endpoint check out the [API
    Key documentation](../docs/api-keys.md).

    Example: `curl -H "X-API-KEY: <your-api-key>"
    https://api-{organization}.gable.ai/v0/ping`
  contact:
    name: Gable Engineering
    url: https://gable.ai
    email: engineers@gable.ai
  version: 1.28.0
servers:
  - url: https://{hostname}.gable.ai
    description: Gable API
    variables:
      hostname:
        default: demo-api
        description: Customer environment assigned by Gable
security:
  - ApiKeyAuth: []
tags:
  - name: action
  - name: api-keys
  - name: auth
  - name: changelog
  - name: config
  - name: contract
  - name: data-asset
  - name: debug
  - name: s3
  - name: settings
  - name: slack
  - name: sso
  - name: webhook
  - name: notifications
  - name: constraints
  - name: telemetry
  - name: component
  - name: components
  - name: sca
  - name: cross-service-components
  - name: lineage
  - name: events
  - name: measurements
  - name: defect-report
  - name: experimental
paths:
  /v0/component/merge-history/{id}:
    get:
      tags:
        - component
      summary: Get component merge history
      description: >-
        Get a component's MERGE_TO_MAIN version history with per-version diff
        metrics and downstream breakage indicators, ordered newest-first.
      operationId: getComponentMergeHistory
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
          required: true
          description: UUID of the component
        - in: query
          name: limit
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 100
          required: false
          description: Maximum number of merged versions to return, newest-first.
      responses:
        '200':
          description: Component merge history retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ComponentMergeHistoryResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Component not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ComponentMergeHistoryResponse:
      type: object
      description: >-
        A component's MERGE_TO_MAIN version history with per-version diff
        metrics and downstream breakage indicators, ordered newest-first.
      required:
        - componentId
        - entries
      properties:
        componentId:
          type: string
          description: The ID of the component this history belongs to.
        componentName:
          type: string
          nullable: true
          description: The name of the component this history belongs to.
        entries:
          type: array
          description: >-
            Merge history entries ordered newest-first (latest merged version
            first).
          items:
            $ref: '#/components/schemas/MergeHistoryEntry'
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        id:
          type: number
        title:
          type: string
        message:
          type: string
    MergeHistoryEntry:
      type: object
      description: >-
        A single MERGE_TO_MAIN version of a component with its per-version diff
        metrics and downstream breakage summary.
      required:
        - versionId
        - baseVersionId
        - commitTimestamp
        - createdAt
        - jobTrigger
        - isLatestVersion
        - metrics
        - breakage
      properties:
        versionId:
          type: string
          description: The version ID (event/run ID) of this merged version.
        baseVersionId:
          type: string
          nullable: true
          description: >-
            The version ID this entry was diffed against (the previous merged
            version). Null for the oldest (baseline) version, whose metrics
            count every payload as added.
        commitSha:
          type: string
          nullable: true
          description: The commit SHA associated with this version.
        commitTimestamp:
          type: string
          description: The timestamp of the commit that produced this version.
        createdAt:
          type: string
          format: date-time
          description: The timestamp when this version's scan event was created.
        jobTrigger:
          type: string
          description: >-
            The trigger for this version's job (always MERGE_TO_MAIN for
            merge-history entries).
        eventRepo:
          type: string
          nullable: true
          description: Name of the repository from the event that triggered this version.
        isLatestVersion:
          type: boolean
          description: >-
            Indicates whether this is the latest merged version of the
            component.
        approvalStatus:
          type: string
          nullable: true
          enum:
            - PENDING_APPROVAL
            - APPROVED
          description: >-
            Approval status for this version. Approval status is only stored for
            the current/latest component state, so it is populated for the
            latest version and null for older versions.
        metrics:
          $ref: '#/components/schemas/MergeHistoryMetrics'
        breakage:
          $ref: '#/components/schemas/MergeHistoryBreakage'
    MergeHistoryMetrics:
      type: object
      description: >-
        Per-version diff metrics summarizing how many payloads changed relative
        to the previous merged version.
      required:
        - totalAdded
        - totalRemoved
        - totalModified
        - totalUnchanged
      properties:
        totalAdded:
          type: integer
          description: Number of payloads added in this version relative to its base.
        totalRemoved:
          type: integer
          description: Number of payloads removed in this version relative to its base.
        totalModified:
          type: integer
          description: Number of payloads modified in this version relative to its base.
        totalUnchanged:
          type: integer
          description: Number of payloads unchanged in this version relative to its base.
    MergeHistoryBreakage:
      type: object
      description: >-
        Downstream breakage summary for a version — how many downstream
        consumers lose a field they read as a result of this version's changes.
      required:
        - downstreamBreakingCount
        - affectedComponentCount
        - isBreaking
      properties:
        downstreamBreakingCount:
          type: integer
          description: >-
            Number of distinct downstream field mappings that are breaking (a
            consumed egress field was removed).
        affectedComponentCount:
          type: integer
          description: >-
            Number of distinct downstream components with at least one breaking
            field mapping.
        isBreaking:
          type: boolean
          description: >-
            True when this version introduces at least one downstream breaking
            change.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````