Skip to main content

1E 23.11 (SaaS)

Policy.GetRuleEvaluationHistory

Method

GetRuleEvaluationHistory

Module

Policy

Library

Core

Action

Get a chronological history of recent rule evaluation (for one rule, or all rules).

Parameters

RuleId (integer, optional): The identifier of a specific rule whose history should be retrieved. Omit for a history of all rules.

Return values

For each rule evaluation:

RuleId (integer): Rule identifier.

Changed (bool): Whether this evaluation marks a change from the previous state of the rule.

Status (integer): The numeric representation of the evaluation status (see notes).

StatusText (string): The textual description of the evaluation status (see notes).

Timestamp (string): The date and time corresponding to the evaluation.

Example

Policy.GetRuleEvaluationHistory();

Platforms

  • Windows

  • Linux

  • MacOS

Notes

The data returned by this method may include evaluations for previous rules which are no longer active.

The amount of data available to, and returned by, this method is determined by the data retention policy - typically approx. 5000 rows.

The mapping of status codes is as follows:

0: 'Received'

1: 'CheckErrored'

2: 'CheckFailed'

3: 'CheckPassed'

4: 'FixErrored'

5: 'FixPassed'

6: 'FixFailed'

7: 'NotApplied' (the rule has been disabled by the policy manager)

8: 'PreConditionErrored'

9: 'PreConditionPassed'

10: 'PreConditionFailed'

If the policy engine has been disabled through configuration, this method returns no data.

This method will return example data (for testing) in TIMS, because TIMS uses an alternative policy engine