> ## 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 latest validation

> Retrieve the most recent validation results for a specific job within a workflow



## OpenAPI

````yaml get /v4/data-validation/workflows/{workflowId}/jobs/{jobId}/validations/latest
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/data-validation/workflows/{workflowId}/jobs/{jobId}/validations/latest:
    get:
      tags:
        - Data Validation
        - Data Validation Report
      summary: Get latest validation
      description: Get latest validation for a job
      parameters:
        - name: workflowId
          in: path
          required: true
          schema:
            type: string
        - name: jobId
          in: path
          required: true
          schema:
            type: string
        - name: includeDryRun
          in: query
          schema:
            default: false
            type: boolean
            nullable: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                nullable: true
                allOf:
                  - $ref: '#/components/schemas/DataValidationReport'
        '401':
          description: Unauthorized - Authentication required or failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: boolean
                    description: Indicates an error occurred
                    example: true
                  message:
                    type: string
                    description: Error message
                    example: Authentication required
                required:
                  - error
                  - message
        '500':
          description: Internal Server Error - Unexpected system error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: boolean
                    description: Indicates an error occurred
                    example: true
                  message:
                    type: string
                    description: Error message
                    example: Internal server error
                  details:
                    type: object
                    description: Additional error details
                required:
                  - error
                  - message
      security:
        - ApiKeyAuth: []
components:
  schemas:
    DataValidationReport:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier
          example: abc123
        workflowId:
          type: string
        jobId:
          type: string
        anomaliesCountTotal:
          type: number
        anomaliesCountByRule:
          type: object
          additionalProperties:
            type: number
        createdAt:
          oneOf:
            - type: string
              format: date-time
            - type: string
        updatedAt:
          oneOf:
            - type: string
              format: date-time
            - type: string
        completedAt:
          oneOf:
            - type: string
              format: date-time
            - type: string
          nullable: true
        metadata:
          $ref: '#/components/schemas/ValidationMetadata'
        error:
          type: string
        isDryRun:
          type: boolean
        isWorkflowTriggered:
          type: boolean
        datasetUri:
          type: string
          nullable: true
        anomaliesParquetPath:
          type: string
          nullable: true
        strategy:
          default: ISOLATED
          type: string
          enum:
            - ISOLATED
            - LINKING_COLUMNS
          description: >-
            ISOLATED validates each dataset independently. LINKING_COLUMNS
            validates data integrity across linked columns between datasets.
        anomaliesByRule:
          type: array
          items:
            $ref: '#/components/schemas/AnomalyRuleData'
        cdc:
          $ref: '#/components/schemas/ChangeDetectionResult'
        schemaIssues:
          $ref: '#/components/schemas/SchemaValidationResult'
      required:
        - id
        - workflowId
        - jobId
        - anomaliesCountTotal
        - anomaliesCountByRule
        - createdAt
        - updatedAt
        - anomaliesByRule
        - schemaIssues
      title: DataValidationReport
      description: >-
        Complete validation report including summary fields, anomaly details by
        rule, dataset location details, CDC summary, and execution strategy
    ValidationMetadata:
      type: object
      properties:
        customRules:
          type: array
          items:
            $ref: '#/components/schemas/DynamicRuleConfig'
        libraryRules:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Rule identifier
              name:
                type: string
                description: Rule name
              description:
                type: string
              parameters:
                type: object
                additionalProperties:
                  nullable: true
                description: Pre-configured parameters for the library rule
              targetColumns:
                type: array
                items:
                  type: string
            required:
              - id
              - name
            description: Subset of library rule fields needed for job processing
        totalRulesExecuted:
          type: number
        usedPrompt:
          type: string
        invalidRules:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              error:
                type: string
            required:
              - name
              - error
        recordsValidated:
          type: number
      required:
        - customRules
        - libraryRules
        - totalRulesExecuted
        - recordsValidated
      title: ValidationMetadata
    AnomalyRuleData:
      type: object
      properties:
        ruleName:
          type: string
        anomalies:
          type: array
          items:
            $ref: '#/components/schemas/AnomalyRow'
        pagination:
          $ref: '#/components/schemas/PaginationMeta'
      required:
        - ruleName
        - anomalies
        - pagination
      title: AnomalyRuleData
      description: Anomalies grouped by rule with pagination
    ChangeDetectionResult:
      type: object
      properties:
        strategy:
          default: ISOLATED
          type: string
          enum:
            - ISOLATED
            - LINKING_COLUMNS
          description: >-
            ISOLATED validates each dataset independently. LINKING_COLUMNS
            validates data integrity across linked columns between datasets.
        anomalyCountChanges:
          type: object
          properties:
            previousJobId:
              type: string
            previousValidationId:
              type: string
            anomaliesCountTotal:
              $ref: '#/components/schemas/ChangeDetectionRecord'
            anomaliesCountByRule:
              type: object
              additionalProperties:
                $ref: '#/components/schemas/ChangeDetectionRecord'
          required:
            - previousJobId
            - previousValidationId
            - anomaliesCountTotal
            - anomaliesCountByRule
        anomaliesStatusParquetPath:
          type: string
        statusCounts:
          type: object
          properties:
            NEW:
              type: number
            ONGOING:
              type: number
            RESOLVED:
              type: number
            REOPENED:
              type: number
          required:
            - NEW
            - ONGOING
            - RESOLVED
      title: ChangeDetectionResult
    SchemaValidationResult:
      type: object
      properties:
        missingColumns:
          type: array
          items:
            type: string
        missingRequiredColumns:
          type: array
          items:
            type: string
        extraColumns:
          type: array
          items:
            type: string
      required:
        - missingColumns
        - missingRequiredColumns
        - extraColumns
      title: SchemaValidationResult
      description: Comparison results between expected and actual data schema
    DynamicRuleConfig:
      type: object
      properties:
        name:
          type: string
          description: Rule name
        description:
          type: string
          description: What the rule checks for
        ruleType:
          type: string
          enum:
            - custom_sql
          description: Execution type for dynamic rules
        targetColumns:
          type: array
          items:
            type: string
          description: Columns to which the rule applies
        parameters:
          type: object
          properties:
            sql:
              type: string
          description: Optional parameters for the rule execution
      required:
        - name
        - description
        - ruleType
        - parameters
      title: DynamicRuleConfig
      description: Configuration for custom SQL validation rules with optional parameters
    AnomalyRow:
      type: object
      properties:
        __rule__:
          type: string
        __id__:
          type: string
        __column__:
          type: string
        __type__:
          type: string
        __bad_value__:
          nullable: true
        __status__:
          type: string
          enum:
            - NEW
            - ONGOING
            - RESOLVED
            - REOPENED
          nullable: true
      required:
        - __rule__
        - __id__
        - __column__
        - __type__
      title: AnomalyRow
      description: Raw anomaly data with rule and column information
    PaginationMeta:
      type: object
      properties:
        page:
          type: integer
          minimum: 1
          description: Page number for pagination
          example: 1
        pageSize:
          type: integer
          minimum: 1
          maximum: 100
          description: Number of items per page
          example: 50
        totalItems:
          type: integer
          minimum: 0
          description: Total number of items available
          example: 150
        totalPages:
          type: integer
          minimum: 0
          description: Total number of pages
          example: 3
      required:
        - page
        - pageSize
        - totalItems
        - totalPages
      title: PaginationMeta
      description: Metadata for paginated responses including page info and totals
    ChangeDetectionRecord:
      type: object
      properties:
        count:
          type: number
        change:
          type: number
      required:
        - count
        - change
      title: ChangeDetectionRecord
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication

````