Skip to main content
To see which existing encrypted indexes are available to your CyborgDB client, you can use list_indexes:
import cyborgdb_core as cyborgdb

index_location = cyborgdb.DBConfig(location='redis', connection_string="redis://localhost")
config_location = cyborgdb.DBConfig(location='redis', connection_string="redis://localhost")
api_key = "your_api_key_here"  # Replace with your actual API key

client = cyborgdb.Client(
    api_key=api_key,
    index_location=index_location,
    config_location=config_location
)

indexes = client.list_indexes()

print(indexes)
# Example output:
# ["index_one", "index_two", "index_three"]
#include "cyborgdb_core/client.hpp"

// Set index location and config location beforehand...
cyborg::DBConfig index_location(cyborg::Location::kRedis, std::nullopt, "redis://localhost");
cyborg::DBConfig config_location(cyborg::Location::kRedis, std::nullopt, "redis://localhost");
cyborg::DBConfig contents_location(cyborg::Location::kRedis, std::nullopt, "redis://localhost");

// Get your API key
std::string api_key = "your_api_key_here";  // Replace with your actual API key

cyborg::Client client(api_key, index_location, config_location, contents_location, 0, cyborg::kNone);

auto indexes = client.ListIndexes();

// Print the indexes
for (const auto& index_name : indexes) {
    std::cout << index_name << std::endl;
}
list_indexes is not available for memory locations.

API Reference

For more information on listing encrypted indexes, refer to the API reference:

Python API Reference

API reference for list_indexes() in Python

C++ API Reference

API reference for ListIndexes() in C++