> ## 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 all versions of a component

> Get all versions of a component



## OpenAPI

````yaml /api-reference/bundled.yaml get /v0/component/versions/{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/versions/{id}:
    get:
      tags:
        - component
      summary: Get all versions of a component
      description: Get all versions of a component
      operationId: getComponentVersions
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
          required: true
          description: UUID of the component
        - in: query
          name: versionId
          schema:
            type: string
          required: false
          description: Optional version ID to filter or focus on a specific version
      responses:
        '200':
          description: Component versions retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetComponentVersionsResponse'
        '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:
    GetComponentVersionsResponse:
      type: array
      items:
        type: object
        properties:
          versionId:
            type: string
            description: The version ID (runId) of the component.
          createdAt:
            type: string
            format: date-time
            description: The timestamp when the component version was created.
          isLatestVersion:
            type: boolean
            description: Indicates if this version is the latest version of the component.
          job_trigger:
            type: string
            description: Type of the event that triggered this version.
          event_repo:
            type: string
            description: Name of the repository from the event that triggered this version.
          repo_commit:
            type: string
            description: The commit SHA that triggered the version.
          repo_commit_timestamp:
            type: string
            description: The timestamp of the commit.
          job_status:
            type: string
            enum:
              - pending
              - 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.
          dependencies:
            type: array
            description: List of version-specific dependencies for this component version.
            items:
              $ref: '#/components/schemas/StaticAnalysisDependencyMetadata'
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        id:
          type: number
        title:
          type: string
        message:
          type: string
    StaticAnalysisDependencyMetadata:
      type: object
      description: Metadata about a dependency of the code repository
      properties:
        repo_name:
          type: string
          description: Name of the dependency repository
        commit_sha:
          type: string
          description: Associated commit hash of the dependency repository
        commit_timestamp:
          type: string
          description: Timestamp of the commit
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````