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

# Dry-run count of what an import would do

> Enumerates provider metadata (no downloads) for the given folder/file selection and
diffs it against already-imported documents. An empty selection falls back to the
connection's stored selection. Enumeration is budgeted (item, request, and wall-clock
caps): when `truncated` is true, `to_create`/`to_update` are partial lower bounds and
`to_delete` is null (a partial enumeration cannot prove a file was removed).




## OpenAPI

````yaml /api-reference/openapi-full.yaml post /projects/{project_id}/connections/{connection_id}/import-preview/
openapi: 3.0.3
info:
  title: Clarifeye Platform API — Full API Documentation
  description: >
    Complete REST API reference for the Clarifeye Platform.


    Documents every endpoint exposed by the platform — the public surface plus

    the advanced surface: pipeline customization (extraction flows, pipeline

    runs, warehouse tables, document tag/metadata configuration), the pre-MCP

    AI surface (agent settings, playground conversations, conversation-scoped

    feedback views, notifications), and the impersonation header. New AI

    integrations should consume knowledge via MCP rather than the

    conversation/agent-settings endpoints documented here.


    ## Authentication

    All endpoints require authentication. Include the Authorization header in
    every request using either format:

    - `Authorization: Token <token_key>`

    - `Authorization: Bearer <token_key>`


    ## Organization API Key Authentication

    The user-provisioning endpoints authenticate with an **org-scoped API key**
    instead of a user token:

    - `Authorization: Api-Key <key>`


    The key is minted internally by Clarifeye (not self-service) and is scoped
    to a single

    organization — it can only act on the organization whose UUID matches the
    `{id}` in the

    request path. The email domains a key may pre-create accounts for are
    configured by

    Clarifeye on the organization (`allowed_provisioning_domains`). Once you
    have a key and

    your domains are set, call `POST /organizations/{id}/provision-user/` to
    pre-create users

    and `POST /organizations/{id}/deprovision-user/` to remove them.


    ## Impersonation


    Certain endpoints support user impersonation for creating or listing data on
    behalf of other users.

    This is useful for integrating external systems that need to attribute
    actions to specific users.


    **Header:** `X-Impersonate-Email`


    **Required Permission:** `CAN_IMPERSONATE_OTHER_USERS` (contact Clarifeye to
    enable this permission)


    **Behavior:**

    - If the header is provided and the impersonator has the required
    permission, the action is performed as the target user

    - If the target user is not found, the request proceeds as the original
    authenticated user

    - If the target user does not have access to the project, the request
    proceeds as the original authenticated user

    - If the impersonator lacks the `CAN_IMPERSONATE_OTHER_USERS` permission,
    the header is ignored
  version: 1.0.0
  contact:
    name: Clarifeye Support
servers:
  - url: https://eu.app.clarifeye.ai/api/v1
    description: EU
  - url: https://us.app.clarifeye.ai/api/v1
    description: US
security:
  - BearerAuth: []
  - TokenAuth: []
