GetPresets

Get one or more presets based on provided filter parameters.

With this command you can get one or more presets based on filter parameters you provide. The resulting presets are included in the command’s Result node as JSON.

To understand the provided command parameters please read our preset guide, which contains a preset example and a short code snippet demonstrating how to load and apply a preset from within your application.

There are several parameters that can be used to filter the list of available presets. Providing none of the filter parameters makes the command list all available presets. The possible filter parameters are:

  • Name: If known, you can specify the name of a particular preset. The other filters are still applied to the preset with the given name if they are enabled.

  • Tags: Specify one or more tags the preset has to have. Only presets containing all the specified tags are returned.

  • Condition: Provide a condition the preset’s Data object has to satisfy. Only presets satisfying the condition are returned.

  • Data: As described in the preset schema, a preset file itself can also define a condition, which will be applied to the JSON data specified by this parameter. A preset is only returned if its condition is satisfied. Presets without a condition are considered valid. Not specifying a data node will simply skip filtering by the preset conditions.

When working with filters and especially conditions formulated as JSON schema, you might want to find out why a particular preset was filtered out. The ExcludedPresets subnode of the Result node contains an object for each preset that has been filtered out.

Additional preset files can either be put next to the preinstalled ones or in one or more local directories, which can be given to the command via the FolderPath parameter. In both cases make sure that the Name value is unique in all JSON preset files known by the command.