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

# Discover schema

> Start async schema discovery on a connector

Starts async discovery of the source's schemas and tables. Returns an operation handle — poll it like any other [operation](/api/operations). If discovery is already running, the call joins it instead of starting another.


## OpenAPI

````yaml openapi.public.json POST /v1/connectors/{connector_id}/discover
openapi: 3.1.0
info:
  description: >-
    Public Ardent API. Generated by scripts/export_public_openapi.py — do not
    edit by hand.
  title: Ardent API
  version: v1
servers:
  - url: https://api.tryardent.com
security: []
paths:
  /v1/connectors/{connector_id}/discover:
    post:
      tags:
        - v1-connectors
      summary: Discover Connector Endpoint
      operationId: discover_connector_endpoint_v1_connectors__connector_id__discover_post
      parameters:
        - in: path
          name: connector_id
          required: true
          schema:
            title: Connector Id
            type: string
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscoverAccepted'
          description: >-
            Discovery started (or joined, if one is already running). Poll the
            operation.
        '400':
          description: The connector isn't in a state that can be discovered.
        '404':
          description: Connector not found (or not visible to the caller).
        '422':
          description: Discovery prerequisites failed.
        '503':
          description: Ardent could not start the work — safe to retry.
      security:
        - bearerAuth: []
components:
  schemas:
    DiscoverAccepted:
      properties:
        operation_id:
          description: Operation to poll at `GET /v1/operations/{operation_id}`.
          title: Operation Id
          type: string
        prerequisites:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: Pre-discovery prerequisite check results.
          title: Prerequisites
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            ID of the resource being created or acted on (the branch ID for
            branch create).
          title: Resource Id
        source_metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: Metadata gathered from the source.
          title: Source Metadata
        status:
          $ref: '#/components/schemas/OperationStatus'
          description: Status at acceptance time.
        type:
          $ref: '#/components/schemas/OperationType'
          description: The kind of work this operation tracks, for example `branch_create`.
      required:
        - operation_id
        - status
        - type
        - resource_id
      title: DiscoverAccepted
      type: object
    OperationStatus:
      enum:
        - pending
        - running
        - completed
        - failed
      title: OperationStatus
      type: string
    OperationType:
      enum:
        - connector_engine_setup
        - connector_reset
        - connector_deep_reset
        - connector_discovery
        - connector_delete
        - connector_secret_purge
        - connector_rollout
        - connector_replication_rollback
        - connector_debezium_cutover
        - connector_debezium_shadow_cleanup
        - environment_deploy
        - environment_destroy
        - branch_create
        - branch_delete
      title: OperationType
      type: string
  securitySchemes:
    bearerAuth:
      description: >-
        Ardent API key (sk-ard_live_… / sk-ard_test_…) or a dashboard session
        token.
      scheme: bearer
      type: http

````