Actions24
- Documents Actions
- Indexes Actions
- Keys Actions
- Search Actions
- Settings Actions
- Tasks Actions
Overview
This node integrates with the Meilisearch API to manage API keys. Specifically, the "Create An API Key" operation under the "Keys" resource allows users to generate new API keys with defined permissions and access scopes. This is useful for controlling access to various parts of a Meilisearch instance, such as indexes and documents, by specifying allowed actions and expiration dates.
Common scenarios include:
- Automating the creation of API keys for different applications or services that need controlled access.
- Generating temporary keys with limited permissions for testing or short-term use.
- Managing security by defining fine-grained access rights per key.
Example: Creating an API key named "My Key" that can perform document additions and searches on specific indexes, expiring after a set date.
Properties
| Name | Meaning |
|---|---|
| Name | The name assigned to the API key for identification purposes. |
| Description | A textual description providing additional context about the API key's purpose or usage. |
| Actions | List of permitted API actions for the key. Options include all actions (*), document-related actions (e.g., documents.add), index management (e.g., indexes.create), key management, search, settings, tasks, and version retrieval. Multiple actions can be selected. |
| Index UIDs | Comma-separated list of Index UIDs that the API key will have access to. |
| Expires At | Optional expiration date/time for the key in RFC 3339 format. If not set, the key does not expire. |
Output
The node outputs JSON data representing the newly created API key object returned by the Meilisearch API. This typically includes fields such as the key's unique identifier, name, description, allowed actions, accessible indexes, creation timestamp, and expiration date if set.
No binary data output is involved.
Dependencies
- Requires connection to a Meilisearch instance via its REST API.
- Needs an API authentication token credential configured in n8n to authorize requests.
- The base URL of the Meilisearch server must be provided in the credentials configuration.
Troubleshooting
- Invalid or missing API key credential: Ensure the API authentication token is correctly configured and has sufficient privileges to create keys.
- Malformed input properties: Verify that required fields like "Actions" and "Index UIDs" are properly filled and formatted.
- Expiration date format errors: The "Expires At" property must be in valid RFC 3339 datetime format; otherwise, the request may fail.
- Permission errors: Attempting to assign actions or indexes not allowed by the authenticated user’s privileges will result in authorization errors.
- Network or connectivity issues: Confirm that the Meilisearch host URL is reachable from the n8n environment.