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

# Compose a field's cross-service chain over strand edges.

> EXPERIMENTAL. Walk connected strand edges from one (component, payload, field) start state — upstream toward the fields the start field comes from (the default), or downstream toward the fields it flows to — and return every traversal branch: CONNECTED chains with their terminal group, UNMAPPED_HOP branches where a translated path nothing on the landing side exposes ends the walk visibly, and CYCLE branches where a traversal state repeats on its own path. Every involved component is evaluated at its latest scan; a traversal that would cross a composition contract limit fails as a typed error rather than returning a partial graph.



## OpenAPI

````yaml /api-reference/bundled.yaml get /v0/experimental/component/{id}/discriminator_composition
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.54.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: debug
  - name: settings
  - name: slack
  - name: sso
  - name: webhook
  - name: notifications
  - name: telemetry
  - name: component
  - name: components
  - name: sca
  - name: cross-service-components
  - name: lineage
  - name: events
  - name: measurements
  - name: defect-report
  - name: data-tagging
    description: Tag vocabulary management and field level tagging of lineage boundaries.
paths:
  /v0/experimental/component/{id}/discriminator_composition:
    get:
      tags:
        - lineage
      summary: Compose a field's cross-service chain over strand edges.
      description: >-
        EXPERIMENTAL. Walk connected strand edges from one (component, payload,
        field) start state — upstream toward the fields the start field comes
        from (the default), or downstream toward the fields it flows to — and
        return every traversal branch: CONNECTED chains with their terminal
        group, UNMAPPED_HOP branches where a translated path nothing on the
        landing side exposes ends the walk visibly, and CYCLE branches where a
        traversal state repeats on its own path. Every involved component is
        evaluated at its latest scan; a traversal that would cross a composition
        contract limit fails as a typed error rather than returning a partial
        graph.
      operationId: getExperimentalComponentDiscriminatorComposition
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
          description: UUID of the component the walk starts on.
        - in: query
          name: payloadName
          required: true
          schema:
            type: string
          description: >-
            The payload_name coordinate of the start payload group on the
            component.
        - in: query
          name: fieldPath
          required: true
          schema:
            type: string
          description: The field to trace, as a dot-separated path.
        - in: query
          name: direction
          required: false
          schema:
            type: string
            enum:
              - upstream
              - downstream
            default: upstream
          description: >-
            Traversal direction. Upstream walks toward the fields the start
            field comes from; downstream walks toward the fields it flows to.
      responses:
        '200':
          description: Every traversal branch from the start state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscriminatorCompositionResponse'
        '400':
          description: Bad Request (e.g. unparseable start field path)
          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 (includes typed stamp-integrity, committed
            field-path, and composition-limit errors)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    DiscriminatorCompositionResponse:
      type: object
      description: >-
        Every branch of walking connected strand edges upstream from one
        (component, payload, field) start state. Branches are complete — a
        traversal that would cross a contract limit fails as a typed error
        rather than returning a partial graph.
      properties:
        branches:
          type: array
          items:
            $ref: '#/components/schemas/DiscriminatorCompositionBranch'
      required:
        - branches
      additionalProperties: false
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        id:
          type: number
        title:
          type: string
        message:
          type: string
    DiscriminatorCompositionBranch:
      type: object
      description: >-
        One traversal branch of an upstream composition walk. `kind` selects
        which fields beyond `hops` are present — CONNECTED carries `terminal`,
        UNMAPPED_HOP carries `edgeId`/`mapping`/`translatedPath`/`inputPath`,
        and CYCLE carries `repeatedState`.
      properties:
        kind:
          type: string
          enum:
            - CONNECTED
            - UNMAPPED_HOP
            - CYCLE
        hops:
          type: array
          items:
            $ref: '#/components/schemas/DiscriminatorCompositionHop'
        terminal:
          type: object
          description: Where a CONNECTED branch ends.
          properties:
            componentId:
              type: string
              format: uuid
            payload:
              $ref: '#/components/schemas/DiscriminatorGroupAddress'
            group:
              anyOf:
                - $ref: '#/components/schemas/DiscriminatorGroupAddress'
                - type: 'null'
              description: Null when the start state itself had no upstream edges.
            groupId:
              anyOf:
                - type: string
                - type: 'null'
            fieldPath:
              type: string
          required:
            - componentId
            - payload
            - group
            - groupId
            - fieldPath
          additionalProperties: false
        edgeId:
          type: string
          format: uuid
          description: The edge an UNMAPPED_HOP branch failed to cross.
        mapping:
          anyOf:
            - $ref: '#/components/schemas/DiscriminatorEdgeFieldMapping'
            - type: 'null'
          description: >-
            The winning mapping whose translated path nothing upstream exposed;
            null when no stored mapping applied to the input path at all.
        translatedPath:
          anyOf:
            - type: string
            - type: 'null'
          description: Null when there was no applicable mapping to translate through.
        inputPath:
          type: string
          description: The field entering the unmapped hop.
        repeatedState:
          type: object
          description: The traversal state a CYCLE branch revisited on its own path.
          properties:
            componentId:
              type: string
              format: uuid
            payload:
              $ref: '#/components/schemas/DiscriminatorGroupAddress'
            fieldPath:
              type: string
          required:
            - componentId
            - payload
            - fieldPath
          additionalProperties: false
      required:
        - kind
        - hops
      additionalProperties: false
    DiscriminatorCompositionHop:
      type: object
      description: >-
        One traversed hop in an upstream composition walk: the winning stored
        edge mapping that translated the downstream field, and the upstream
        field-mapping group the translated path landed on.
      properties:
        edgeId:
          type: string
          format: uuid
        mapping:
          $ref: '#/components/schemas/DiscriminatorEdgeFieldMapping'
        matchKind:
          type: string
          enum:
            - exact
            - prefix
        inputPath:
          type: string
          description: The downstream field entering the hop, canonical form.
        translatedPath:
          type: string
          description: The upstream field after translation, canonical form.
        sourceComponentId:
          type: string
          format: uuid
        sourcePayload:
          $ref: '#/components/schemas/DiscriminatorGroupAddress'
        destinationComponentId:
          type: string
          format: uuid
        destinationPayload:
          $ref: '#/components/schemas/DiscriminatorGroupAddress'
        landedGroup:
          $ref: '#/components/schemas/DiscriminatorGroupAddress'
        landedGroupId:
          type: string
        suppressed:
          type: boolean
          description: The landed group or its payload is suppressed — context, not hiding.
        competingMappings:
          type: array
          description: >-
            Sorted competing equal-length mapping winners when translation
            fanned out; absent when the winner was unique.
          items:
            $ref: '#/components/schemas/DiscriminatorEdgeFieldMapping'
        competingGroups:
          type: array
          description: >-
            Sorted competing group addresses when the join fanned out; absent
            when exactly one group exposed the translated path.
          items:
            $ref: '#/components/schemas/DiscriminatorGroupAddress'
      required:
        - edgeId
        - mapping
        - matchKind
        - inputPath
        - translatedPath
        - sourceComponentId
        - sourcePayload
        - destinationComponentId
        - destinationPayload
        - landedGroup
        - landedGroupId
        - suppressed
      additionalProperties: false
    DiscriminatorGroupAddress:
      type: object
      description: The metadata coordinates for a discriminator group
      properties:
        componentId:
          type: string
          format: uuid
          description: The component this group lives on. Must equal the route component.
        level:
          $ref: '#/components/schemas/DiscriminatorLevel'
        ancestors:
          type: array
          description: >-
            Root-to-immediate-parent ancestor chain. Empty for a `payload`;
            exactly one `payload` entry for a `field_mapping`. Every ancestor
            carries the same component and config identity as this wrapper.
          items:
            $ref: '#/components/schemas/DiscriminatorGroupAncestor'
        coordinates:
          $ref: '#/components/schemas/DiscriminatorGroupCoordinates'
      required:
        - componentId
        - level
        - ancestors
        - coordinates
      additionalProperties: false
    DiscriminatorEdgeFieldMapping:
      type: object
      description: >-
        One cross-service field mapping carried by an edge. Paths are
        dot-separated field paths (e.g. `order.customer.id`); a literal dot in a
        field name is not supported and is rejected as FIELD_PATH_UNSUPPORTED.
      properties:
        sourceFieldPath:
          type: string
          description: Field path on the edge's source payload.
        destinationFieldPath:
          type: string
          description: Field path on the edge's destination payload.
        notes:
          type: string
          description: Optional free-text note for this mapping.
        dataStoreEvidence:
          type: array
          description: >-
            Scanner-derived evidence describing which part of a whole
            application value the mapped data-store field contributes to. These
            entries enrich this field mapping; they do not declare additional
            discriminator fields or nested field mappings.
          items:
            type: object
            additionalProperties: false
            properties:
              derivation:
                type: string
                enum:
                  - direct
                  - computed
                  - aggregate
                  - unknown
              projectionLabel:
                type: string
                description: SQL projection or mapper label proven for this contribution.
              applicationFieldPath:
                type: string
                description: >-
                  Unambiguous path within the whole application value, when the
                  scanner can prove one.
            required:
              - derivation
      required:
        - sourceFieldPath
        - destinationFieldPath
      additionalProperties: false
    DiscriminatorLevel:
      type: string
      description: >-
        A level in the product_canonical group hierarchy. `payload` is the root
        level; `field_mapping` is its child. The group_by dimensions for each
        level are defined by the config, not enumerated by this API (see
        DiscriminatorGroupCoordinates).
      enum:
        - payload
        - field_mapping
    DiscriminatorGroupAncestor:
      type: object
      description: >-
        One ancestor group in a canonical address chain. Ancestors are ordered
        root-to-immediate-parent: a `field_mapping` carries its `payload`, and a
        `payload` carries none. The chain's depth and each level's coordinate
        dimensions are the discriminator config's, not this API's — copy an
        ancestor's coordinates verbatim rather than rebuilding them. The service
        derives the parent chain from these coordinates; clients never supply an
        authoritative parent group ID.
      properties:
        level:
          $ref: '#/components/schemas/DiscriminatorLevel'
        coordinates:
          $ref: '#/components/schemas/DiscriminatorGroupCoordinates'
      required:
        - level
        - coordinates
      additionalProperties: false
    DiscriminatorGroupCoordinates:
      type: object
      description: >-
        Discriminator-group coordinates — the durable address of a group, as
        key-value pairs of the facts the group is grouped by. Keys are the
        discriminator config's group_by dimensions for the group's level,
        verbatim; the dimension vocabulary is defined by the config, not by this
        API. Values are the exact grouping facts; null is the engine's null
        coordinate (fact unknown). Edges and BYO metadata attach to lineage by
        these coordinates, never by group ID (group IDs are derived from
        coordinates by the discriminator engine and are only stable within one
        discriminator config).
      additionalProperties:
        description: >-
          A grouping fact. The engine's coordinate value algebra: null, boolean,
          integer, string, or array of strings.
        anyOf:
          - type: 'null'
          - type: boolean
          - type: integer
          - type: string
          - type: array
            items:
              type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````

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