---
title: "List Metadata Indexes"
method: GET
path: "/v1/settings/metadata-indexes"
tags: ["Metadata Indexes API"]
---

# List Metadata Indexes

`GET /v1/settings/metadata-indexes`

Use this endpoint to retrieve all metadata indexes. You can optionally filter the results by entity name.

## Query parameters

- `entity_name` string

## Headers

- `Content-Type` string
- `X-Request-Id` string, uuid
- `Authorization` string

## Response `200`

Indicates that the request was successful and the response contains the expected data.

- MetadataIndexWithStatsResponse[]
  - `indexName` string, required — The name of the index in the database.
  - `entityName` string, required — The name of the entity associated with the index.
  - `metadataKey` string, required — The metadata key used in the index.
  - `unique` boolean, required — Indicates whether the index enforces uniqueness.
  - `sparse` boolean, required — Indicates whether the index is sparse (ignores documents without the indexed field).
  - `stats` object — Index usage statistics.
    - `accesses` integer, required — The number of times the index has been accessed.
    - `statsSince` string, date-time — The date and time since when statistics are being collected.

## Other responses

- `400`
- `401` — Unauthorized
- `403` — Forbidden
- `500` — Internal Server Error

---

[API](https://skmtc.net/lerian/apis/identity-plugin.md) · [All operations](https://skmtc.net/lerian/apis/identity-plugin/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lerian/identity-plugin/versions/25daba385532/schema)
