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

# Create a client
client = Client(
    base_url='http://localhost:8000', 
    api_key='your-api-key'
)

# List all available indexes
indexes = client.list_indexes()

print(indexes)
# Example output:
# ["index_one", "index_two", "index_three"]
import { Client } from 'cyborgdb';

// Create a client
const client = new Client({ 
    baseUrl: 'http://localhost:8000', 
    apiKey: 'your-api-key' 
});

// List all available indexes
const indexes = await client.listIndexes();

console.log(indexes);
// Example output:
// ["index_one", "index_two", "index_three"]
import { Client } from 'cyborgdb';

// Create a client
const client = new Client({ 
    baseUrl: 'http://localhost:8000', 
    apiKey: 'your-api-key' 
});

// List all available indexes
const indexes: string[] = await client.listIndexes();

console.log(indexes);
// Example output:
// ["index_one", "index_two", "index_three"]
package main

import (
    "context"
    "fmt"
    "log"
    
    "github.com/cyborginc/cyborgdb-go"
)

// Create client
client, err := cyborgdb.NewClient("http://localhost:8000", "your-api-key")
if err != nil {
    log.Fatal(err)
}

// List all indexes
ctx := context.Background()
indexes, err := client.ListIndexes(ctx)
if err != nil {
    log.Fatal(err)
}

fmt.Println(indexes)
// Example output: ["index_one", "index_two", "index_three"]
curl -X GET "http://localhost:8000/v1/indexes/list" \
     -H "X-API-Key: your-api-key"

# Response:
# {
#   "indexes": ["index_one", "index_two", "index_three"]
# }
This returns an array of index names that are available to your API key.

API Reference

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

REST API Reference

REST API reference for /v1/indexes/list

Python SDK Reference

API reference for list_indexes() in Python

JS/TS SDK Reference

API reference for listIndexes() in JavaScript/TypeScript

Go SDK Reference

API reference for ListIndexes() in Go