Shopware icon

Shopware

Shopware

Actions778

Rule → Search Rule

AI-generated

Overview

This node operation performs a search query for rules within the Shopware platform. It allows users to specify various parameters to control the search results, such as pagination (page and limit), filtering criteria, sorting order, and fields to be returned. It supports advanced search features like post-filters, aggregations, groupings, and inclusion of associated entities. This operation is useful for retrieving specific rules based on complex search criteria, for example, fetching rules that match certain conditions or sorting rules by creation date.

Use Case Examples

  1. Retrieve the first page of rules with a limit of 10 items per page.
  2. Search for rules that match specific filter criteria, such as rules created after a certain date.
  3. Sort rules by name in ascending order and include associated entities in the results.

Properties

Name Meaning
Page The page number of the search results to retrieve.
Limit The number of items to return per page in the search results.
Filter A JSON array of filters to restrict the search results based on specific conditions.
Sort A JSON array defining the sorting order of the search results.
Post Filter A JSON array of filters applied after aggregations, which do not affect aggregation results.
Associations A JSON object specifying related entities to include in the search results.
Aggregations A JSON array defining aggregations to perform on the search results.
Grouping A JSON array specifying fields to group the search results by.
Fields A JSON array specifying which fields should be returned in the search results.
Total Count Mode Option to determine how the total number of hits is calculated: none (disabled), exact (slow but accurate), or next-pages (fast for next page only).
Ids A JSON array of specific IDs to search for.
Includes A JSON object specifying fields to include for given entities, optimizing the returned data.
Request Options Additional request settings such as batching, SSL certificate validation, proxy configuration, and timeout settings.

Output

JSON

  • data - The search results containing the matched rules and their details.

Dependencies

  • An API key credential for Shopware Admin API

Troubleshooting

  • Ensure the JSON input for filters, sort, post-filter, aggregations, grouping, fields, ids, and includes is correctly formatted to avoid parsing errors.
  • If the total count mode is set to 'exact', expect slower response times due to the calculation of the exact total hits.
  • Check network settings such as proxy and SSL validation if requests fail or time out.
  • Verify that the API credentials are valid and have sufficient permissions to perform search operations.

Links

Discussion