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

# Compute a measurement report on the fly

> Fetches lineage data for the specified component versions, runs the measurement comparison, and returns the result without persisting.



## OpenAPI

````yaml /api-reference/bundled.yaml get /v0/measurements/generate
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/measurements/generate:
    get:
      tags:
        - measurements
      summary: Compute a measurement report on the fly
      description: >-
        Fetches lineage data for the specified component versions, runs the
        measurement comparison, and returns the result without persisting.
      operationId: compareMeasurement
      parameters:
        - name: componentId
          in: query
          required: true
          schema:
            type: string
          description: Component to measure.
        - name: compareVersionId
          in: query
          required: true
          schema:
            type: string
          description: Version to evaluate against the base.
        - name: baseVersionId
          in: query
          schema:
            type: string
          description: Base (ground-truth) version ID. Defaults to latest if omitted.
        - name: compareComponentId
          in: query
          schema:
            type: string
          description: >-
            Component ID for the compare version. Defaults to componentId if
            omitted. Use when comparing across namespaces.
        - name: scanOnly
          in: query
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'false'
          description: When true, use raw scan data. When false, use projected data.
        - name: applyIEInclusionFilter
          in: query
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'true'
          description: >-
            When true, apply IE inclusion filtering to lineage data before
            generating the measurement report.
        - name: filterSetId
          in: query
          schema:
            type: string
          description: >-
            Optional ID of a payload filter set to apply. Only honored when the
            base namespace is ground truth; restricts the report to the filter
            set's payloads.
      responses:
        '200':
          description: Computed measurement report
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ComparisonResult'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Component or version not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ComparisonResult:
      type: object
      description: >-
        Top-level object containing all comparison data between a base and
        compare lineage export.
      properties:
        metadata:
          $ref: '#/components/schemas/ComparisonMetadata'
          description: Timestamps, file paths, and component info.
        summary:
          $ref: '#/components/schemas/ComparisonSummary'
          description: Aggregate counts and percentages.
        paths:
          type: array
          description: Per-path comparison results.
          items:
            $ref: '#/components/schemas/PathResult'
        extraPaths:
          type: array
          description: Paths in compare but not in base.
          items:
            $ref: '#/components/schemas/ExtraPath'
      required:
        - metadata
        - summary
        - paths
        - extraPaths
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        id:
          type: number
        title:
          type: string
        message:
          type: string
    ComparisonMetadata:
      type: object
      description: Timestamps, file paths, and component information for the comparison.
      properties:
        baseTimestamp:
          type: string
          description: ISO timestamp of base version.
        compareTimestamp:
          type: string
          description: ISO timestamp of compare version.
        comparisonDate:
          type: string
          description: ISO timestamp when comparison ran.
        componentName:
          type: string
          description: Name of the component being compared.
        baseNamespace:
          type: string
          description: Namespace identifier in base version.
        compareNamespace:
          type: string
          description: Namespace identifier in compare version.
        baseComponentId:
          type: string
          description: Component identifier in base version.
        compareComponentId:
          type: string
          description: Component identifier in compare version.
        baseVersionId:
          type: string
          description: Base version/run ID.
        compareVersionId:
          type: string
          description: Compare version/run ID.
        baseScaPrimeVersion:
          type: string
          description: >-
            SCA-prime tool version that produced the base run. Absent when the
            base run did not originate from the SCA tool (e.g. imported ground
            truth).
        compareScaPrimeVersion:
          type: string
          description: >-
            SCA-prime tool version that produced the compare run. Absent when
            the compare run did not originate from the SCA tool.
        filterSet:
          type: object
          description: >-
            The payload filter set applied to this report, if any. Absent when
            no filter set was applied.
          properties:
            name:
              type: string
              description: Name of the applied filter set.
            includedPaths:
              type: integer
              description: Number of ground-truth paths included by the filter set.
            totalPaths:
              type: integer
              description: >-
                Total ground-truth paths available before the filter set was
                applied.
          required:
            - name
            - includedPaths
            - totalPaths
        mappingJoinMultiplicity:
          type: object
          description: >-
            Optional diagnostics for duplicate field-mapping join keys that can
            multiply rows in the comparison.
          properties:
            baseDuplicateKeyCount:
              type: integer
              description: Number of mapping join keys duplicated in the base dataset.
            compareDuplicateKeyCount:
              type: integer
              description: Number of mapping join keys duplicated in the compare dataset.
            crossProductKeyCount:
              type: integer
              description: >-
                Number of join keys present on both sides where duplicate rows
                would create cross-product matches.
            extraJoinedRows:
              type: integer
              description: >-
                Additional joined rows introduced beyond a single expected row
                per key.
            samples:
              type: array
              description: >-
                All duplicated mapping keys that contribute to join
                multiplication.
              items:
                type: object
                properties:
                  pathPayloadName:
                    type: string
                  ingressField:
                    type: string
                  egressField:
                    type: string
                  baseCount:
                    type: integer
                  compareCount:
                    type: integer
                  joinedRows:
                    type: integer
                  extraJoinedRows:
                    type: integer
                required:
                  - pathPayloadName
                  - ingressField
                  - egressField
                  - baseCount
                  - compareCount
                  - joinedRows
                  - extraJoinedRows
      required:
        - baseTimestamp
        - compareTimestamp
        - comparisonDate
        - componentName
        - baseNamespace
        - compareNamespace
        - baseComponentId
        - compareComponentId
        - baseVersionId
        - compareVersionId
    ComparisonSummary:
      type: object
      description: Aggregate counts and percentages for the comparison.
      properties:
        fullyQualified:
          $ref: '#/components/schemas/SummarySection'
          description: Stats for fully qualified paths.
        partiallyQualified:
          $ref: '#/components/schemas/SummarySection'
          description: Stats for partially qualified paths.
      required:
        - fullyQualified
        - partiallyQualified
    PathResult:
      type: object
      description: Per-path comparison result between base and compare versions.
      properties:
        pathId:
          type: string
          description: Unique path identifier (pathPayloadName).
        ingress:
          $ref: '#/components/schemas/IngressInfo'
          description: Input interface details.
        egress:
          $ref: '#/components/schemas/EgressInfo'
          description: Output interface details.
        overallStatus:
          $ref: '#/components/schemas/OverallStatusEnum'
        quality:
          $ref: '#/components/schemas/QualityEnum'
        notes:
          type: string
          description: Summary of issues found.
        dimensions:
          type: object
          description: Per-dimension comparison results.
          additionalProperties:
            $ref: '#/components/schemas/DimensionResult'
        details:
          $ref: '#/components/schemas/PathDetails'
          description: Detailed field/mapping comparisons.
        pathType:
          $ref: '#/components/schemas/PathType'
          description: Whether this path came from a scan or a user override (BYO).
      required:
        - pathId
        - ingress
        - egress
        - overallStatus
        - quality
        - notes
        - dimensions
        - details
    ExtraPath:
      type: object
      description: A path found in the compare version but not in the base version.
      properties:
        extraPathId:
          type: string
          description: Identifier (e.g., "extra-001").
        ingressPayload:
          type: string
          description: Input payload name.
        egressPayload:
          type: string
          description: Output payload name.
        pathPayloadName:
          type: string
          description: Path payload name.
      required:
        - extraPathId
        - ingressPayload
        - egressPayload
        - pathPayloadName
    SummarySection:
      type: object
      description: >-
        Aggregate statistics for a qualification level (fully or partially
        qualified).
      properties:
        total:
          type: integer
          description: Total path count.
        full:
          type: integer
          description: Paths with full match (green).
        partial:
          type: integer
          description: Paths with partial match (yellow).
        missing:
          type: integer
          description: Missing paths (red).
        highQualityTotal:
          type: integer
          description: Paths where all completeness = KNOWN_COMPLETE.
        highQualityFull:
          type: integer
          description: High quality paths with full match.
        highQualityPartial:
          type: integer
          description: High quality paths with partial match.
        highQualityMissing:
          type: integer
          description: High quality paths that are missing.
        lowQualityTotal:
          type: integer
          description: Paths with incomplete base version data.
        lowQualityFull:
          type: integer
          description: Low quality paths with full match.
        lowQualityPartial:
          type: integer
          description: Low quality paths with partial match.
        lowQualityMissing:
          type: integer
          description: Low quality paths that are missing.
      required:
        - total
        - full
        - partial
        - missing
        - highQualityTotal
        - highQualityFull
        - highQualityPartial
        - highQualityMissing
        - lowQualityTotal
        - lowQualityFull
        - lowQualityPartial
        - lowQualityMissing
    IngressInfo:
      type: object
      description: Input interface details for a path.
      properties:
        id:
          type: string
          description: Interface identifier.
        payloadName:
          type: string
          description: Payload name (e.g., "EventStream").
        signatureName:
          type: string
          description: Signature name.
        schemaName:
          type: string
          description: Schema name.
      required:
        - id
        - payloadName
        - signatureName
        - schemaName
    EgressInfo:
      type: object
      description: Output interface details for a path.
      properties:
        id:
          type: string
          description: Interface identifier.
        payloadName:
          type: string
          description: Payload name (e.g., "EventStream").
        signatureName:
          type: string
          description: Signature name.
        schemaName:
          type: string
          description: Schema name.
      required:
        - id
        - payloadName
        - signatureName
        - schemaName
    OverallStatusEnum:
      type: string
      description: Overall comparison result for a path.
      enum:
        - FULL
        - PARTIAL
        - MISSING
    QualityEnum:
      type: string
      description: Ground truth quality based on completeness dimensions.
      enum:
        - HIGH
        - LOW
    DimensionResult:
      type: object
      description: Comparison result for a single dimension.
      properties:
        status:
          $ref: '#/components/schemas/StatusEnum'
        base:
          type: string
          description: Base value.
        compare:
          type: string
          description: Compare value.
        baseCount:
          type: integer
          description: Count in base version.
        compareCount:
          type: integer
          description: Count in compare version.
        missingCount:
          type: integer
          description: Count of missing items.
        reorderedCount:
          type: integer
          description: Count of reordered items.
        mismatches:
          type: integer
          description: Count of mismatches.
      required:
        - status
        - base
        - compare
        - baseCount
        - compareCount
        - missingCount
        - reorderedCount
        - mismatches
    PathDetails:
      type: object
      description: Detailed field, mapping, and code step comparisons for a path.
      properties:
        ingressFields:
          type: array
          description: Input field comparisons.
          items:
            $ref: '#/components/schemas/FieldDetail'
        egressFields:
          type: array
          description: Output field comparisons.
          items:
            $ref: '#/components/schemas/FieldDetail'
        mappings:
          type: array
          description: Field mapping comparisons.
          items:
            $ref: '#/components/schemas/MappingDetail'
        codeSteps:
          type: array
          description: Data flow step comparisons.
          items:
            $ref: '#/components/schemas/CodeStepDetail'
        pathAnchors:
          type: array
          description: Code anchor comparisons.
          items:
            $ref: '#/components/schemas/PathAnchorDetail'
      required:
        - ingressFields
        - egressFields
        - mappings
        - codeSteps
        - pathAnchors
    PathType:
      type: string
      description: >-
        Indicates how a path was created - either from a scan or via user
        override.
      enum:
        - SCAN_OUTPUT
        - USER_OVERRIDE
    StatusEnum:
      type: string
      description: Comparison result status between base and compare versions.
      enum:
        - PASS
        - FAIL
        - WARNING
        - INFO
        - NA
    FieldDetail:
      type: object
      description: Comparison detail for a single field.
      properties:
        fieldName:
          type: string
          description: Field name.
        fieldType:
          type: string
          description: Field data type.
        base:
          $ref: '#/components/schemas/PresenceEnum'
        compare:
          $ref: '#/components/schemas/PresenceEnum'
        status:
          $ref: '#/components/schemas/StatusEnum'
        completeness:
          $ref: '#/components/schemas/CompletenessEnum'
        severity:
          $ref: '#/components/schemas/SeverityEnum'
      required:
        - fieldName
        - fieldType
        - base
        - compare
        - status
        - completeness
        - severity
    MappingDetail:
      type: object
      description: Comparison detail for a field mapping.
      properties:
        ingressField:
          type: string
          description: Source field name.
        egressField:
          type: string
          description: Target field name.
        base:
          $ref: '#/components/schemas/PresenceEnum'
        compare:
          $ref: '#/components/schemas/PresenceEnum'
        status:
          $ref: '#/components/schemas/StatusEnum'
        completeness:
          $ref: '#/components/schemas/CompletenessEnum'
        severity:
          $ref: '#/components/schemas/SeverityEnum'
        kind:
          $ref: '#/components/schemas/FieldMappingKind'
      required:
        - ingressField
        - egressField
        - base
        - compare
        - status
        - completeness
        - severity
    CodeStepDetail:
      type: object
      description: Comparison detail for a code transformation step.
      properties:
        stepOrder:
          type: integer
          description: Order in the transformation chain.
        base:
          $ref: '#/components/schemas/PresenceEnum'
        compare:
          $ref: '#/components/schemas/PresenceEnum'
        status:
          $ref: '#/components/schemas/StatusEnum'
        ingressField:
          type: string
          description: Associated input field.
        egressField:
          type: string
          description: Associated output field.
        completeness:
          $ref: '#/components/schemas/CompletenessEnum'
        severity:
          $ref: '#/components/schemas/SeverityEnum'
      required:
        - stepOrder
        - base
        - compare
        - status
        - ingressField
        - egressField
        - completeness
        - severity
    PathAnchorDetail:
      type: object
      description: Comparison detail for a code anchor.
      properties:
        anchorName:
          type: string
          description: Code anchor name (e.g., class/file name).
        filePath:
          type: string
          description: Path to source file.
        base:
          $ref: '#/components/schemas/PresenceEnum'
        compare:
          $ref: '#/components/schemas/PresenceEnum'
        baseLine:
          type: string
          description: Base line number.
        compareLine:
          type: string
          description: Compare line number.
        status:
          $ref: '#/components/schemas/StatusEnum'
        completeness:
          $ref: '#/components/schemas/CompletenessEnum'
        severity:
          $ref: '#/components/schemas/SeverityEnum'
      required:
        - anchorName
        - filePath
        - base
        - compare
        - baseLine
        - compareLine
        - status
        - completeness
        - severity
    PresenceEnum:
      type: string
      description: Whether an item exists in the base or compare version.
      enum:
        - PRESENT
        - ABSENT
        - EXTRA
    CompletenessEnum:
      type: string
      description: Ground truth completeness level.
      enum:
        - KNOWN_COMPLETE
        - KNOWN_INCOMPLETE
        - UNKNOWN
    SeverityEnum:
      type: string
      description: Issue severity level for reporting.
      enum:
        - ERROR
        - WARNING
        - REVIEW
        - INFO
        - OK
    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
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````