Mira Library Update
AI-generatedOverview
This node updates an existing library in the Mira App Server. It allows users to modify the library's name, description, and whether hash calculation for files is enabled. This is useful when managing digital libraries where metadata or settings need to be changed without recreating the entire library.
Practical examples include:
- Renaming a library to reflect updated content or organizational changes.
- Adding or updating a description to provide more context about the library.
- Enabling or disabling hash calculation to control file integrity checks within the library.
Properties
| Name | Meaning |
|---|---|
| Library ID | The unique identifier of the library to update (required). |
| Name | New name for the library; leave empty to keep the current name unchanged. |
| Description | New description for the library; leave empty to keep the current description unchanged. |
| Enable Hash | Boolean flag to enable or disable hash calculation for files in the library. |
Output
The node outputs a JSON object with the following structure:
updated: A boolean indicating if the update was successful (true).libraryId: The ID of the updated library.changes: An object showing the applied changes with keys:name: The new name or "(unchanged)" if not modified.description: The new description or "(unchanged)" if not modified.enableHash: The boolean value indicating if hash calculation is enabled.
response: The raw response from the Mira API after the update request.timestamp: ISO string timestamp of when the update occurred.operation: The operation performed, here always"update".
Dependencies
- Requires an API key credential for authenticating requests to the Mira App Server.
- Uses HTTP PUT requests to the
/api/libraries/{libraryId}endpoint of the Mira API. - The node depends on helper functions for HTTP requests and error handling provided by the n8n environment and shared Mira helper modules.
Troubleshooting
- Missing Library ID: The node throws an error if the "Library ID" property is empty because it is required to identify which library to update.
- API Authentication Errors: If the API key or authentication token is invalid or missing, the HTTP request will fail. Ensure proper credentials are configured.
- Invalid Library ID: If the specified library ID does not exist, the API may return a 404 error. Verify the ID before running the node.
- Empty Name or Description: Leaving these fields empty will keep their current values unchanged, so no update occurs for those properties.
- Network Issues: Connectivity problems can cause the HTTP request to fail. Check network access to the Mira API server.
Links and References
- Mira App Server API documentation (for
/api/librariesendpoint) — consult your Mira API docs for detailed info on request/response formats. - n8n HTTP Request node documentation for understanding HTTP authentication and request options.