When you use the REST API GetRuleAppArchive method, you can use the
q parameter to choose which rulesets in the RuleApp must be included in the RuleApp
archive.
The
q parameter is an optional parameter, and you can use four ruleset options,
name,
version,
creationDate, and
propertyName in the query. See Table 2 to learn more about these options.
Remember: You can learn and test the
GetRuleAppArchive method with the
query parameter in the REST API test tool in the
Rule Execution Server console. For more information
about what you can do in the
Rule Execution Server console, see
Archiving RuleApps.
Table 1 shows separators that can be used in the query.
Table 1. Separators in the query
| Separator |
Description |
|
;
|
Separator between rulesets |
|
,
|
Separator between name, version, creation date, and properties of the ruleset |
|
:
|
Separator between the option name and the option value |
|
"
|
Used to include complex property values. |
Table 2 shows options that can be used with the
q parameter. See the following
example of the
q parameter with several options:
q=name:rulesetA,version:hightest,creationDate:after 2017-06-10,ruleset.status:enabled;name:rulesetB,version:2.0
Table 2. Options for the q
parameter
| Option |
Description |
Format |
|
name
|
Ruleset name
|
If you do not use this option (the option is not used by default), all rulesets in the RuleApp
archive are selected.
- Use a complete ruleset name.
- Asterisks (*) can be used as a wildcard symbol.
If you specify
name:*, all rulesets are selected.
If you specify
name:My*, all rulesets starting with My are
selected.
- An empty name in double quotation marks name:"" is not accepted.
If no matching ruleset is found, a response message Ruleset
"name:<ruleset_name>," was not found. is generated.
|
|
version
|
Ruleset version
|
If you do not specify a version, all versions are selected.
- Use a complete version, for example: 1.2.
- Asterisks (*) can be used as a wildcard symbol.
If you specify
version:*, or version:*.*, all versions are
selected.
If you specify version:1.*, all rulesets with major version 1
are selected.
If you specify version:*.1, all rulesets with minor
version 1 are selected.
- version:highest means the highest version of the ruleset.
- An empty version in double quotation marks, version:"", is not
accepted.
- The version must have a major version and a minor version. An expression such as
version:1 is not accepted.
If no matching version is found, a response message is generated.
|
|
creationDate
|
Date that the ruleset is created
|
You can use the following expressions for the date:
- before (including the specified date)
- after (including the specified date)
- on
Accepted date format:
yyyy-MM-dd
yyyy-MM-dd'T'HH:mm:ss
yyyy-MM-dd'T'HH:mm:ss.SSSZ
Milliseconds ( long) are also accepted.
The following list shows examples of accepted date format:
- 2017-01-01
- 2017-01-01T00:00:00
- 2017-01-01T00:00:00.000+0000
You can use the AND operator to specify two
creationDates. Only one logical operator AND is
accepted. For example:
q=name:MyFirstRuleset,version:hightest,creationDate:after 2017-06-10 AND creationDate:before 2017-12-10;
|
|
propertyName
|
Properties
|
Specify a property name and its value. The name and the value are separated by a colon
(:).For
example: ruleset.managedxom.uris:"resuri://XomOne.zip/1.0,resuri://XomOne.zip/2.0,resuri://XomTwo.zip/1.0", ruleset.status:enabled
If
the property value contains symbols and special characters, it must be surrounded by double
quotation marks (").
For
example: q=ruleset.managedxom.uris:"reslib://LibXomOneTwo/1.1,resuri://XomOne.zip/2.0"
If
the property name or the value is not found, an error message is generated as a
response.
|
Note: The options
name,
version, and
creationDate can be used only once for each ruleset in the query.
The same
propertyName can be used only once for each ruleset in the query. You can
specify multiple property values for the same propertyName in the
ruleset.