Meilisearch icon

Meilisearch

Consume Meilisearch API

Overview

This node interacts with the Meilisearch API, specifically focusing on the "Keys" resource and the "Get An API Key" operation. It allows users to retrieve details about a specific API key in their Meilisearch instance by providing the unique identifier (UID) of the key. This is useful for managing access control, auditing, or automating key management tasks within Meilisearch.

Common scenarios:

  • Retrieving information about an existing API key for review or audit purposes.
  • Integrating Meilisearch key management into automated workflows.
  • Validating that a particular API key exists and checking its permissions or metadata.

Practical example:
A user wants to fetch the details of a specific API key to verify its permissions before sharing it with a new team member.

Properties

Name Meaning
UID UID or Key of the key. This is a required string value representing the unique identifier of the API key you want to retrieve.

Output

The output will be a JSON object containing the details of the requested API key. While the exact structure depends on the Meilisearch API response, typical fields may include:

{
  "uid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "name": "My API Key",
  "description": "Key for project X",
  "actions": ["search", "documents.add"],
  "indexes": ["*"],
  "expiresAt": null,
  "createdAt": "2023-01-01T00:00:00Z",
  "updatedAt": "2023-01-02T00:00:00Z"
}
  • uid: The unique identifier of the API key.
  • name: The name assigned to the key.
  • description: A description of the key's purpose.
  • actions: List of allowed actions for this key.
  • indexes: List of indexes the key has access to.
  • expiresAt: Expiration date/time of the key, if set.
  • createdAt / updatedAt: Timestamps for creation and last update.

No binary data is output by this operation.

Dependencies

  • External Service: Requires access to a running Meilisearch instance.
  • API Key: You must provide valid Meilisearch credentials (meilisearchApi) configured in n8n.
  • Environment Variable: The base URL for Meilisearch should be set in the credentials as host_url.

Troubleshooting

Common issues:

  • Invalid UID: If the provided UID does not correspond to any existing API key, the node will likely return an error indicating that the key was not found.
  • Authentication Error: If the Meilisearch credentials are missing or incorrect, you may receive authentication errors such as "Unauthorized" or "Invalid API key".
  • Connection Issues: If the host_url is incorrect or the Meilisearch server is unreachable, connection errors will occur.

How to resolve:

  • Double-check the UID for typos or ensure the key exists in your Meilisearch instance.
  • Verify that your n8n credentials for Meilisearch are correct and have sufficient permissions.
  • Ensure the Meilisearch server is running and accessible from your n8n environment.

Links and References

Discussion