> ## Documentation Index
> Fetch the complete documentation index at: https://developers.askparable.com/llms.txt
> Use this file to discover all available pages before exploring further.

# contractTableStats

> Latest catalog table-statistics snapshot for every contract in the
workspace's catalog (EDR-0031). Sourced from the Query Layer's REST
control surface; web-api applies workspace permission gating and
forwards the response unchanged.



## OpenAPI

````yaml /api-reference/openapi.json get /api/catalog/contract-table-stats
openapi: 3.0.3
info:
  title: Parable API
  description: >-
    The REST API for your Parable workspace: manage connectors and taps, explore
    your data catalog, upload artifacts, and administer users and roles.
  version: v1
servers:
  - url: https://api.askparable.com
    description: Production
security: []
paths:
  /api/catalog/contract-table-stats:
    get:
      tags:
        - catalog
      summary: contractTableStats
      description: |-
        Latest catalog table-statistics snapshot for every contract in the
        workspace's catalog (EDR-0031). Sourced from the Query Layer's REST
        control surface; web-api applies workspace permission gating and
        forwards the response unchanged.
      operationId: CatalogContractTableStatsHandler
      parameters:
        - description: >-
            Workspace slug. Overrides subdomain-based workspace resolution when
            provided.
          in: header
          name: X-Tenant
          required: false
          schema:
            example: acme
            type: string
        - description: Optional request correlation ID echoed back in the response.
          in: header
          name: X-Request-ID
          required: false
          schema:
            example: 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/TenantContractTableStatsResponse'
                  links:
                    $ref: '#/components/schemas/ResponseLinks'
                  meta:
                    $ref: '#/components/schemas/ResponseMeta'
                required:
                  - data
                  - meta
                type: object
          description: Successful response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad request
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal server error
      security:
        - bearerAuth: []
components:
  schemas:
    TenantContractTableStatsResponse:
      description: |-
        Workspace-scoped bulk response: latest snapshot for every contract
        reachable from the workspace's enabled catalog.
      properties:
        stats:
          items:
            $ref: '#/components/schemas/ContractTableStats'
          type: array
        statsVersion:
          description: >-
            Opaque hash bumped whenever any snapshot in the workspace set
            changes.
          type: string
        tenantId:
          description: UUID v4 with automatic base62 encoding for client-facing APIs
          type: string
      required:
        - tenantId
        - statsVersion
        - stats
      type: object
    ResponseLinks:
      properties:
        first:
          nullable: true
          type: string
        last:
          nullable: true
          type: string
        next:
          nullable: true
          type: string
        prev:
          nullable: true
          type: string
      type: object
    ResponseMeta:
      properties:
        requestId:
          description: Unique identifier for the request
          type: string
        totalCount:
          description: Total count of items for paginated responses
          nullable: true
          type: integer
      required:
        - requestId
      type: object
    Error:
      properties:
        error:
          type: string
      type: object
    ContractTableStats:
      description: |-
        ----------------------------------------------------------------------
        EDR-0031 catalog table-statistics response types.
        These mirror the structurally identical types defined in
        platform-schemas/schemas/query-layer/stats/types.graphql. They are
        duplicated here because psgen's cross-schema dependency mechanism
        loads every .graphql file in the dependency directory, which would
        this schema's own `Query`. The web-api proxy maps the generated Go
        query-layer SDK structs into these types in its handler.
        ----------------------------------------------------------------------
        Latest shape snapshot for a single contract (tap or data). Returned by
        the catalog table-statistics endpoints. Sourced from the Query Layer's
        read of the Delta shape_history table; web-api adds no fields, just
        permission gating and pass-through.
      properties:
        capturedAt:
          description: Wall-clock timestamp the snapshot was captured.
          type: string
        columnCount:
          description: >-
            Signed 64-bit integer; range bounded by JavaScript's safe-integer
            ceiling.
          format: int64
          type: integer
        columns:
          description: Per-column entries. Order matches the contract outputSchema.
          items:
            $ref: '#/components/schemas/ContractColumnStats'
          type: array
        dataContractId:
          description: UUID v4 with automatic base62 encoding for client-facing APIs
          type: string
        distinctCountsExact:
          description: |-
            When false, distinct counts in ContractColumnStats are approximate.
            v1 always sets this to true.
          type: boolean
        layer:
          $ref: '#/components/schemas/DataContractLayerEnum'
          description: Layer of the contract at the time of capture.
        loadType:
          description: 'Load type at write time: "full", "incremental", or null.'
          type: string
        rowCount:
          description: Dataset-level metrics.
          format: int64
          type: integer
        runDate:
          type: string
        runId:
          description: |-
            Run identity. runId is the transformation-flow run UUID; runDate is
            the logical date the run targets in YYYY-MM-DD form.
          type: string
        shapeHistoryUri:
          description: Source Delta path that this snapshot was read from.
          type: string
        snapshotId:
          description: |-
            Stable identity for this snapshot, equal to the runId of the
            underlying shape_history row that produced it.
          type: string
        tapContractId:
          description: |-
            The contract this snapshot describes. Exactly one of tapContractId /
            dataContractId is non-null.
          type: string
        totalByteSize:
          description: |-
            Total uncompressed byte size of the underlying Delta table at
            capture time, when available.
          format: int64
          type: integer
      required:
        - snapshotId
        - layer
        - runId
        - runDate
        - capturedAt
        - rowCount
        - columnCount
        - distinctCountsExact
        - shapeHistoryUri
        - columns
      type: object
    ContractColumnStats:
      description: |-
        Per-column snapshot. Embedded in ContractTableStats; not stored
        independently.
      properties:
        avg:
          description: Numeric-only summaries. Null for non-numeric columns.
          format: double
          type: number
        columnName:
          type: string
        columnType:
          description: |-
            Polars / Arrow physical type captured at write time (e.g. "Int64",
            "Utf8", "Datetime(microseconds, UTC)").
          type: string
        distinctCount:
          description: |-
            Distinct count. Exactness governed by
            ContractTableStats.distinctCountsExact.
          format: int64
          type: integer
        maxValue:
          type: string
        minValue:
          description: |-
            Min / max as ISO-string-cast values. Null when the column has zero
            non-null rows.
          type: string
        nonNullCount:
          description: Non-null row count for the column. Equals rowCount minus null count.
          format: int64
          type: integer
        nullPct:
          description: Null percentage in [0.0, 100.0], rounded to two decimals.
          format: double
          type: number
        q25:
          format: double
          type: number
        q50:
          format: double
          type: number
        q75:
          format: double
          type: number
        std:
          format: double
          type: number
      required:
        - columnName
        - columnType
        - distinctCount
        - nonNullCount
        - nullPct
      type: object
    DataContractLayerEnum:
      enum:
        - bronze_i
        - bronze_ii
        - silver
        - gold
        - mvo
      type: string
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````