Algolia icon

Algolia

Use Algolia in your n8n workflows

Overview

The "List indices" operation under the "Indices" resource in this Algolia node allows users to retrieve a list of all indices within their current Algolia application. This is useful for managing and auditing your search indices, especially when you have multiple indices and want to programmatically access or display them.

Typical use cases include:

  • Displaying all available indices in a dashboard or UI.
  • Automating index management workflows, such as backing up or synchronizing indices.
  • Auditing indices to check their existence or status before performing further operations.

For example, if you want to get an overview of all your search indices to decide which ones to update or delete, this operation provides a straightforward way to fetch that list.

Properties

Name Meaning
Page Choose between two options:
- Integer: Specify a page number (0 or higher) to paginate through the list of indices.
- Null: No pagination, fetches the default set of indices.
Page (number) When "Page" is set to Integer, specify the page number here (minimum 0).
Page (null) When "Page" is set to Null, this property is fixed to null and disables pagination.
Hits Per Page Number of indices to return per page. Defaults to 100 if not specified.

Output

The output of this operation is a JSON array containing the list of indices retrieved from the Algolia application. Each item in the array represents an index with its associated metadata as provided by Algolia's API.

The structure typically includes properties like:

  • name: The name of the index.
  • Other metadata related to the index (not explicitly detailed here).

No binary data is output by this operation.

Dependencies

  • Requires an active connection to an Algolia application via an API key credential with permissions to list indices.
  • The node uses the Algolia REST API endpoint /1/indexes with optional query parameters for pagination.
  • The base URL for requests is constructed using the Algolia Application ID from credentials.
  • Proper API authentication headers must be configured in n8n credentials.

Troubleshooting

  • Empty results: If no indices are returned, verify that the API key used has sufficient permissions and that indices exist in the application.
  • Pagination issues: Ensure that the "Page" property is correctly set to either an integer >= 0 or null. Invalid values may cause errors or unexpected behavior.
  • API errors: Common HTTP errors like 401 Unauthorized indicate invalid or missing API keys. Check your credentials configuration.
  • Rate limits: Algolia enforces rate limits; excessive requests may result in throttling. Implement retries or backoff strategies if needed.

Links and References


This summary covers the static analysis of the "List indices" operation for the "Indices" resource based on the provided source code and input properties.

Discussion