---
title: "Get DuckLake maintenance status for a team"
method: GET
path: "/v4/admin/teams/{team_id}/maintenance"
tags: ["v4", "Admin"]
---

# Get DuckLake maintenance status for a team

`GET /v4/admin/teams/{team_id}/maintenance`

## Path parameters

- `team_id` union, required
  - string, uuid
  - string

## Response `200`

Success

- SuccessResponseDuckLakeMaintenanceStatusResponse
  - `success` true, required — Flag for it request was successful
  - `data` DuckLakeMaintenanceStatusResponse, required
    - `integrationId` union — DuckLake integration whose maintenance status this is
      - string, uuid
      - string
    - `jobId` string, nullable — K8s batch job name of the active/latest job
    - `maintenanceId` string, nullable — Maintenance run ID in __definite.maintenance
    - `jobStatus` 'pending' | 'running' | 'succeeded' | 'failed' | 'unknown' — Status of an async DuckDB K8s job.
    - `steps` DuckLakeMaintenanceStep[] — Per-step progress, ordered by execution sequence
      - `step` 'flush_inlined_data' | 'thin_snapshots' | 'expire_snapshots' | 'merge_adjacent_files' | 'rewrite_data_files' | 'cleanup_old_files' | 'delete_orphaned_files' | 'vacuum_catalog', required
      - `status` 'pending' | 'running' | 'completed' | 'failed' | 'skipped', required
      - `startedAt` string, date-time, nullable — When the step started running
      - `completedAt` string, date-time, nullable — When the step completed successfully
    - `lastCompletedAt` string, date-time, nullable — Timestamp of the last successful maintenance completion
    - `error` string, nullable — Last error message if the job failed (tail of pod logs)
    - `deleteThreshold` number, nullable — Delete ratio threshold used for ducklake_rewrite_data_files
    - `expireSnapshotsOlderThan` string, nullable — Interval used for ducklake_expire_snapshots older_than parameter
    - `cleanupAll` boolean, nullable — Whether cleanup steps used cleanup_all => true
    - `thinKeepLast` integer, nullable — Number of most recent snapshots kept during thinning
    - `thinKeepDailyForDays` integer, nullable — Number of days for which 1 snapshot/day was kept during thinning
  - `meta` ResponseMeta
    - `requestId` string — Unique request identifier for tracing
    - `timestamp` string, date-time — Response timestamp (UTC)
    - `durationMs` integer, nullable — Request processing time in milliseconds

## Other responses

- `401` — Auth Invalid Token
- `403` — Forbidden Insufficient Permissions
- `404` — Resource Not Found
- `422` — Validation Failed
- `426` — Business Quota Exceeded
- `500` — Internal Error

---

[API](https://skmtc.dev/definite/apis/defapi.md) · [All operations](https://skmtc.dev/definite/apis/defapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/definite/defapi/revisions/3943d8deb3be/schema)
