Skip to main content

List stores

List the stores currently registered on the server — handy for introspection, admin tooling, and debugging.

Every operation works on both Vector DB stores (you supply raw vectors) and AI stores (you supply text or images and Ahnlich AI generates the embeddings for you). Use the Vector DB / AI switch in the sample below.

Parameters

ParameterTypeDescription
schemastring · optionalSchema to list. When omitted, lists the public schema only (not every schema).

All requests accept an optional schema field. When omitted, the server uses the public schema.

Behavior

  • Returns each store's name, entry count, size in bytes, and any active non-linear index configuration.
  • An empty list means no stores have been created yet.

Sample query

Python
import asyncio
from grpclib.client import Channel
from ahnlich_client_py.grpc.services.db_service import DbServiceStub
from ahnlich_client_py.grpc.db import query as db_query

async def list_stores():
async with Channel(host="127.0.0.1", port=1369) as channel:
client = DbServiceStub(channel)
tracing_id = "00-80e1afed08e019fc1110464cfa66635c-7a085853722dc6d2-01"
response = await client.list_stores(
db_query.ListStores(schema="analytics"),
metadata={"ahnlich-trace-id": tracing_id}
)
print(f"Stores: {[store.name for store in response.stores]}")

if __name__ == "__main__":
asyncio.run(list_stores())

Response

A collection of store summaries.