---
title: "🛡️ Get the current state of the indexing service."
method: GET
path: "/api/v1/index/state"
tags: ["Indexing"]
---

# 🛡️ Get the current state of the indexing service.

`GET /api/v1/index/state`

Update the state of the currently running indexing operation. This endpoint
is dedicated to controlling the indexing service from the frontend, and
cannot update completed runs.

This endpoint is designed to accept actions. Instead of sending the desired
state, send an action and let the indexing service handle the change
internally. So, you send "stop", and internally the service will terminate
the run and change the state to `idle`.

Accepted actions are:

- `pause` - Pauses the run after the current file has completed indexing.
The internal state will change to `paused`.
- `resume` - Resumes a run and continues with the next file. Triggering
resume on a run that isn't paused will have no effect. The internal
state will change to `indexing`.
- `stop` - Stops a run after the current file has completed indexing. The
internal state will change to `idle`, and a new run can be started.
<!-- Leave this line empty -->
<br /><hr /><h3>🛡️ Requires Capabilities: <code>Indexing.Read</code></h3>

## Response `200`

The returned object will contain the state of the indexing service. 
Possible states are: `idle` `indexing` `paused`
<!-- Leave this line empty -->

- unknown

## Other responses

- `401` — Possible reasons: The authorization token is invalid.
- `403` — Possible reasons: The user does not have sufficent capabilities.

---

[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/b09fd4df42df/schema)
