Skip to main content
This page shows you how to manage your existing collections including listing, describing, and deleting operations.

List collections

Retrieve a complete list of all collections in your project along with their metadata and status information. The endpoint supports optional pagination.
ParameterDescriptionTypeRequiredDefault
sizeMax number of collections to return in one page.integer
pageTokenToken for the next page of results.string
from lambdadb import LambdaDB

with LambdaDB(project_api_key="YOUR_API_KEY", base_url="YOUR_BASE_URL", project_name="YOUR_PROJECT_NAME") as client:
    # First page (optional: size, page_token)
    res = client.collections.list(size=20)
    for c in res.collections:
        print(c.collection_name, c.num_docs)
    # Next page (if res.next_page_token is set)
    if res.next_page_token:
        res_next = client.collections.list(size=20, page_token=res.next_page_token)
The response includes detailed information about each collection. When there are more results, the response may include nextPageToken for fetching the next page:
{
  "collections": [
    {
      "projectName": "your-project",
      "collectionName": "example-collection",
      "indexConfigs": {
        "title": {"type": "text"},
        "category": {"type": "keyword"}
      },
      "numDocs": 1250,
      "sourceProjectName": "source-project-name",
      "sourceCollectionName": "source-collection-name",
      "sourceCollectionVersionId": "wR0NyDJbqDiHMaaV597GjczO2oGQyG7T",
      "collectionStatus": "ACTIVE"
    }
  ],
  "nextPageToken": "eyJ..."
}

Describe a collection

Get detailed information about a specific collection, including its configuration, document count, and current status.
with LambdaDB(project_api_key="YOUR_API_KEY", base_url="YOUR_BASE_URL", project_name="YOUR_PROJECT_NAME") as client:
    meta = client.collection("example-collection").get()
    # or client.collections.get(collection_name="example-collection")
The response provides comprehensive collection details:
{
  "projectName": "your-project",
  "collectionName": "example-collection",
  "indexConfigs": {
    "title": {
      "type": "text",
      "analyzers": ["standard", "korean"]
    },
    "embedding": {
      "type": "vector",
      "dimensions": 768,
      "similarity": "cosine"
    }
  },
  "numDocs": 1250,
  "sourceProjectName": "source-project-name",
  "sourceCollectionName": "source-collection-name",
  "sourceCollectionVersionId": "wR0NyDJbqDiHMaaV597GjczO2oGQyG7T",
  "collectionStatus": "ACTIVE"
}

Delete a collection

Permanently delete a collection and all of its associated data and resources. This operation cannot be undone.
client.collections.delete(collection_name="collection-to-delete")
Deleting a collection is irreversible and will permanently remove all documents and metadata. Make sure you have proper backups if needed before proceeding with this operation.

Collection status

Collections can have the following status values:
StatusDescription
CREATINGCollection is being created and not yet available
ACTIVECollection is ready for read/write operations
DELETINGCollection is being deleted