---
title: "🛡️ Control the current indexing run."
method: PATCH
path: "/api/v1/index/state"
tags: ["Indexing"]
---

# 🛡️ Control the current indexing run.

`PATCH /api/v1/index/state`

Returns a snapshot of the indexing state at 
this current moment. Use this endpoint for one-time checks. 
For real-time updates, use the `/events/subscribe` endpoint 
instead.
<!-- Leave this line empty -->
<br /><hr /><h3>🛡️ Requires Capabilities: <code>Indexing.Operate</code></h3>

## Request body

- StateChangeActionDto
  - `action` object, required

## Response `200`

## Other responses

- `401` — Possible reasons: The authorization token is invalid.
- `403` — Possible reasons: The user does not have sufficent capabilities.
- `409` — Returns a 409 if the action is not compatible with the current indexing state. For example, sending `stop` while the server is `idle`. <!-- Leave this line empty -->

---

[API](https://skmtc.dev/cardinalapps/apis/cardinal-media-server-api.md) · [All operations](https://skmtc.dev/cardinalapps/apis/cardinal-media-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cardinalapps/cardinal-media-server-api/revisions/1ec5a2e9d039/schema)
