Actions8
Overview
This node integrates with the MediaCockpit Digital Asset Management (DAM) REST API, enabling users to search for assets stored in the MediaCockpit system. It supports two search modes: a simple text query and an advanced JSON filter for complex queries. This node is useful for scenarios where you need to programmatically find media assets based on metadata or content criteria, such as retrieving images, videos, or documents matching specific keywords or attributes.
Practical examples include:
- Searching for all assets containing a certain keyword in their content.
- Using advanced filters to find assets that meet multiple criteria, such as date ranges, tags, or custom metadata fields.
- Controlling the number of results returned or fetching all available matches.
Properties
| Name | Meaning |
|---|---|
| Search Mode | Choose between "Simple Search" (text query) or "Advanced Filter" (custom JSON filter for complex queries). |
| Search Query | The text string used to perform a simple search on assets (used only if Search Mode is "Simple Search"). |
| Filter JSON | Custom JSON object defining complex search criteria; replace the empty "param" value with your search term (used only if Search Mode is "Advanced Filter"). |
| Build JSON | Optional JSON configuration to control the output format of the search results; leave empty {} to use default output (used only if Search Mode is "Advanced Filter"). |
| Return All Results | Boolean flag indicating whether to return all matching results (true) or limit the number of results (false). |
| Limit | Maximum number of results to return when Return All Results is set to false. Must be at least 1. |
Output
The node outputs an array of items, each representing an asset found by the search operation. Each item contains:
- A
jsonfield with the asset's metadata and details as returned by the MediaCockpit API. - Debug information fields prefixed with
_debug_may be present during execution for troubleshooting but are not part of the standard output.
No binary data is output by this search operation.
Dependencies
- Requires an API key credential for authenticating with the MediaCockpit DAM REST API.
- The node expects the base API URL to be configured via credentials.
- Uses HTTP requests to communicate with the MediaCockpit API endpoints.
Troubleshooting
- Empty or no results: Verify that the search query or filter JSON is correctly formatted and matches existing assets in the MediaCockpit system.
- Invalid JSON in Filter JSON or Build JSON: Ensure that the JSON syntax is valid and that the filter structure conforms to the expected schema by MediaCockpit.
- API authentication errors: Confirm that the API key credential is valid and has sufficient permissions.
- Limit ignored or too many results: If
Return All Resultsis set totrue, the node will fetch all results regardless of theLimitsetting. - Malformed or missing parameters: Make sure required properties like
Search Query(for simple mode) orFilter JSON(for advanced mode) are provided and non-empty.
Links and References
- MediaCockpit DAM API Documentation (example link, replace with actual)
- n8n documentation on creating custom nodes
- JSON formatting tools for validating filter JSON input (e.g., https://jsonlint.com/)