Manage indexes
An index is a basic unit for organizing and storing video data consisting of video embeddings and metadata. Indexes facilitate information retrieval and processing. The IndexesClientWrapper
class provides methods to manage your indexes.
Properties
Methods
Create an index
Description: This method creates a new index based on the provided parameters.
Function signature and example:
Parameters
Return value: Returns an IndexesCreateResponse
object containing the unique identifier of the newly created index.
API Reference: Create an index.
Related guide: Create indexes.
Retrieve an index
Description: This method retrieves details of a specific index.
Function signature and example:
Parameters
Return value: Returns an IndexSchema
object representing the retrieved index.
The IndexSchema
class contains the following properties:
The IndexModelsItem
class contains the following properties:
API Reference: Retrieve an index.
List indexes
Description: This method retrieves a paginated list of indexes based on the provided parameters. By default, the platform returns your indexes sorted by creation date, with the newest at the top of the list.
Function signature and example:
Parameters
Return value: Returns a SyncPager[IndexSchema]
object containing a paginated list of IndexSchema
objects, representing the indexes that match the specified criteria. See the Retrieve an index section above for complete property details.
The SyncPager[T]
class contains the following properties and methods:
API Reference: List indexes.
Update an index
Description: This method updates the name of an existing index.
Function signature and example:
Parameters:
Return Value: None
. This method doesn’t return any data upon successful completion.
API Reference: Update an index.
Delete an index
Description: This method deletes an existing index.
Function signature and example:
Parameters:
Return value: None
. This method doesn’t return any data upon successful completion.
API Reference: Delete an index
Error codes
This section lists the most common error messages you may encounter while managing indexes.
index_option_cannot_be_changed
- Index option cannot be changed. Please remove index_options parameter and try again. If you want to change index option, please create new index.
index_engine_cannot_be_changed
- Index engine cannot be changed. Please remove engine_id parameter and try again. If you want to change engine, please create new index.
index_name_already_exists
- Index name
{index_name}
already exists. Please use another unique name and try again.
- Index name