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

# Declare a discriminator-native cross-service edge.

> EXPERIMENTAL. Declare a discriminator-native cross-service edge between two payload group addresses. The complete normalized edge body is persisted as one immutable declaration event; the receipt's edgeId addresses it for later deletion.



## OpenAPI

````yaml /api-reference/bundled.yaml post /v0/experimental/discriminator_edges
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/discriminator_edges:
    post:
      tags:
        - lineage
      summary: Declare a discriminator-native cross-service edge.
      description: >-
        EXPERIMENTAL. Declare a discriminator-native cross-service edge between
        two payload group addresses. The complete normalized edge body is
        persisted as one immutable declaration event; the receipt's edgeId
        addresses it for later deletion.
      operationId: postExperimentalDiscriminatorEdge
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DiscriminatorEdgeDeclarationRequest'
      responses:
        '201':
          description: Edge declaration accepted; receipt returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscriminatorEdgeReceipt'
        '400':
          description: Bad Request (invalid endpoint address or field mappings)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: An addressed component was not found / not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    DiscriminatorEdgeDeclarationRequest:
      type: object
      description: >-
        Request to declare an edge between two payload addresses. Either
        endpoint may be a code component's payload group (its `payload_name`
        coordinate under the component's discriminator config) or a data store:
        a store is addressed as a single payload whose `payload_name` is the
        store component's name, and its mapped field paths must be names from
        the store's schema.
      properties:
        source:
          $ref: '#/components/schemas/DiscriminatorGroupAddress'
        destination:
          $ref: '#/components/schemas/DiscriminatorGroupAddress'
        fieldMappings:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/DiscriminatorEdgeFieldMapping'
        note:
          type: string
          description: Optional free-text audit note.
      required:
        - source
        - destination
        - fieldMappings
      additionalProperties: false
    DiscriminatorEdgeReceipt:
      type: object
      description: >-
        Returned data after attaching an edge using discriminator coordinate
        system.
      properties:
        edgeId:
          type: string
          format: uuid
        eventId:
          type: string
          format: uuid
      required:
        - edgeId
        - eventId
      additionalProperties: false
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        id:
          type: number
        title:
          type: string
        message:
          type: string
    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.