Actions52
- Advanced Actions
- Api Keys Actions
- Clusters Actions
- Dictionaries Actions
- Indices Actions
- Records Actions
- Rules Actions
- Search Actions
- Synonyms Actions
- Vaults Actions
Overview
The "Batch assign user ids" operation in the Clusters resource allows you to assign multiple user IDs to a specific cluster in a multi-cluster Algolia setup. This operation is useful for managing user-to-cluster mappings in bulk, which can help optimize data distribution and query routing across clusters. Note that this operation only assigns user IDs; it does not move users between clusters.
Typical use cases include:
- Bulk assigning new users to a cluster after onboarding.
- Updating cluster assignments for a batch of users during infrastructure scaling or reorganization.
- Managing user distribution in multi-cluster environments to improve search performance.
Example: Assigning a list of user IDs ["user1", "user2", "user3"] to the cluster named "c11-test".
Properties
| Name | Meaning |
|---|---|
| X-Algolia-User-ID | Unique identifier of the user who makes the search request. |
| Batch Assign User Ids Params | Parameters to specify which fields to include in the batch assignment request body. Options are: Cluster (the cluster name) and Users (the list of user IDs to assign). |
| Cluster | The name of the cluster to which the user IDs will be assigned. |
| Users | JSON array of user IDs to assign to the specified cluster. |
Output
The node outputs the response from the Algolia API call as JSON. This typically includes confirmation of the batch assignment operation status or any error messages returned by the API.
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential with appropriate permissions to manage clusters and user ID mappings in Algolia.
- The node must be configured with the Algolia application ID and API key credentials.
- Network access to Algolia's API endpoint (
https://<appId>.algolia.net) is required.
Troubleshooting
- Invalid User ID Format: User IDs must match the pattern
^[a-zA-Z0-9 \-*.]+$. Ensure all user IDs conform to this regex. - Missing Required Fields: The
X-Algolia-User-IDheader and at least one parameter (ClusterorUsers) must be provided. - API Authentication Errors: Verify that the API key credential is valid and has sufficient permissions.
- Cluster Not Found: If the specified cluster name does not exist, the API may return an error. Confirm the cluster name is correct.
- Empty Users List: Providing an empty users array may result in no action or an error. Ensure the users list contains valid user IDs.
- Network Issues: Check connectivity to Algolia's API endpoint.
Links and References
- Algolia Multi-Cluster Operations
- Batch Assign User IDs API Documentation
- Managing User IDs in Algolia
This summary covers the static analysis of the "Batch assign user ids" operation under the "Clusters" resource based on the provided source code and property definitions.