# \IndexesApi
All URIs are relative to *https://api.hotdata.dev*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_index**](IndexesApi.md#create_index) | **POST** /v1/connections/{connection_id}/tables/{schema}/{table}/indexes | Create an index on a table
[**delete_index**](IndexesApi.md#delete_index) | **DELETE** /v1/connections/{connection_id}/tables/{schema}/{table}/indexes/{index_name} | Delete an index
[**list_indexes**](IndexesApi.md#list_indexes) | **GET** /v1/connections/{connection_id}/tables/{schema}/{table}/indexes | List indexes on a table
[**list_indexes_collection**](IndexesApi.md#list_indexes_collection) | **GET** /v1/indexes | List indexes across tables in a database
## create_index
> models::IndexInfoResponse create_index(connection_id, schema, table, create_index_request)
Create an index on a table
Create a sorted, BM25 full-text, or vector index on a table. The table must have data loaded, and must not declare a sort order (`sorted_by`): a table with a sort order cannot be indexed. A table can hold several indexes, with two limits: it holds at most one vector index, whichever algorithm it uses; and a vector index that generates its own embeddings (created with `embedding_provider_id`) must be the only index on its table, so it cannot be added alongside an existing index and no further index can be added alongside it. A request refused for any of these reasons gets 400, including when `async` is set. The request body describes the rules in full.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**connection_id** | **String** | The database's `default_connection_id`, as returned when the database is created or fetched | [required] |
**schema** | **String** | Schema name | [required] |
**table** | **String** | Table name | [required] |
**create_index_request** | [**CreateIndexRequest**](CreateIndexRequest.md) | | [required] |
### Return type
[**models::IndexInfoResponse**](IndexInfoResponse.md)
### Authorization
[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## delete_index
> delete_index(connection_id, schema, table, index_name)
Delete an index
Delete a specific index from a table. An index cannot be deleted while a load into its table is running; that request gets 409 and can be retried once the load finishes. Deleting a vector index that generated its own embeddings keeps the generated column as an ordinary column of the table.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**connection_id** | **String** | The database's `default_connection_id`, as returned when the database is created or fetched | [required] |
**schema** | **String** | Schema name | [required] |
**table** | **String** | Table name | [required] |
**index_name** | **String** | Index name | [required] |
### Return type
(empty response body)
### Authorization
[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## list_indexes
> models::ListIndexesResponse list_indexes(connection_id, schema, table)
List indexes on a table
List all indexes created on a table.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**connection_id** | **String** | The database's `default_connection_id`, as returned when the database is created or fetched | [required] |
**schema** | **String** | Schema name | [required] |
**table** | **String** | Table name | [required] |
### Return type
[**models::ListIndexesResponse**](ListIndexesResponse.md)
### Authorization
[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## list_indexes_collection
> models::ListIndexesPageResponse list_indexes_collection(x_database_id, connection_id, schema, table, index_type, limit, cursor)
List indexes across tables in a database
List all indexes in the database identified by the required X-Database-Id header, paginated. Optional filters narrow by connection, schema, table, or index type.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**x_database_id** | **String** | Database to scope to (required) | [required] |
**connection_id** | Option<**String**> | Filter to one connection | |
**schema** | Option<**String**> | Filter by schema name | |
**table** | Option<**String**> | Filter by table name | |
**index_type** | Option<**String**> | Filter by index type | |
**limit** | Option<**i32**> | Max indexes per page | |
**cursor** | Option<**String**> | Pagination cursor | |
### Return type
[**models::ListIndexesPageResponse**](ListIndexesPageResponse.md)
### Authorization
[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)