# IRPCVaultAdmin.ExecuteIndexManagementOperation

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md) > [Vault administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultAdmin/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultAdmin/ExecuteIndexManagementOperation/

Badges: `Administration API / specialized` `admin` `session`

Runs a management operation on one search index of the vault: rebuild, re-index, activate,
enable, disable or delete.

- **Service:** [Vault administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultAdmin/index.md) `MFiles.IRPCVaultAdmin`
- **gRPC method:** `/MFiles.IRPCVaultAdmin/ExecuteIndexManagementOperation`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/execute-index-management-operation`
- **Request:** [`ExecuteIndexManagementOperationRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultAdmin/ExecuteIndexManagementOperation/index.md#request)
- **Response:** [`ExecuteIndexManagementOperationResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultAdmin/ExecuteIndexManagementOperation/index.md#response)
- **Book and level:** Administration API, specialized
- **Kind:** admin
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** no
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

- Requires a vault session and the vault right `verify_vault`. Activate, enable, disable and
  delete also require the system administrator server role (server right `manage_vaults`).
- Rebuild and re-index start background work by the M-Files indexing service; there is no task ID
  to follow. Re-index works only on combined indexes (`INDEXED_DATA_TYPE_COMBINED`).
- Get the index names and the operations allowed for the caller from
  [GetIndexOptions](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultAdmin/GetIndexOptions/index.md).

<a id="request"></a>

## Request: ExecuteIndexManagementOperationRequest

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `operation_data` | [`IndexManagementOperationData`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.IndexManagementOperationData/index.md) | The index (`name`, as returned by GetIndexOptions) and the operation. |
| `operation_data.name` | [`IndexName`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.IndexName/index.md) | The name of the index. |
| `operation_data.name.configuration_name` | `string` | The name of the index configuration. |
| `operation_data.name.repository_connection` | `string` | Identifies the external repository connection. |
| `operation_data.name.configuration_type` | [`IndexConfigurationType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.IndexConfigurationType/index.md) | The index configuration type (e.g., Shared versus Legacy). Values: `INDEX_CONFIGURATION_TYPE_UNKNOWN` (0), `INDEX_CONFIGURATION_TYPE_LEGACY` (1), `INDEX_CONFIGURATION_TYPE_SHARED` (2), `INDEX_CONFIGURATION_TYPE_ANY` (3). |
| `operation_data.operation` | [`IndexManagementOperation`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.IndexManagementOperation/index.md) | Operation to be executed. Values: `INDEX_MANAGEMENT_OPERATION_UNKNOWN` (0), `INDEX_MANAGEMENT_OPERATION_REBUILD` (1), `INDEX_MANAGEMENT_OPERATION_REINDEX` (2), `INDEX_MANAGEMENT_OPERATION_ACTIVATE` (3), `INDEX_MANAGEMENT_OPERATION_ENABLE` (4), `INDEX_MANAGEMENT_OPERATION_DISABLE` (5), `INDEX_MANAGEMENT_OPERATION_DELETE` (6). |

<a id="response"></a>

## Response: ExecuteIndexManagementOperationResponse

No fields.

<a id="related"></a>

## Related methods

- [GetIndexOptions](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCVaultAdmin/GetIndexOptions/index.md): Lists the search indexes of the vault with their state and the management operations the caller may run on each.
