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

# Find a table by name



## OpenAPI

````yaml get /api/maintenance/tables/lookup
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/tables/lookup:
    get:
      tags:
        - Iceberg maintenance
      summary: Find a table by name
      operationId: lookup_table_api_maintenance_tables_lookup_get
      parameters:
        - name: catalog
          in: query
          required: true
          schema:
            type: string
            maxLength: 128
            minLength: 1
            title: Catalog
        - name: namespace
          in: query
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 512
            title: Namespace
        - name: table
          in: query
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 256
            title: Table
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TableDetailOut'
        '404':
          description: Not discovered yet.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    TableDetailOut:
      properties:
        table:
          $ref: '#/components/schemas/TableSummaryOut'
        table_uuid:
          type: string
          title: Table Uuid
        location:
          type: string
          title: Location
        first_seen:
          type: string
          title: First Seen
        last_seen:
          type: string
          title: Last Seen
        metrics:
          items:
            $ref: '#/components/schemas/MetricsOut'
          type: array
          title: Metrics
        operations:
          items:
            $ref: '#/components/schemas/OpStateOut'
          type: array
          title: Operations
        orphans:
          $ref: '#/components/schemas/OrphanStateOut'
        recent_tasks:
          items:
            $ref: '#/components/schemas/TaskOut'
          type: array
          title: Recent Tasks
        effective:
          $ref: '#/components/schemas/EffectivePolicyOut'
      type: object
      required:
        - table
        - table_uuid
        - location
        - first_seen
        - last_seen
        - metrics
        - operations
        - orphans
        - recent_tasks
        - effective
      title: TableDetailOut
      description: A table's maintenance health, state, history and effective policy.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TableSummaryOut:
      properties:
        registration_id:
          type: string
          format: uuid
          title: Registration Id
        catalog:
          type: string
          title: Catalog
        namespace:
          type: string
          title: Namespace
        table_name:
          type: string
          title: Table Name
        table:
          type: string
          title: Table
        role:
          type: string
          title: Role
        role_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Role Reason
        active:
          type: boolean
          title: Active
        health:
          anyOf:
            - type: integer
            - type: 'null'
          title: Health
        last_maintained_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Maintained At
        last_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Status
        snapshot_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Snapshot Id
        data_files:
          anyOf:
            - type: integer
            - type: 'null'
          title: Data Files
        total_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Bytes
        avg_file_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Avg File Bytes
      type: object
      required:
        - registration_id
        - catalog
        - namespace
        - table_name
        - table
        - role
        - active
      title: TableSummaryOut
      description: One table registration as maintenance sees it.
    MetricsOut:
      properties:
        captured_at:
          type: string
          title: Captured At
        snapshot_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Snapshot Id
        data_files:
          type: integer
          title: Data Files
        delete_files:
          type: integer
          title: Delete Files
        position_delete_files:
          anyOf:
            - type: integer
            - type: 'null'
          title: Position Delete Files
        total_bytes:
          type: integer
          title: Total Bytes
        total_records:
          type: integer
          title: Total Records
        position_deletes:
          type: integer
          title: Position Deletes
        equality_deletes:
          type: integer
          title: Equality Deletes
        avg_file_bytes:
          type: integer
          title: Avg File Bytes
        small_files:
          anyOf:
            - type: integer
            - type: 'null'
          title: Small Files
        max_small_files_in_partition:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Small Files In Partition
        manifests:
          type: integer
          title: Manifests
        manifest_bytes:
          type: integer
          title: Manifest Bytes
        snapshots:
          type: integer
          title: Snapshots
        oldest_snapshot_age_s:
          anyOf:
            - type: integer
            - type: 'null'
          title: Oldest Snapshot Age S
        expirable_snapshots:
          type: integer
          title: Expirable Snapshots
        health:
          type: integer
          title: Health
      type: object
      required:
        - captured_at
        - data_files
        - delete_files
        - total_bytes
        - total_records
        - position_deletes
        - equality_deletes
        - avg_file_bytes
        - manifests
        - manifest_bytes
        - snapshots
        - expirable_snapshots
        - health
      title: MetricsOut
      description: Metadata-only metrics captured at one time.
    OpStateOut:
      properties:
        operation:
          type: string
          title: Operation
        last_success_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Success At
        last_attempt_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Attempt At
        last_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Status
        consecutive_failures:
          type: integer
          title: Consecutive Failures
          default: 0
        consecutive_conflicts:
          type: integer
          title: Consecutive Conflicts
          default: 0
      type: object
      required:
        - operation
      title: OpStateOut
    OrphanStateOut:
      properties:
        dry_run_files:
          anyOf:
            - type: integer
            - type: 'null'
          title: Dry Run Files
        dry_run_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Dry Run Bytes
        live_approved:
          type: boolean
          title: Live Approved
          default: false
        review_required:
          type: boolean
          title: Review Required
          default: false
        blocked_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Blocked Reason
      type: object
      title: OrphanStateOut
    TaskOut:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        run_id:
          type: string
          format: uuid
          title: Run Id
        batch_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Batch Id
        registration_id:
          type: string
          format: uuid
          title: Registration Id
        catalog:
          type: string
          title: Catalog
        namespace:
          type: string
          title: Namespace
        table_name:
          type: string
          title: Table Name
        operation:
          type: string
          title: Operation
        policy_version:
          type: string
          title: Policy Version
        status:
          type: string
          title: Status
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        dry_run:
          type: boolean
          title: Dry Run
          default: false
        priority:
          type: string
          title: Priority
        score:
          type: number
          title: Score
        est_bytes:
          type: integer
          title: Est Bytes
        started_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Started At
        finished_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Finished At
        duration_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Ms
        before:
          additionalProperties: true
          type: object
          title: Before
        after:
          additionalProperties: true
          type: object
          title: After
        result:
          additionalProperties: true
          type: object
          title: Result
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        engine_app_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Engine App Id
        created_at:
          type: string
          title: Created At
      type: object
      required:
        - id
        - run_id
        - registration_id
        - catalog
        - namespace
        - table_name
        - operation
        - policy_version
        - status
        - priority
        - score
        - est_bytes
        - created_at
      title: TaskOut
      description: One operation on one table in one run.
    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.