---
title: "Get Indexes Operation"
url: "https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/get-indexes"
version: "6.2"
language: "python"
---

# Get Indexes Operation

> Client language: Python. Also available for [C#](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/get-indexes.md), [Java](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/get-indexes.java.md), [PHP](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/get-indexes.php.md), [Node.js](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/get-indexes.nodejs.md).
>
> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

> **Note**
>
> - Use `GetIndexesOperation` to retrieve multiple **index definitions** from the database.
>
> - The operation will execute on the node defined by the [client configuration](https://docs.ravendb.net/6.2/client-api/configuration/load-balance/overview.md#client-logic-for-choosing-a-node).  
>   However, the index definitions returned are taken from the database record,  
>   which is common to all the database-group nodes.  
>   i.e., an index state change done only on a local node is not reflected.
>
> - To get a specific index state on a local node use `GetIndexStatisticsOperation`.
>
> - In this page:
>   - [Get Indexes example](#get-indexes-example)
>   - [Syntax](#syntax)

## Get Indexes example

```python
# Define the get indexes operation
# Pass number of indexes to skip & number of indexes to retrieve
get_index_op = GetIndexesOperation(0, 10)

# Execute the operation by passing it to maintenance.send
indexes = store.maintenance.send(get_index_op)

# indexes will contain the first 10 indexes, alphabetically ordered by index name
# Access an index definition from the resulting list:
name = indexes[0].name
state = indexes[0].state
lock_mode = indexes[0].lock_mode
deployment_mode = indexes[0].deployment_mode
# etc.
```

## Syntax

```python
class GetIndexesOperation(MaintenanceOperation[List[IndexDefinition]]):
  def __init__(self, start: int, page_size: int): ...
```

| Parameters | Type | Description |
| - | - | - |
| **start** | `int` | Number of indexes to skip |
| **page\_size** | `int` | Number of indexes to retrieve |

| Return value of `store.Maintenance.Send(getIndexesOp)` | Description |
| - | - |
| `IndexDefinition[]` | A list of [IndexDefinition](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/put-indexes.python.md#indexdefinition) classes, <br /> ordered alphabetically by index name. |

## See also

- [What are Indexes](https://docs.ravendb.net/6.2/indexes/what-are-indexes.python.md)
- [Creating and Deploying Indexes](https://docs.ravendb.net/6.2/indexes/creating-and-deploying.md)
- [Index Administration](https://docs.ravendb.net/6.2/indexes/index-administration.md)
- [How to Get Index](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/get-index.python.md)
- [How to Put Indexes](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/put-indexes.python.md)
- [How to Delete Index](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/delete-index.python.md)
- [How to Get Indexes](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/get-indexes.python.md)
