Get
Retrieves, decrypts and returns items from their IDs. If an item does not exist at that ID, it will return an empty object.Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
ids | List[str] | - | Item IDs to retrieve & decrypt |
include | List[str] | "vector", "contents", "metadata" | (Optional) List of item fields to return. Can include vector, contents, and metadata. |
index_key | bytes | None | (Optional, keyword-only) Override the per-operation index key. See Per-operation key override. |
user_id | bytes | None | (Optional, keyword-only) 16-byte RBAC user identifier. See Per-operation key override. |
Returns
List[Dict]: Decrypted item fields for each item, including id and specified fields (e.g., vector, contents, and metadata).
Exceptions
ValueError
ValueError
- Throws if the item could not be retrieved or decrypted.
RuntimeError
RuntimeError
- Throws if an unexpected error occurs during retrieval.
Example Usage
Per-operation key override
The calls above reuse the key supplied atcreate_index() / load_index(). You may instead pass index_key= (and user_id= for an RBAC user) to override the per-operation key. This is required in stateless/service deployments that reload the index per request: