---
title: "Update Index Metrics"
method: PUT
path: "/v1/rag/indexes/index/{index_id}/metrics"
tags: ["beta.rag.search_indexes"]
---

# Update Index Metrics

`PUT /v1/rag/indexes/index/{index_id}/metrics`

Update the metrics for a given index

## Path parameters

- `index_id` string, uuid, required

## Request body

- union
  - UpdateIndexMetricsRequestIndexMetricsOnline
    - `status` 'online', required
    - `document_count` integer, required
    - `schema_metrics` UpdateIndexMetricsRequestSchemaMetrics[], required
      - `name` string, required
      - `document_count` integer, required
  - UpdateIndexMetricsRequestIndexMetricsOffline
    - `status` 'offline', required
    - `clear_metrics` boolean

## Response `200`

Successful Response

- unknown

## Other responses

- `400` — Invalid request
- `403` — Unauthorized
- `404` — Index not found
- `422` — Unknown schema update
- `500` — Internal server error

---

[API](https://skmtc.net/mistral/apis/mistral-ai-api.md) · [All operations](https://skmtc.net/mistral/apis/mistral-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mistral/mistral-ai-api/revisions/933c4ebdcd72/schema)
