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

# Create a data extraction job

> Creates and queues a data extraction job, or returns the existing job for an idempotent duplicate request.



## OpenAPI

````yaml en/openapi/v3-current/connections.yaml post /v1/fetcher
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian
    url: https://github.com/LerianStudio/fetcher/discussions
  description: API documentation for the Fetcher Manager component
  license:
    identifier: Elastic-2.0
    name: Elastic License 2.0 (Source Available)
  title: Fetcher Manager API
  version: 1.0.0
servers: []
security:
  - BearerAuth: []
tags:
  - description: Database connection lifecycle and schema operations.
    name: Connections
  - description: Legacy connection assignment and migration operations.
    name: Migration
  - description: Data extraction job creation and status operations.
    name: Fetcher
paths:
  /v1/fetcher:
    post:
      tags:
        - Fetcher
      summary: Create a data extraction job
      description: >-
        Creates and queues a data extraction job, or returns the existing job
        for an idempotent duplicate request.
      operationId: create-fetcher-job
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FetcherRequest'
        description: Fetcher request payload.
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FetcherResponse'
          description: Duplicate request; the existing job is returned.
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FetcherResponse'
          description: Accepted
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Bad Request
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unauthorized
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Forbidden
        '409':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Conflict
        '413':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Request Entity Too Large
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Internal Server Error
components:
  schemas:
    FetcherRequest:
      additionalProperties: false
      properties:
        dataRequest:
          $ref: '#/components/schemas/DataRequest'
          description: Fields and filters to extract from configured data sources.
          examples:
            - mappedFields:
                ledger:
                  transactions:
                    - id
                    - amount
        metadata:
          additionalProperties: {}
          description: >-
            Caller-defined metadata stored with the job; source identifies the
            owning product.
          examples:
            - correlationId: settlement-2026-07-13
              source: payments
          properties:
            source:
              description: >-
                Owning product used for notification routing and connection
                ownership validation.
              examples:
                - payments
              type: string
          required:
            - source
          type: object
      required:
        - dataRequest
        - metadata
      type: object
    FetcherResponse:
      additionalProperties: false
      properties:
        createdAt:
          description: UTC timestamp when the job was created.
          examples:
            - '2026-07-13T12:00:00Z'
          format: date-time
          type: string
        jobId:
          description: Unique identifier of the extraction job.
          examples:
            - 01980a89-21f0-7d7e-a109-564b5c6f53ac
          type: string
        message:
          description: Outcome of the create request.
          examples:
            - Job created and queued for processing
          type: string
        status:
          description: Current processing status of the job.
          examples:
            - pending
          type: string
      required:
        - jobId
        - status
        - createdAt
        - message
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          examples:
            - ERR-0001
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    DataRequest:
      additionalProperties: false
      properties:
        filters:
          additionalProperties:
            additionalProperties:
              additionalProperties:
                $ref: '#/components/schemas/FilterCondition'
              type: object
            type: object
          description: Optional filter conditions grouped by data source, table, and field.
          examples:
            - ledger:
                transactions:
                  status:
                    eq:
                      - approved
          type: object
        mappedFields:
          additionalProperties:
            additionalProperties:
              items:
                type: string
              type:
                - array
                - 'null'
            type: object
          description: Fields to extract, grouped by data source and table.
          examples:
            - ledger:
                transactions:
                  - id
                  - amount
          type: object
      required:
        - mappedFields
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    FilterCondition:
      additionalProperties: false
      properties:
        between:
          description: Inclusive lower and upper bounds for the field.
          examples:
            - - 100
              - 1000
          items: {}
          type:
            - array
            - 'null'
        eq:
          description: Values that the field may equal.
          examples:
            - - active
              - pending
          items: {}
          type:
            - array
            - 'null'
        gt:
          description: Single value that the field must be greater than.
          examples:
            - - 100
          items: {}
          type:
            - array
            - 'null'
        gte:
          description: Single value that the field must be greater than or equal to.
          examples:
            - - '2025-06-01'
          items: {}
          type:
            - array
            - 'null'
        in:
          description: Values that the field may match.
          examples:
            - - active
              - pending
              - suspended
          items: {}
          type:
            - array
            - 'null'
        like:
          description: Single LIKE pattern that the field must match.
          examples:
            - - '%active%'
          items: {}
          type:
            - array
            - 'null'
        lt:
          description: Single value that the field must be less than.
          examples:
            - - 1000
          items: {}
          type:
            - array
            - 'null'
        lte:
          description: Single value that the field must be less than or equal to.
          examples:
            - - '2025-06-30'
          items: {}
          type:
            - array
            - 'null'
        ne:
          description: Single value that the field must not equal.
          examples:
            - - active
          items: {}
          type:
            - array
            - 'null'
        nin:
          description: Values that the field must not match.
          examples:
            - - deleted
              - archived
          items: {}
          type:
            - array
            - 'null'
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````