> ## 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 components history

> Get components run history entries, optionally filtered by trigger, branch, commit, namespace, and time range.



## OpenAPI

````yaml /api-reference/bundled.yaml get /v0/components/history
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/components/history:
    get:
      tags:
        - components
      summary: Get components history
      description: >-
        Get components run history entries, optionally filtered by trigger,
        branch, commit, namespace, and time range.
      operationId: getComponentsHistory
      parameters:
        - name: componentName
          in: query
          description: Human-readable name of the component.
          required: false
          schema:
            type: string
        - name: branchName
          in: query
          description: Filter by git branch name.
          required: false
          schema:
            type: string
            default: main
        - name: commitSha
          in: query
          description: Filter by git commit SHA.
          required: false
          schema:
            type: string
        - name: namespace
          in: query
          description: Filter by namespace (e.g. prod, staging, dev).
          required: false
          schema:
            type: string
        - name: timeRangeStart
          in: query
          description: Inclusive start timestamp for filtering runs.
          required: false
          schema:
            type: string
            format: date-time
        - name: timeRangeEnd
          in: query
          description: Inclusive end timestamp for filtering runs.
          required: false
          schema:
            type: string
            format: date-time
        - name: runId
          in: query
          description: Filter by specific run ID.
          required: false
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of history entries to return.
          required: false
          schema:
            type: integer
            default: 20
        - name: cursor
          in: query
          description: Token for paginating through large result sets.
          required: false
          schema:
            type: string
        - name: sortBy
          in: query
          description: Field to sort results by.
          required: false
          schema:
            type: string
            enum:
              - commitTimestamp
              - analysisTimestamp
            default: commitTimestamp
        - name: sortOrder
          in: query
          description: Sort direction.
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
      responses:
        '200':
          description: Component history retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetComponentsHistoryResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    GetComponentsHistoryResponse:
      type: object
      required:
        - history
      properties:
        history:
          type: array
          items:
            type: object
            required:
              - runId
              - componentId
              - componentName
              - createdAt
            properties:
              runId:
                type: string
                description: The run/version identifier for this history entry.
              componentId:
                type: string
                description: The unique identifier of the component.
              componentName:
                type: string
                description: The human-readable name of the component.
              createdAt:
                type: string
                format: date-time
                description: The analysis timestamp when this run was processed.
              commitTimestamp:
                type: string
                format: date-time
                description: The git commit timestamp associated with this version.
              analysisTimestamp:
                type: string
                format: date-time
                description: The timestamp when this analysis run was processed.
              jobTrigger:
                type: string
                description: >-
                  The trigger that produced this run (e.g. push, pr, manual,
                  schedule, byol_import).
              branchName:
                type: string
                description: The git branch associated with the run.
              commitSha:
                type: string
                description: The git commit SHA associated with the run.
              namespace:
                type: string
                description: >-
                  The namespace associated with the run (e.g. prod, staging,
                  dev).
              repoUri:
                type: string
                description: The repository URI (e.g. https://github.com/org/repo).
              job_status:
                type: string
                enum:
                  - pending
                  - uploaded
                  - processing
                  - success
                  - error
                description: Status of the job that created this version.
              job_id:
                type: string
                description: ID of the job that created this version.
        nextCursor:
          type: string
          nullable: true
          description: >-
            Opaque cursor for fetching the next page. Pass as `cursor` in the
            next request. Null when there are no more results.
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        id:
          type: number
        title:
          type: string
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````