Skip to main content
This page shows you how to manage your existing collections including listing, describing, and deleting operations. Later snippets reuse the imports and client setup from the first example. For Go, place the snippets inside main, import context, log, and github.com/lambdadb/go-lambdadb as lambdadb, and initialize ctx := context.Background(). See the Quickstart for a complete Go setup.

List collections

Retrieve collections in your project with their configuration and metadata. The endpoint supports optional pagination. Treat pageToken as opaque. Return it unchanged to the same endpoint.
The response includes detailed information about each collection. When there are more results, the response may include nextPageToken for fetching the next page:

Describe a collection

Get detailed information about a specific collection, including its configuration, document count, default branch, and retention period. numDocs and dataUpdatedAt describe the default main branch’s committed head. They are not totals across branches or statistics for a selected ref. dataUpdatedAt may be absent before the first snapshot commits.
The REST response wraps the collection details in collection. SDK convenience methods may return the inner object:
Collection and ref timestamps, including source.asOf, use numeric Unix epoch milliseconds.

Configure a collection

Update one or more of indexConfigs, description, tags, or snapshotRetentionInDays:
The REST response is 200 OK with the full collection wrapper. Omitted or null fields remain unchanged; at least one supported field must be non-null. New fields can be added under existing objects at any depth. Include all existing fields in the submitted schema, including nested children, and preserve their types and settings. For example, adding profile.city is supported when profile.name and its settings are retained. Removing an existing field or changing its type, analyzers, vector settings, or embedding configuration is rejected. partitionConfig and defaultBranchName cannot be changed with PATCH. Metadata tags allow up to five entries. Keys must match [A-Za-z0-9_.-]{1,63}; values must be nonblank, at most 127 characters, and cannot contain :, #, or ,. These metadata tags are separate from data-versioning tags.

Delete a collection

Permanently delete a collection and all of its associated data and resources. This operation cannot be undone. The API performs the logical deletion transition before returning 200 OK. The deleted collection becomes unavailable and its name can be reused immediately. Physical cleanup may continue after the response. Recreating the name creates a new collection identity; discard cached state for the old collection. Deleting an already absent collection can return 404.
The REST response is:
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.