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

# Get workflow quality metrics

> Returns the data quality metric results for a workflow run, plus the run's total data
quality issue count.

Metrics are only available once the run has finished, before that the endpoint returns
`{ "results": null, "issueCount": null }`.

Each metric result carries a `status`:
- `OK`: the metric was computed, see `data` for it's details.
- `PENDING`: the metric has not been computed yet.
- `NOT_APPLICABLE`: the metric cannot be computed for this workflow, see `message`.
- `ERROR`: the metric computation failed, see `message`.




## OpenAPI

````yaml get /v4/workflows/{workflowId}/quality-metrics
openapi: 3.0.3
info:
  title: Kadoa API
  version: 3.0.0
  contact:
    name: Support
    email: support@kadoa.com
servers:
  - url: https://api.kadoa.com
security: []
paths:
  /v4/workflows/{workflowId}/quality-metrics:
    get:
      tags:
        - Workflows
      summary: Get workflow quality metrics
      description: >
        Returns the data quality metric results for a workflow run, plus the
        run's total data

        quality issue count.


        Metrics are only available once the run has finished, before that the
        endpoint returns

        `{ "results": null, "issueCount": null }`.


        Each metric result carries a `status`:

        - `OK`: the metric was computed, see `data` for it's details.

        - `PENDING`: the metric has not been computed yet.

        - `NOT_APPLICABLE`: the metric cannot be computed for this workflow, see
        `message`.

        - `ERROR`: the metric computation failed, see `message`.
      parameters:
        - name: workflowId
          in: path
          required: true
          description: ID of the workflow to retrieve quality metrics for
          schema:
            type: string
        - name: jobId
          in: query
          required: false
          description: ID of a specific run. Omit to use the latest run.
          schema:
            type: string
      responses:
        '200':
          description: >
            Quality metric results. `results` and `issueCount` are null until
            the run has finished.
          content:
            application/json:
              schema:
                type: object
                required:
                  - results
                  - issueCount
                properties:
                  results:
                    type: object
                    nullable: true
                    description: >-
                      Metric results keyed by metric. Null until the run has
                      finished.
                    properties:
                      COMPLETENESS:
                        type: object
                        description: >-
                          Whether the extraction found as many rows as the
                          source suggests.
                        properties:
                          key:
                            type: string
                            enum:
                              - COMPLETENESS
                          status:
                            type: string
                            enum:
                              - OK
                              - PENDING
                              - NOT_APPLICABLE
                              - ERROR
                          message:
                            type: string
                            description: >-
                              Explanation, present when status is NOT_APPLICABLE
                              or ERROR.
                          data:
                            type: object
                            description: Metric details, present when status is OK.
                            properties:
                              score:
                                type: number
                                minimum: 0
                                maximum: 100
                                deprecated: true
                                description: Deprecated & scheduled for removal.
                              actualRowCount:
                                type: integer
                                description: Number of rows the extraction produced.
                              expectedRowCount:
                                type: integer
                                description: >-
                                  Number of rows the source suggests should
                                  exist.
                              cappedByLimit:
                                type: boolean
                                description: >-
                                  True when the row count was capped by the
                                  workflow's extraction limit.
                              signals:
                                type: array
                                description: >-
                                  Evidence used to derive the expected row
                                  count.
                                items:
                                  type: object
                                  properties:
                                    totalCount:
                                      type: integer
                                    description:
                                      type: string
                                    sources:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          count:
                                            type: integer
                                          xpath:
                                            type: string
                                          regex:
                                            type: string
                                          source:
                                            type: string
                                          url:
                                            type: string
                      SCHEMA_VALIDATION:
                        type: object
                        description: >-
                          Checks the dataset against the workflow's schema
                          validation rules.
                        properties:
                          key:
                            type: string
                            enum:
                              - SCHEMA_VALIDATION
                          status:
                            type: string
                            enum:
                              - OK
                              - PENDING
                              - NOT_APPLICABLE
                              - ERROR
                          message:
                            type: string
                            description: >-
                              Explanation, present when status is NOT_APPLICABLE
                              or ERROR.
                          data:
                            type: object
                            description: Metric details, present when status is OK.
                            properties:
                              score:
                                type: number
                                minimum: 0
                                maximum: 100
                                deprecated: true
                                description: Deprecated & scheduled for removal.
                              ruleViolationCount:
                                type: integer
                                description: Number of violated rules.
                              rowViolationCount:
                                type: integer
                                description: Number of rows affected by violations.
                              columns:
                                type: array
                                description: Per-column validation results.
                                items:
                                  type: object
                                  properties:
                                    name:
                                      type: string
                                    score:
                                      type: number
                                      deprecated: true
                                      description: Deprecated & scheduled for removal.
                                    rulesConfigured:
                                      type: boolean
                                    violations:
                                      type: array
                                      items:
                                        type: object
                      SEMANTIC_PLAUSIBILITY:
                        type: object
                        description: >-
                          Flags values that do not fit with the rest of the
                          dataset.
                        properties:
                          key:
                            type: string
                            enum:
                              - SEMANTIC_PLAUSIBILITY
                          status:
                            type: string
                            enum:
                              - OK
                              - PENDING
                              - NOT_APPLICABLE
                              - ERROR
                          message:
                            type: string
                            description: >-
                              Explanation, present when status is NOT_APPLICABLE
                              or ERROR.
                          data:
                            type: object
                            description: Metric details, present when status is OK.
                            properties:
                              score:
                                type: number
                                minimum: 0
                                maximum: 100
                                deprecated: true
                                description: Deprecated & scheduled for removal.
                              columns:
                                type: array
                                description: Per-column plausibility results.
                                items:
                                  type: object
                                  properties:
                                    name:
                                      type: string
                                    score:
                                      type: number
                                      deprecated: true
                                      description: Deprecated & scheduled for removal.
                                    flaggedPercent:
                                      type: number
                                    reasoning:
                                      type: string
                                    flaggedExamples:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          value:
                                            type: string
                  issueCount:
                    type: integer
                    nullable: true
                    description: >-
                      Total number of data quality issues detected for the run.
                      Null until the run has finished.
        '400':
          description: Invalid workflow ID format
        '401':
          description: Unauthorized (invalid or missing API key or Bearer token)
        '404':
          description: Workflow not found
        '500':
          description: Internal server error
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer token for authentication

````