---
title: "Repair list"
method: PUT
path: "/lists/{list_id}/repair"
tags: ["lists"]
---

# Repair list

`PUT /lists/{list_id}/repair`

## Request

- The document declares no server URL.
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/vivino/apis/the-rankdb-api/docs/lists/:list_id/repair/put.ts> (a function with typed inputs; its response is checked against the schema)

Repairs the list, by recreating all segments and indexes.
All access to the list is blocked while operation runs.

Required security scopes:
  * `api:manage`

## Path parameters

- `list_id` string, required

## Query parameters

- `clear` boolean

## Response `200`

OK

- RankdbListopresult: Result of a list operation. Will contain either an error or a list. (default view)
  - `error` string: Error, if any encountered
  - `list` RankdbRanklist: Rank List (default view)
    - `id` string, required: The ID of the list to apply the operation on. Can be `a` to `z` (both upper/lower case), `0` to `9` or one of these characters `_-.`
    - `load_index` boolean, required: Load Index on server startup
    - `merge_size` integer, required: Merge adjacent Segments with less than this number of entries
    - `metadata` object, required: Custom metadata. String to String hash.
    - `set` string, required: Set used for storage
    - `split_size` integer, required: Split Segments larger than this number of entries

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `404`: Not Found

---

[API](https://skmtc.dev/vivino/apis/the-rankdb-api.md) - [All operations](https://skmtc.dev/vivino/apis/the-rankdb-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vivino/apis/the-rankdb-api/revisions/7a45b5309a11?raw)
