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

# Accept and persist classification

> Persist user-accepted classification results to DataHub.



## OpenAPI

````yaml post /api/metastore/classify/{catalog}/{schema}/{table}/accept
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/metastore/classify/{catalog}/{schema}/{table}/accept:
    post:
      tags:
        - Metastore
      summary: Accept and persist classification
      description: Persist user-accepted classification results to DataHub.
      operationId: >-
        accept_classification_api_metastore_classify__catalog___schema___table__accept_post
      parameters:
        - name: catalog
          in: path
          required: true
          schema:
            type: string
            description: Catalog name.
            title: Catalog
          description: Catalog name.
        - name: schema
          in: path
          required: true
          schema:
            type: string
            description: Schema name.
            title: Schema
          description: Schema name.
        - name: table
          in: path
          required: true
          schema:
            type: string
            description: Table name.
            title: Table
          description: Table name.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AcceptClassificationRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptClassificationResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    AcceptClassificationRequest:
      properties:
        table:
          $ref: '#/components/schemas/AcceptTableClassification'
        columns:
          items:
            $ref: '#/components/schemas/AcceptColumnClassification'
          type: array
          title: Columns
      type: object
      required:
        - table
      title: AcceptClassificationRequest
      description: Request body for accepting and persisting a classification result.
    AcceptClassificationResponse:
      properties:
        success:
          type: boolean
          title: Success
          default: true
        table_tags_applied:
          items:
            type: string
          type: array
          title: Table Tags Applied
        column_tags_applied:
          additionalProperties:
            items:
              type: string
            type: array
          type: object
          title: Column Tags Applied
        glossary_terms_linked:
          type: integer
          title: Glossary Terms Linked
          default: 0
        glossary_terms_created:
          type: integer
          title: Glossary Terms Created
          default: 0
        descriptions_updated:
          type: integer
          title: Descriptions Updated
          default: 0
      type: object
      title: AcceptClassificationResponse
      description: Response after persisting classification to DataHub.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AcceptTableClassification:
      properties:
        accepted_classifications:
          items:
            type: string
          type: array
          title: Accepted Classifications
        accepted_tags:
          items:
            type: string
          type: array
          title: Accepted Tags
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: >-
            User-edited description to persist to DataHub. Set to `null` to
            leave unchanged.
        accepted_glossary_terms:
          items:
            type: string
          type: array
          title: Accepted Glossary Terms
          description: URNs of existing glossary terms to link
        new_glossary_terms:
          items:
            $ref: '#/components/schemas/GlossaryTermSuggestion'
          type: array
          title: New Glossary Terms
          description: New glossary terms to create and link
      type: object
      title: AcceptTableClassification
      description: User-edited table classification to persist.
    AcceptColumnClassification:
      properties:
        column_name:
          type: string
          title: Column Name
        accepted_classifications:
          items:
            type: string
          type: array
          title: Accepted Classifications
        accepted_tags:
          items:
            type: string
          type: array
          title: Accepted Tags
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: >-
            User-edited description to persist to DataHub. Set to `null` to
            leave unchanged.
        accepted_glossary_terms:
          items:
            type: string
          type: array
          title: Accepted Glossary Terms
          description: URNs of existing glossary terms to link
        new_glossary_terms:
          items:
            $ref: '#/components/schemas/GlossaryTermSuggestion'
          type: array
          title: New Glossary Terms
          description: New glossary terms to create and link
      type: object
      required:
        - column_name
      title: AcceptColumnClassification
      description: User-edited column classification to persist.
    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
    GlossaryTermSuggestion:
      properties:
        term_name:
          type: string
          title: Term Name
          description: Name of the glossary term
        term_description:
          type: string
          title: Term Description
          description: Description of the term
          default: ''
        is_existing:
          type: boolean
          title: Is Existing
          description: True if this term already exists in DataHub
          default: false
        term_urn:
          anyOf:
            - type: string
            - type: 'null'
          title: Term Urn
          description: DataHub URN if the term already exists
      type: object
      required:
        - term_name
      title: GlossaryTermSuggestion
      description: A suggested glossary term for a table or column.
  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

````