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

# Check a policy and preview its effective values without saving



## OpenAPI

````yaml post /api/maintenance/policies/validate
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/maintenance/policies/validate:
    post:
      tags:
        - Iceberg maintenance
      summary: Check a policy and preview its effective values without saving
      operationId: validate_policy_api_maintenance_policies_validate_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PolicySaveIn'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyValidationOut'
        '400':
          description: Invalid scope.
        '403':
          description: Not allowed.
        '404':
          description: No such catalog or policy.
        '409':
          description: The policy or catalog changed, or can't change this way.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    PolicySaveIn:
      properties:
        catalog:
          type: string
          maxLength: 128
          minLength: 1
          title: Catalog
        namespace:
          type: string
          maxLength: 512
          title: Namespace
          default: ''
        table:
          type: string
          maxLength: 256
          title: Table
          default: ''
        yaml:
          anyOf:
            - type: string
              maxLength: 100000
            - type: 'null'
          title: Yaml
        spec:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Spec
        expected_version:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Expected Version
          description: The version being edited; omit to create the scope's first policy.
      type: object
      required:
        - catalog
      title: PolicySaveIn
      description: 'A policy for one scope, as JSON (`spec`: the portal, agents) or YAML.'
    PolicyValidationOut:
      properties:
        valid:
          type: boolean
          title: Valid
        issues:
          items:
            $ref: '#/components/schemas/PolicyIssueOut'
          type: array
          title: Issues
        warnings:
          items:
            type: string
          type: array
          title: Warnings
        effective:
          anyOf:
            - $ref: '#/components/schemas/EffectivePolicyOut'
            - type: 'null'
      type: object
      required:
        - valid
      title: PolicyValidationOut
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PolicyIssueOut:
      properties:
        path:
          type: string
          title: Path
        message:
          type: string
          title: Message
      type: object
      required:
        - path
        - message
      title: PolicyIssueOut
    EffectivePolicyOut:
      properties:
        scope:
          $ref: '#/components/schemas/ScopeOut'
        values:
          items:
            $ref: '#/components/schemas/EffectiveValueOut'
          type: array
          title: Values
        document:
          additionalProperties: true
          type: object
          title: Document
        warnings:
          items:
            type: string
          type: array
          title: Warnings
        version_tag:
          type: string
          title: Version Tag
        timezone:
          type: string
          title: Timezone
          default: UTC
      type: object
      required:
        - scope
        - values
        - document
        - warnings
        - version_tag
      title: EffectivePolicyOut
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ScopeOut:
      properties:
        scope_type:
          type: string
          enum:
            - catalog
            - schema
            - table
          title: Scope Type
        catalog:
          type: string
          title: Catalog
        namespace:
          type: string
          title: Namespace
          default: ''
        table:
          type: string
          title: Table
          default: ''
      type: object
      required:
        - scope_type
        - catalog
      title: ScopeOut
    EffectiveValueOut:
      properties:
        path:
          type: string
          title: Path
        value:
          title: Value
        source:
          type: string
          title: Source
          description: The scope the value comes from, e.g. 'schema nx1_irc.finance'.
      type: object
      required:
        - path
        - value
        - source
      title: EffectiveValueOut
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.