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

# Check if the asset associated with the contract is compliant

> Check if the asset associated with the contract is compliant



## OpenAPI

````yaml /api-reference/bundled.yaml post /v0/contract/check-compliance
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/contract/check-compliance:
    post:
      tags:
        - data-asset
        - contract
      summary: Check if the asset associated with the contract is compliant
      description: Check if the asset associated with the contract is compliant
      operationId: ContractCheckCompliance
      requestBody:
        description: Contract to check
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContractCheckComplianceRequest'
      responses:
        '200':
          description: Data Asset ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractCheckComplianceResponse'
        '400':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ContractCheckComplianceRequest:
      type: object
      required:
        - contract
      properties:
        contract:
          type: object
          required:
            - contractSchema
            - dataAssetResourceName
          properties:
            contractSchema:
              type: array
              items:
                $ref: '#/components/schemas/GableSchemaContractField'
            dataAssetResourceName:
              $ref: '#/components/schemas/DataAssetResourceName'
    ContractCheckComplianceResponse:
      type: object
      required:
        - violations
      properties:
        violations:
          type: array
          items:
            type: object
            required:
              - message
              - field
              - fieldType
              - violationType
              - expected
            properties:
              message:
                type: string
              field:
                type: string
              fieldType:
                type: string
              violationType:
                $ref: '#/components/schemas/ContractViolationType'
              expected:
                type: string
              actual:
                type: string
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        id:
          type: number
        title:
          type: string
        message:
          type: string
    GableSchemaContractField:
      allOf:
        - oneOf:
            - $ref: '#/components/schemas/GableSchemaStruct'
            - $ref: '#/components/schemas/GableSchemaNull'
            - $ref: '#/components/schemas/GableSchemaBool'
            - $ref: '#/components/schemas/GableSchemaInt'
            - $ref: '#/components/schemas/GableSchemaFloat'
            - $ref: '#/components/schemas/GableSchemaString'
            - $ref: '#/components/schemas/GableSchemaBytes'
            - $ref: '#/components/schemas/GableSchemaList'
            - $ref: '#/components/schemas/GableSchemaMap'
            - $ref: '#/components/schemas/GableSchemaEnum'
            - $ref: '#/components/schemas/GableSchemaUnion'
            - $ref: '#/components/schemas/GableSchemaAliasReference'
            - $ref: '#/components/schemas/GableSchemaUnknown'
        - type: object
          properties:
            name:
              type: string
            optional:
              type: boolean
        - type: object
          properties:
            constraints:
              type: object
              additionalProperties: true
    DataAssetResourceName:
      type: string
      pattern: >-
        ^(protobuf|avro|json_schema|java|postgres|mysql|mssql|snowflake|bigquery|python|pyspark|typescript|s3|dataframe|kotlin|swift|php)://(?=.*[a-zA-Z0-9])[a-zA-Z0-9_@\.:/-]+[:/](?=.*[a-zA-Z0-9])[a-zA-Z0-9
        _\./-\{\}\-]+$
      description: >-
        The unique identifier of the data asset. It follows the pattern
        '{data_asset_type}://{data_asset_source}:{data_asset_name}'
    ContractViolationType:
      type: string
      enum:
        - MISSING_REQUIRED_PROPERTY
        - INCOMPATIBLE_TYPE
        - GREATER_THAN
        - GREATER_THAN_OR_EQUAL_TO
        - LESS_THAN
        - LESS_THAN_OR_EQUAL_TO
        - IS_NULL
        - IS_NULL_THRESHOLD
        - IS_NOT_EMPTY
        - LENGTH
        - LENGTH_GREATER_THAN
        - LENGTH_GREATER_THAN_OR_EQUAL_TO
        - LENGTH_LESS_THAN
        - LENGTH_LESS_THAN_OR_EQUAL_TO
        - MISSING_DATA_ASSET
        - PII_DETECTED
    GableSchemaStruct:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - struct
        name:
          type: string
        fields:
          type: array
          items:
            $ref: '#/components/schemas/GableSchemaField'
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
    GableSchemaNull:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - 'null'
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
    GableSchemaBool:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - bool
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
    GableSchemaInt:
      type: object
      required:
        - type
        - bits
      properties:
        type:
          type: string
          enum:
            - int
        bits:
          type: integer
          minimum: 1
          maximum: 2147483647
        signed:
          type: boolean
          default: true
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          $ref: '#/components/schemas/LogicalEnumTemporal'
        unit:
          type: string
          enum:
            - year
            - month
            - day
            - hour
            - minute
            - second
            - millisecond
            - microsecond
            - nanosecond
            - picosecond
        timezone:
          type: string
    GableSchemaFloat:
      type: object
      required:
        - type
        - bits
      properties:
        type:
          type: string
          enum:
            - float
        bits:
          type: integer
          minimum: 1
          maximum: 2147483647
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
    GableSchemaString:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - string
        bytes:
          type: integer
          minimum: 1
          maximum: 9223372036854776000
        variable:
          type: boolean
          default: true
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          $ref: '#/components/schemas/LogicalEnumText'
    GableSchemaBytes:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - bytes
        bytes:
          type: integer
          minimum: 1
          maximum: 9223372036854776000
        variable:
          type: boolean
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          $ref: '#/components/schemas/LogicalEnumNumeric'
        precision:
          type: integer
          minimum: 1
          maximum: 2147483647
        scale:
          type: integer
          minimum: 0
          maximum: 2147483647
        unit:
          type: string
          enum:
            - year
            - month
            - day
            - hour
            - minute
            - second
            - millisecond
            - microsecond
            - nanosecond
            - picosecond
      if:
        properties:
          variable:
            const: false
        required:
          - variable
      then:
        required:
          - bytes
    GableSchemaList:
      type: object
      required:
        - type
        - values
      properties:
        type:
          type: string
          enum:
            - list
        values:
          $ref: '#/components/schemas/GableSchemaType'
        length:
          type: integer
          minimum: 1
          maximum: 9223372036854776000
        variable:
          type: boolean
          default: true
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
    GableSchemaMap:
      type: object
      required:
        - type
        - keys
        - values
      properties:
        type:
          type: string
          enum:
            - map
        keys:
          $ref: '#/components/schemas/GableSchemaType'
        values:
          $ref: '#/components/schemas/GableSchemaType'
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
    GableSchemaEnum:
      type: object
      required:
        - type
        - symbols
      properties:
        type:
          type: string
          enum:
            - enum
        symbols:
          type: array
          items:
            type: string
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
    GableSchemaUnion:
      type: object
      required:
        - type
        - types
      properties:
        type:
          type: string
          enum:
            - union
        types:
          type: array
          items:
            $ref: '#/components/schemas/GableSchemaType'
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
    GableSchemaAliasReference:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          not:
            $ref: '#/components/schemas/GableSchemaTypeName'
        doc:
          type: string
        logical:
          type: string
      additionalProperties: true
      not:
        required:
          - alias
    GableSchemaUnknown:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - unknown
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
    GableSchemaField:
      oneOf:
        - $ref: '#/components/schemas/GableSchemaFieldStruct'
        - $ref: '#/components/schemas/GableSchemaFieldNull'
        - $ref: '#/components/schemas/GableSchemaFieldBool'
        - $ref: '#/components/schemas/GableSchemaFieldInt'
        - $ref: '#/components/schemas/GableSchemaFieldFloat'
        - $ref: '#/components/schemas/GableSchemaFieldString'
        - $ref: '#/components/schemas/GableSchemaFieldBytes'
        - $ref: '#/components/schemas/GableSchemaFieldList'
        - $ref: '#/components/schemas/GableSchemaFieldMap'
        - $ref: '#/components/schemas/GableSchemaFieldEnum'
        - $ref: '#/components/schemas/GableSchemaFieldUnion'
        - $ref: '#/components/schemas/GableSchemaFieldAliasReference'
        - $ref: '#/components/schemas/GableSchemaFieldUnknown'
      discriminator:
        propertyName: type
        mapping:
          struct:
            $ref: '#/components/schemas/GableSchemaFieldStruct'
          'null':
            $ref: '#/components/schemas/GableSchemaFieldNull'
          bool:
            $ref: '#/components/schemas/GableSchemaFieldBool'
          int:
            $ref: '#/components/schemas/GableSchemaFieldInt'
          float:
            $ref: '#/components/schemas/GableSchemaFieldFloat'
          string:
            $ref: '#/components/schemas/GableSchemaFieldString'
          bytes:
            $ref: '#/components/schemas/GableSchemaFieldBytes'
          list:
            $ref: '#/components/schemas/GableSchemaFieldList'
          map:
            $ref: '#/components/schemas/GableSchemaFieldMap'
          enum:
            $ref: '#/components/schemas/GableSchemaFieldEnum'
          union:
            $ref: '#/components/schemas/GableSchemaFieldUnion'
          aliasReference:
            $ref: '#/components/schemas/GableSchemaFieldAliasReference'
          unknown:
            $ref: '#/components/schemas/GableSchemaFieldUnknown'
    LogicalEnumTemporal:
      type: string
      enum:
        - Date
        - Time
        - Duration
        - Timestamp
    LogicalEnumText:
      type: string
      enum:
        - UUID
        - org.iso.8601.Date
        - org.iso.8601.DateTime
        - org.iso.8601.Time
    LogicalEnumNumeric:
      type: string
      enum:
        - Decimal
        - Interval
    GableSchemaType:
      oneOf:
        - $ref: '#/components/schemas/GableSchemaTypeName'
        - oneOf:
            - $ref: '#/components/schemas/GableSchemaStruct'
            - $ref: '#/components/schemas/GableSchemaNull'
            - $ref: '#/components/schemas/GableSchemaBool'
            - $ref: '#/components/schemas/GableSchemaInt'
            - $ref: '#/components/schemas/GableSchemaFloat'
            - $ref: '#/components/schemas/GableSchemaString'
            - $ref: '#/components/schemas/GableSchemaBytes'
            - $ref: '#/components/schemas/GableSchemaList'
            - $ref: '#/components/schemas/GableSchemaMap'
            - $ref: '#/components/schemas/GableSchemaEnum'
            - $ref: '#/components/schemas/GableSchemaUnion'
            - $ref: '#/components/schemas/GableSchemaAliasReference'
            - $ref: '#/components/schemas/GableSchemaUnknown'
          discriminator:
            propertyName: type
            mapping:
              struct:
                $ref: '#/components/schemas/GableSchemaStruct'
              'null':
                $ref: '#/components/schemas/GableSchemaNull'
              bool:
                $ref: '#/components/schemas/GableSchemaBool'
              int:
                $ref: '#/components/schemas/GableSchemaInt'
              float:
                $ref: '#/components/schemas/GableSchemaFloat'
              string:
                $ref: '#/components/schemas/GableSchemaString'
              bytes:
                $ref: '#/components/schemas/GableSchemaBytes'
              list:
                $ref: '#/components/schemas/GableSchemaList'
              map:
                $ref: '#/components/schemas/GableSchemaMap'
              enum:
                $ref: '#/components/schemas/GableSchemaEnum'
              union:
                $ref: '#/components/schemas/GableSchemaUnion'
              aliasReference:
                $ref: '#/components/schemas/GableSchemaAliasReference'
              unknown:
                $ref: '#/components/schemas/GableSchemaUnknown'
    GableSchemaTypeName:
      type: string
      enum:
        - 'null'
        - bool
        - int
        - float
        - string
        - bytes
        - list
        - map
        - struct
        - enum
        - union
    GableSchemaFieldStruct:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - struct
        name:
          type: string
        fields:
          type: array
          items:
            $ref: '#/components/schemas/GableSchemaField'
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
        optional:
          type: boolean
    GableSchemaFieldNull:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - 'null'
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
        name:
          type: string
        optional:
          type: boolean
    GableSchemaFieldBool:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - bool
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
        name:
          type: string
        optional:
          type: boolean
    GableSchemaFieldInt:
      type: object
      required:
        - type
        - bits
      properties:
        type:
          type: string
          enum:
            - int
        bits:
          type: integer
          minimum: 1
          maximum: 2147483647
        signed:
          type: boolean
          default: true
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          $ref: '#/components/schemas/LogicalEnumTemporal'
        unit:
          type: string
          enum:
            - year
            - month
            - day
            - hour
            - minute
            - second
            - millisecond
            - microsecond
            - nanosecond
            - picosecond
        timezone:
          type: string
        name:
          type: string
        optional:
          type: boolean
    GableSchemaFieldFloat:
      type: object
      required:
        - type
        - bits
      properties:
        type:
          type: string
          enum:
            - float
        bits:
          type: integer
          minimum: 1
          maximum: 2147483647
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
        name:
          type: string
        optional:
          type: boolean
    GableSchemaFieldString:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - string
        bytes:
          type: integer
          minimum: 1
          maximum: 9223372036854776000
        variable:
          type: boolean
          default: true
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          $ref: '#/components/schemas/LogicalEnumText'
        name:
          type: string
        optional:
          type: boolean
    GableSchemaFieldBytes:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - bytes
        bytes:
          type: integer
          minimum: 1
          maximum: 9223372036854776000
        variable:
          type: boolean
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          $ref: '#/components/schemas/LogicalEnumNumeric'
        precision:
          type: integer
          minimum: 1
          maximum: 2147483647
        scale:
          type: integer
          minimum: 0
          maximum: 2147483647
        unit:
          type: string
          enum:
            - year
            - month
            - day
            - hour
            - minute
            - second
            - millisecond
            - microsecond
            - nanosecond
            - picosecond
        name:
          type: string
        optional:
          type: boolean
      if:
        properties:
          variable:
            const: false
        required:
          - variable
      then:
        required:
          - bytes
    GableSchemaFieldList:
      type: object
      required:
        - type
        - values
      properties:
        type:
          type: string
          enum:
            - list
        values:
          $ref: '#/components/schemas/GableSchemaType'
        length:
          type: integer
          minimum: 1
          maximum: 9223372036854776000
        variable:
          type: boolean
          default: true
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        name:
          type: string
        optional:
          type: boolean
    GableSchemaFieldMap:
      type: object
      required:
        - type
        - keys
        - values
      properties:
        type:
          type: string
          enum:
            - map
        keys:
          $ref: '#/components/schemas/GableSchemaType'
        values:
          $ref: '#/components/schemas/GableSchemaType'
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
        name:
          type: string
        optional:
          type: boolean
    GableSchemaFieldEnum:
      type: object
      required:
        - type
        - symbols
      properties:
        type:
          type: string
          enum:
            - enum
        symbols:
          type: array
          items:
            type: string
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
        name:
          type: string
        optional:
          type: boolean
    GableSchemaFieldUnion:
      type: object
      required:
        - type
        - types
      properties:
        type:
          type: string
          enum:
            - union
        types:
          type: array
          items:
            $ref: '#/components/schemas/GableSchemaType'
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
        name:
          type: string
        optional:
          type: boolean
    GableSchemaFieldAliasReference:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          not:
            $ref: '#/components/schemas/GableSchemaTypeName'
        doc:
          type: string
        logical:
          type: string
        name:
          type: string
        optional:
          type: boolean
      additionalProperties: true
      not:
        required:
          - alias
    GableSchemaFieldUnknown:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - unknown
        alias:
          type: string
          pattern: ^[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+$
        doc:
          type: string
        logical:
          type: string
        name:
          type: string
        optional:
          type: boolean
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````