Skip to main content
Retrieves vectors from the encrypted index by their IDs, with options to specify which fields to include in the results.

Parameters

Returns

Promise<GetResultItem[]>: A Promise that resolves to an array of retrieved vector items with type-safe access to fields. Each item contains the requested fields based on the include parameter. See the GetResultItem type for more details.

Exceptions

  • Throws if the API request fails due to network connectivity issues.
  • Throws if authentication fails (invalid API key).
  • Throws if the encryption key is invalid for the specified index.
  • Throws if there are internal server errors preventing the retrieval.
  • Throws if the ids parameter is null, undefined, or empty.
  • Throws if the include parameter contains invalid field names.

Example Usage

Response Format

The method returns an array of objects with the following structure:
The contents field is returned as a decoded UTF-8 string, regardless of whether it was originally stored as a string or Buffer. The SDK automatically decodes the base64 response from the server.

Response Item Fields