---
title: "Start a connection extraction"
method: POST
path: "/v1/discovery/connections/{connectionId}/extractions"
tags: ["Discovery"]
---

# Start a connection extraction

`POST /v1/discovery/connections/{connectionId}/extractions`

## Request

- Base URL: `https://identity.sandbox.lerian.net`
- URL: `https://identity.sandbox.lerian.net/v1/discovery/connections/{connectionId}/extractions`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/lerian/apis/identity-plugin/docs/v1/discovery/connections/:connectionId/extractions/post.ts> (a function with typed inputs; its response is checked against the schema)

Use this endpoint to create an extraction request for a discovered connection and submit it to Fetcher for the authenticated tenant.

## Path parameters

- `connectionId` string, required

## Headers

- `X-Request-Id` string

## Request body

- StartExtractionRequest: Request payload for starting a data extraction from a discovered connection
  - `tables` object, required: Tables to extract data from, keyed by table name
  - `startDate` string: Start of the date range to extract (RFC 3339)
  - `endDate` string: End of the date range to extract (RFC 3339)
  - `filters` ExtractionFilters: Optional row-level filters for an extraction
    - `equals` object: Key-value pairs where all specified fields must equal the given values

## Response `201`

Extraction request created

- ExtractionRequestResponse: An extraction request submitted to Fetcher
  - `id` string: Internal identifier for the extraction request
  - `connectionId` string: Connection this extraction was submitted to
  - `status` string: Current lifecycle status of the extraction
  - `ingestionJobId` string: Job identifier returned by Fetcher
  - `startDate` string: Start of the extracted date range
  - `endDate` string: End of the extracted date range
  - `tables` object: Per-table extraction status
  - `filters` ExtractionFilters: Optional row-level filters for an extraction
    - `equals` object: Key-value pairs where all specified fields must equal the given values
  - `errorMessage` string: Error details if the extraction failed
  - `createdAt` string: Timestamp when the extraction was requested
  - `updatedAt` string: Timestamp of the last status update
  - `bridgeAttempts` integer: Number of times the Matcher bridge pipeline has attempted to retrieve and ingest this extraction
  - `bridgeLastError` string: Error class of the last bridge pipeline failure
  - `bridgeLastErrorMessage` string: Appended-history error message from the bridge pipeline; primary failure stays at the head
  - `bridgeFailedAt` string, date-time, nullable: Timestamp of the first terminal bridge failure; omitted when no failure has occurred
  - `custodyDeletedAt` string, date-time, nullable: Timestamp when the custody object was deleted; omitted when still held

## Other responses

- `400`: Invalid request
- `401`: The request lacks valid authentication credentials.
- `403`: You do not have permission to access this resource.
- `404`: Connection not found
- `500`: An unexpected error occurred on the server.
- `503`: Fetcher service is unavailable

---

[API](https://skmtc.dev/lerian/apis/identity-plugin.md) - [All operations](https://skmtc.dev/lerian/apis/identity-plugin/llms.txt) - [OpenAPI document](https://skmtc.dev/lerian/apis/identity-plugin/revisions/25daba385532?raw)
