listIndexes( )


Lists all indexes defined for a data collection.

When an index's status is ACTIVE, it is ready to use. While it is still being created, its status is BUILDING.

When an index's status is DROPPED, it has been dropped successfully. While it is still in the process of being removed, its status is DROPPING.

Authentication
  • When developing websites or building an app with Blocks, this method may require elevated permissions, depending on the identity of the user calling it and the calling user’s permissions.
  • When building apps without Blocks or for headless projects, you can only call this method directly when authenticated as a Wix app or Wix user identity. When authenticated as a different identity, you can call this method using elevation.
  • Elevation permits users to call methods they typically cannot access. Therefore, you should only use it intentionally and securely.
Permissions
Manage Data Indexes
Manage All Data Resources
Learn more about app permissions.
Method Declaration
Copy
function listIndexes(
  dataCollectionId: string,
  options: ListIndexesOptions,
): Promise<ListIndexesResponse>;
Method Parameters
dataCollectionIdstringRequired

ID of the data collection for which to list indexes.


optionsListIndexesOptions

Options for retrieving a list of indexes.

Returns
Return Type:Promise<ListIndexesResponse>
JavaScript
import { indexes } from "@wix/data"; async function listIndexes(dataCollectionId, options) { const response = await indexes.listIndexes(dataCollectionId, options); }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?