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

# Backfill pipeline tables

> Triggers a backfill for specified tables in the pipeline. Supports options for pre-backfill behavior (drop, truncate, or do nothing) and schema/database filtering.

`POST /pipelines/{uuid}/backfill`

## Authorization

* `Authorization` (header): API key passed as a Bearer token in the Authorization header.

## Path parameters

* `uuid` (string, required)

## Body (application/json)

* `backfillBatchSize` (integer | null, range `x ≥ 0`): Optional rows per batch. Saved as the pipeline's backfill batch size before the backfill starts, so later backfills use it too.
* `backfillDefaults` (object): Optional backfill speed. Saved as the pipeline's backfill speed before the backfill starts, so later backfills use it too.
  * `chunkSize` (integer, range `100000 ≤ x ≤ 100000000`)
  * `pagination` (string) One of: `client`, `server`.
  * `parallelism` (integer, range `1 ≤ x ≤ 50`)
  * `preset` (string) One of: `normal`, `performance`.
  * `readMode` (string) One of: `primaryKey`, `range`, `ctid`.
* `backfillFromDatabases` (string[] | null): Optional source databases to backfill for regular-table backfills. Requires beforeBackfill to be the empty-string do-nothing option.
* `backfillFromSchemas` (string[] | null): Optional source schemas to backfill for regular-table backfills. Requires beforeBackfill to be the empty-string do-nothing option.
* `beforeBackfill` (string, required): Destination handling before the backfill: empty string leaves existing data unchanged, truncate_table truncates the destination table, and drop_table drops it. One of: ``, `truncate_table`, `drop_table`, `swap_table`.
* `historyMode` (boolean): When true, backfill the selected history tables instead of the regular tables.
* `keepOldTable` (boolean): Only for swap_table: keep the destination table's old rows in a separate table after the swap, until the next swap_table backfill of this table.
* `tableUUIDs` (string<uuid>[], required): UUIDs of the regular or history tables to backfill.

## Example request

```bash
curl --request POST \
  --url https://api.artie.com/pipelines/{uuid}/backfill \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "backfillBatchSize": 0,
  "backfillDefaults": {
    "chunkSize": 100000,
    "pagination": "client",
    "parallelism": 1,
    "preset": "normal",
    "readMode": "primaryKey"
  },
  "backfillFromDatabases": [
    "<string>"
  ],
  "backfillFromSchemas": [
    "<string>"
  ],
  "beforeBackfill": "",
  "historyMode": true,
  "keepOldTable": true,
  "tableUUIDs": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ]
}'
```

## Responses

### 204 No Content

### 400 Bad Request

### 403 Forbidden

### 500 Internal Server Error