---
title: "List indexes"
---

> Documentation Index
> Fetch the complete documentation index at: https://sandrinodm.github.io/logbrook/llms.txt
> Use this file to discover all available pages before exploring further.

# List indexes

Path: Logbrook API › Indexes

`GET /indexes`

Lists the indexes the token can read. An admin token sees every index. Source-scoped read tokens get names only; other callers also get file sizes and retention policy.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Code samples

### cURL

```bash
curl --request GET \
  --url '<base-url>/indexes' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = '<base-url>/indexes';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/indexes"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Authorized indices

#### Example

```json
{
  "indexes": [
    {
      "name": "default",
      "size_bytes": 14799,
      "database_bytes": 12288,
      "wal_bytes": 2511,
      "archive_bytes": 0,
      "temp_bytes": 0,
      "other_bytes": 0,
      "max_size_bytes": null,
      "retention_ms": 604800000,
      "ready": true
    },
    {
      "name": "payments",
      "size_bytes": 16217,
      "database_bytes": 12288,
      "wal_bytes": 3929,
      "archive_bytes": 0,
      "temp_bytes": 0,
      "other_bytes": 0,
      "max_size_bytes": null,
      "retention_ms": 604800000,
      "ready": true
    }
  ]
}
```

- `indexes` (`listIndexes.response.200.indexes`; array<object>, required)
  - `name` (`listIndexes.response.200.indexes.name`; string, required)
  - `size_bytes` (`listIndexes.response.200.indexes.size_bytes`; integer, optional)
    - format `int64`; min 0
  - `database_bytes` (`listIndexes.response.200.indexes.database_bytes`; integer, optional)
    - format `int64`; min 0
  - `wal_bytes` (`listIndexes.response.200.indexes.wal_bytes`; integer, optional)
    - format `int64`; min 0
  - `archive_bytes` (`listIndexes.response.200.indexes.archive_bytes`; integer, optional)
    - format `int64`; min 0
  - `temp_bytes` (`listIndexes.response.200.indexes.temp_bytes`; integer, optional)
    - format `int64`; min 0
  - `other_bytes` (`listIndexes.response.200.indexes.other_bytes`; integer, optional)
    - format `int64`; min 0
  - `max_size_bytes` (`listIndexes.response.200.indexes.max_size_bytes`; integer | null, optional)
    - format `int64`; min 1
  - `retention_ms` (`listIndexes.response.200.indexes.retention_ms`; integer, optional)
    - format `int64`; min 1
  - `ready` (`listIndexes.response.200.indexes.ready`; boolean, optional)

### 401

Read or admin token required

### 429

Diagnostics capacity exhausted

### 503

Filesystem inspection unavailable


Source: https://sandrinodm.github.io/logbrook/api/indexes/list/index.md
