> ## 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.

# Add path to component.

> Add a new path to a CODE component.



## OpenAPI

````yaml /api-reference/bundled.yaml post /v0/experimental/components/{id}/paths
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/experimental/components/{id}/paths:
    post:
      tags:
        - experimental
      summary: Add path to component.
      description: Add a new path to a CODE component.
      operationId: postExperimentalPath
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: The component ID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LineagePath'
      responses:
        '201':
          description: Path created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  path:
                    $ref: '#/components/schemas/LineagePath'
                required:
                  - path
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: 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:
    LineagePath:
      type: object
      description: >
        A path connecting an ingress to an egress within a component. Boundary
        data (schema, signature, kind) is inlined for round-trip editing. Fields
        marked readOnly are returned by GET but ignored on POST/PUT.
      properties:
        path_id:
          type: string
          format: uuid
          readOnly: true
          description: Server-assigned path ID.
        path_type:
          type: string
          enum:
            - SCAN_OUTPUT
            - USER_OVERRIDE
          readOnly: true
          description: Whether this path came from a scan or user override.
        is_suppressed:
          type: boolean
          readOnly: true
          description: Whether this path is currently suppressed.
          default: false
        ingress:
          $ref: '#/components/schemas/PathBoundary'
        egress:
          $ref: '#/components/schemas/PathBoundary'
        field_mappings:
          type: array
          items:
            $ref: '#/components/schemas/PathFieldMapping'
        code_anchors:
          type: array
          items:
            $ref: '#/components/schemas/PathCodeAnchor'
        transformation_summary:
          type: string
          description: Brief summary of the data transformation on this path.
        payload_name:
          type: string
          description: The payload name for this path.
        completeness:
          $ref: '#/components/schemas/Completeness'
        reason:
          type: string
          writeOnly: true
          description: Optional reason for creating or updating this path.
        effective_since_commit_sha:
          type: string
          writeOnly: true
          description: >
            Commit SHA this path is effective from. When omitted, defaults to
            the latest scanned commit for the component. The backend resolves
            the corresponding commit timestamp from the scan history.
      required:
        - ingress
        - egress
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        id:
          type: number
        title:
          type: string
        message:
          type: string
    PathBoundary:
      type: object
      description: >
        One side (ingress or egress) of a path, with full boundary data inlined.
        Matches the write model structure for round-trip editing.
      properties:
        id:
          type: string
          format: uuid
          description: The boundary (ingress/egress) ID.
        kind:
          type: string
          description: The boundary kind (e.g. "postgres", "gateway_response").
        signature_name:
          type: string
          description: The signature name (e.g. package/class/method).
        schema:
          type: object
          description: Schema definition for this boundary.
          additionalProperties: true
        payload_name:
          type: string
          description: The payload name associated with this boundary.
        description:
          type: string
          description: Optional description of this boundary.
      required:
        - signature_name
    PathFieldMapping:
      type: object
      description: A field-level mapping on a path (ingress to egress).
      properties:
        ingress_field:
          type: string
          description: The field name on the ingress side.
        egress_field:
          type: string
          description: The field name on the egress side.
        notes:
          type: string
          description: Optional notes about this field mapping.
        kind:
          allOf:
            - $ref: '#/components/schemas/FieldMappingKind'
          description: The type of data flow this mapping represents.
      required:
        - ingress_field
        - egress_field
    PathCodeAnchor:
      type: object
      description: A code location anchor associated with a path.
      properties:
        anchor_id:
          type: string
          description: Unique identifier for this anchor.
        name:
          type: string
          description: Human-readable name for this anchor.
        file:
          type: string
          description: File path relative to project root.
        line_start:
          type: integer
          description: Starting line number.
        line_end:
          type: integer
          description: Ending line number.
        column_start:
          type: integer
          description: Starting column number.
        column_end:
          type: integer
          description: Ending column number.
        url:
          type: string
          description: Full URL to this code location (if available).
      required:
        - anchor_id
    Completeness:
      type: object
      properties:
        ingress:
          $ref: '#/components/schemas/CompletenessClassification'
          description: >-
            The completeness of non-schema ingress elements (name, signature,
            code anchor, etc.).
        ingress_schema:
          $ref: '#/components/schemas/CompletenessClassification'
          description: The completeness of the ingress's field schema.
        egress:
          $ref: '#/components/schemas/CompletenessClassification'
          description: >-
            The completeness of non-schema egress elements (name, signature,
            code anchor, etc.).
        egress_schema:
          $ref: '#/components/schemas/CompletenessClassification'
          description: The completeness of the egress's field schema.
        field_mappings:
          $ref: '#/components/schemas/CompletenessClassification'
          description: The completeness of the field mappings.
      required:
        - ingress
        - ingress_schema
        - egress
        - egress_schema
        - field_mappings
    FieldMappingKind:
      type: string
      description: >
        How a field mapping participates in the path.

        - DataFlow: the ingress field's value flows into the egress field
        (default).

        - KeyValueBridge: the mapping bridges a key/value pair rather than
        copying a single value.

        - ControlFlow: the ingress field influences whether/how the egress field
        is produced, but is not its value.

        When absent, treat as DataFlow.
      enum:
        - DataFlow
        - KeyValueBridge
        - ControlFlow
    CompletenessClassification:
      type: string
      description: A completeness classification of a ground truth element.
      enum:
        - UNKNOWN
        - KNOWN_INCOMPLETE
        - KNOWN_COMPLETE
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````