tags:
  - name: Users
    description: Manage users within a project
  - name: Invitations
    description: Manage project invitations
  - name: Documents
    description: Manage documents within a project
  - name: Agent Settings
    description: Manage AI agent configurations
  - name: Conversations
    description: Create and interact with AI-powered conversations
  - name: Interviews
    description: Assign and review structured interview conversations
  - name: Feedback
    description: >-
      Submit and review feedback — standalone (content-only), agent-submitted
      (MCP), or linked to a conversation message
  - name: Tools
    description: Execute configured AI tools with custom parameters
  - name: Tables
    description: Perform CRUD operations on warehouse tables
  - name: Notifications
    description: Manage project-scoped notifications for users
  - name: Extraction Flows
    description: >-
      Manage extraction flows (auto-sync DAGs) — list, run, inspect statistics,
      update, and publish
  - name: Object Extractors
    description: |
      Extract structured data (instances of a Pydantic model) from chunks or
      blocks of documents. Update auto-creates a new `ObjectExtractorVersion`
      when version-bearing fields change.
  - name: Tag Extractors
    description: |
      Apply hierarchical metadata tags to chunks or documents using an LLM.
      Update auto-creates a new `TagExtractorVersion` when version-bearing
      fields change.
  - name: Chunks Extractors
    description: |
      Segment parsed documents into chunks for downstream processing.
      Update auto-creates a new `ChunksExtractorVersion` when version-bearing
      fields change.
  - name: Parsing Extractors
    description: |
      Convert source documents to text blocks via the parsing pipeline.
      Update auto-creates a new `ParsingExtractorVersion` when version-bearing
      fields change.
  - name: Document Filter Extractors
    description: |
      Restrict a downstream pipeline branch to documents matching a filter.
      Update auto-creates a new version when the filter changes.
  - name: Chunk Tag Filter Extractors
    description: |
      Restrict a downstream pipeline branch to chunks carrying specific tags.
      Update auto-creates a new version when the filter changes.
  - name: Document Tag Extractors
    description: |
      Apply a flat set of metadata tags to each document. Update auto-creates
      a new version when version-bearing fields change.
  - name: Tag Alerts Extractors
    description: |
      Run LLM-based alerts over already-extracted tag rows. Update auto-creates
      a new version when version-bearing fields change.
  - name: Object Alerts Extractors
    description: >
      Run LLM-based alerts over already-extracted object rows. Update
      auto-creates

      a new version when version-bearing fields change.
  - name: Imported Object Extractors
    description: |
      Hold objects imported from an external system (rather than extracted by
      an LLM). Useful for hydrating the warehouse with data produced outside
      the platform.
  - name: Pipeline Runs
    description: >-
      Inspect pipeline runs queued by extraction flows or other pipeline
      triggers — list runs and fetch the details/status of a single run
  - name: User Provisioning
    description: >
      Pre-create and de-provision org users via an org-scoped API key

      (`Authorization: Api-Key <key>`). The organization is resolved from the
      key.
  - name: Organization API Keys
    description: >
      Superuser management of org-scoped provisioning API keys. Minting and
      revoking

      are superuser-only; org admins can list/retrieve/reveal their own org's
      keys.
  - name: Design System Templates
    description: Reference/example files attached to a design template.
paths:
  /projects/{project_id}/connections/{connection_id}/import-preview/:
    parameters:
      - $ref: '#/components/parameters/ProjectId'
      - name: connection_id
        in: path
        required: true
        description: UUID of the connection
        schema:
          type: string
          format: uuid
    post:
      tags:
        - Connectors
      summary: Dry-run count of what an import would do
      description: >
        Enumerates provider metadata (no downloads) for the given folder/file
        selection and

        diffs it against already-imported documents. An empty selection falls
        back to the

        connection's stored selection. Enumeration is budgeted (item, request,
        and wall-clock

        caps): when `truncated` is true, `to_create`/`to_update` are partial
        lower bounds and

        `to_delete` is null (a partial enumeration cannot prove a file was
        removed).
      operationId: previewConnectionImport
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                folders:
                  type: array
                  items:
                    $ref: '#/components/schemas/ConnectionSelectionItem'
                files:
                  type: array
                  items:
                    $ref: '#/components/schemas/ConnectionSelectionItem'
      responses:
        '200':
          description: Dry-run diff
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportPreview'
        '403':
          description: >-
            Site not allowed by the organization's allowlist, or not a project
            member
        '501':
          description: >-
            The connection's provider does not support import preview (only
            SharePoint does)
        '502':
          description: Provider/Nango error during enumeration
components:
  parameters:
    ProjectId:
      name: project_id
      in: path
      required: true
      description: UUID of the project
      schema:
        type: string
        format: uuid
  schemas:
    ConnectionSelectionItem:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: Provider item id (Graph drive-item id / Drive file id)
        name:
          type: string
        drive_id:
          type: string
          nullable: true
          description: SharePoint document library the item lives in (null = site default)
    ImportPreview:
      type: object
      description: Dry-run diff of what starting an import would do with a selection.
      properties:
        to_create:
          type: integer
        to_update:
          type: integer
        to_delete:
          type: integer
          nullable: true
          description: Null when truncated — a partial enumeration cannot prove deletions.
        total_remote:
          type: integer
          description: Distinct files enumerated under the selection (post-dedupe)
        truncated:
          type: boolean
          description: True when an enumeration budget (items/requests/time) was hit
        cap:
          type: integer
          description: The item cap in force (for "N+" display)
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'Use Authorization: Bearer <token>'
    TokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Use Authorization: Token <token>'

````