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

# Update Index Metrics

`PUT /v1/rag/deployments/{deployment_id}/metrics`

Update the metrics for a given index

## Path parameters

- `deployment_id` string, uuid, required

## Request body

- union
  - UpdateMetricsRequestDeploymentMetricsOnline
    - `status` 'online', required
    - `document_count` integer, required
    - `index_metrics` UpdateMetricsRequestIndexMetrics[], required
      - `name` string, required
      - `document_count` integer, required
  - UpdateMetricsRequestDeploymentMetricsOffline
    - `status` 'offline', required
    - `clear_metrics` boolean

## Response `200`

Successful Response

- unknown

## Other responses

- `400` — Invalid request
- `403` — Unauthorized
- `404` — Index not found
- `422` — Attempted to update unknown index
- `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/61436a496404/schema)
