---
title: "Set the configuration for a Task Queue."
method: POST
path: "/management/v1/warehouse/{warehouse_id}/task-queue/expire_snapshots/config"
tags: ["tasks"]
---

# Set the configuration for a Task Queue.

`POST /management/v1/warehouse/{warehouse_id}/task-queue/expire_snapshots/config`

## Request

- Base URL: `https://localhost`
- URL: `https://localhost/management/v1/warehouse/{warehouse_id}/task-queue/expire_snapshots/config`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/lakekeeper/apis/lakekeeper-management-api/docs/management/v1/warehouse/:warehouse_id/task-queue/expire_snapshots/config/post.ts> (a function with typed inputs; its response is checked against the schema)

These configurations are global per warehouse and shared across all instances of this kind of task.

## Path parameters

- `warehouse_id` string, uuid, required

## Request body

- SetExpireSnapshotsQueueConfig
  - `max-seconds-since-last-heartbeat` integer, nullable
  - `queue-config` ExpireSnapshotsQueueConfig, required: Warehouse-specific configuration for the expiration queue. Parameters can be overridden with table properties. Please see the documentation of each parameter for details.
    - `enable-expire-snapshots` boolean, nullable: Enable or disable automatic expiration of snapshots for all tables in this warehouse. Can be overridden on a per-table level with the table property `lakekeeper.history.expire.enabled`. Tables with the `gc.enabled` flag set to false, are also excluded from automatic expiration.
    - `max-ref-age-ms` integer, nullable: For snapshot references except the main branch, default max age of snapshot references to keep while expiring snapshots. The main branch never expires. If not set, defaults to `i64::MAX` (no expiration).
    - `max-snapshot-age-ms` integer, nullable: Default maximum age of a snapshot in milliseconds before it is considered expired. If not set, defaults to `432000000` (5 days). Can be overridden on a per-table level with the table property `history.expire.max-snapshot-age-ms`.
    - `min-snapshots-to-expire` integer, nullable: Minimum number of snapshots that must be eligible for expiration before the job runs. This prevents expensive expiration jobs from running when there are only a few snapshots to expire. If not set, defaults to `20`. Can be overridden on a per-table level with the table property `lakekeeper.history.expire.min-snapshots-to-expire`.
    - `min-snapshots-to-keep` integer, nullable: Default min number of snapshots to keep on the table and all of its branches while expiring snapshots. If not set, defaults to `1`. Can be overridden on a per-table level with the table property `history.expire.min-snapshots-to-keep`.

## Response `204`

Task queue config set successfully

## Other responses

- `4XX`

---

[API](https://skmtc.dev/lakekeeper/apis/lakekeeper-management-api.md) - [All operations](https://skmtc.dev/lakekeeper/apis/lakekeeper-management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lakekeeper/apis/lakekeeper-management-api/revisions/c5cb9a12a98c?raw)
