> ## Documentation Index
> Fetch the complete documentation index at: https://docs.siftstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# rule_evaluation

> sift/rule_evaluation/v1/rule_evaluation.proto

<a name="sift_rule_evaluation_v1_rule_evaluation-proto" />

<a name="sift_rule_evaluation_v1_rule_evaluation-proto-services" />

## Services

*RPC methods exposed by this API.*

### RuleEvaluationService

| Method               | Request                                                     | Response                                                      | Description                                                                                                                                           |
| :------------------- | :---------------------------------------------------------- | :------------------------------------------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------- |
| EvaluateRules        | [EvaluateRulesRequest](#evaluaterulesrequest)               | [EvaluateRulesResponse](#evaluaterulesresponse)               | Evaluate rules from a designated source against a run or asset and return the total amount of annotations created and the ID of the generated report. |
| EvaluateRulesPreview | [EvaluateRulesPreviewRequest](#evaluaterulespreviewrequest) | [EvaluateRulesPreviewResponse](#evaluaterulespreviewresponse) | Perform a dry run evaluation for existing rules or rule configurations against a run and return the annotations that would be generated.              |

<a name="sift_rule_evaluation_v1_rule_evaluation-proto-messages" />

## Messages

*Data models used across requests/responses.*

### AssetsTimeRange

| Field       | Type                                                                      | Label | Description |
| :---------- | :------------------------------------------------------------------------ | :---- | :---------- |
| assets      | [sift.common.type.v1.NamedResources](#sift-common-type-v1-namedresources) |       |             |
| start\_time | google.protobuf.Timestamp                                                 |       |             |
| end\_time   | google.protobuf.Timestamp                                                 |       |             |

### EvaluateRulesAnnotationOptions

| Field | Type                                                                      | Label | Description |
| :---- | :------------------------------------------------------------------------ | :---- | :---------- |
| tags  | [sift.common.type.v1.NamedResources](#sift-common-type-v1-namedresources) |       |             |

### EvaluateRulesFromCurrentRuleVersions

| Field | Type                                                                                | Label | Description |
| :---- | :---------------------------------------------------------------------------------- | :---- | :---------- |
| rules | [sift.common.type.v1.ResourceIdentifiers](#sift-common-type-v1-resourceidentifiers) |       |             |

### EvaluateRulesFromReportTemplate

| Field            | Type                                                                              | Label | Description |
| :--------------- | :-------------------------------------------------------------------------------- | :---- | :---------- |
| report\_template | [sift.common.type.v1.ResourceIdentifier](#sift-common-type-v1-resourceidentifier) |       |             |

### EvaluateRulesFromRuleConfigs

| Field   | Type                                                                | Label    | Description |
| :------ | :------------------------------------------------------------------ | :------- | :---------- |
| configs | [sift.rules.v1.UpdateRuleRequest](#sift-rules-v1-updaterulerequest) | repeated |             |

### EvaluateRulesFromRuleVersions

| Field              | Type   | Label    | Description |
| :----------------- | :----- | :------- | :---------- |
| rule\_version\_ids | string | repeated |             |

### EvaluateRulesPreviewRequest

| Field                        | Type                                                                              | Label | Description                                                  |
| :--------------------------- | :-------------------------------------------------------------------------------- | :---- | :----------------------------------------------------------- |
| oneof time. run              | [sift.common.type.v1.ResourceIdentifier](#sift-common-type-v1-resourceidentifier) |       |                                                              |
| oneof time. run\_time\_range | [RunTimeRange](#runtimerange)                                                     |       |                                                              |
| oneof mode. rules            | [EvaluateRulesFromCurrentRuleVersions](#evaluaterulesfromcurrentruleversions)     |       |                                                              |
| oneof mode. rule\_versions   | [EvaluateRulesFromRuleVersions](#evaluaterulesfromruleversions)                   |       |                                                              |
| oneof mode. report\_template | [EvaluateRulesFromReportTemplate](#evaluaterulesfromreporttemplate)               |       |                                                              |
| oneof mode. rule\_configs    | [EvaluateRulesFromRuleConfigs](#evaluaterulesfromruleconfigs)                     |       |                                                              |
| organization\_id             | string                                                                            |       | Only required if your user belongs to multiple organizations |

### EvaluateRulesPreviewResponse

| Field                      | Type                                                              | Label    | Description |
| :------------------------- | :---------------------------------------------------------------- | :------- | :---------- |
| created\_annotation\_count | int32                                                             |          |             |
| dry\_run\_annotations      | [sift.rules.v1.DryRunAnnotation](#sift-rules-v1-dryrunannotation) | repeated |             |

### EvaluateRulesRequest

| Field                              | Type                                                                              | Label    | Description                                                                   |
| :--------------------------------- | :-------------------------------------------------------------------------------- | :------- | :---------------------------------------------------------------------------- |
| oneof time. run                    | [sift.common.type.v1.ResourceIdentifier](#sift-common-type-v1-resourceidentifier) |          |                                                                               |
| oneof time. assets                 | [AssetsTimeRange](#assetstimerange)                                               |          |                                                                               |
| oneof time. run\_time\_range       | [RunTimeRange](#runtimerange)                                                     |          |                                                                               |
| oneof mode. rules                  | [EvaluateRulesFromCurrentRuleVersions](#evaluaterulesfromcurrentruleversions)     |          |                                                                               |
| oneof mode. rule\_versions         | [EvaluateRulesFromRuleVersions](#evaluaterulesfromruleversions)                   |          |                                                                               |
| oneof mode. report\_template       | [EvaluateRulesFromReportTemplate](#evaluaterulesfromreporttemplate)               |          |                                                                               |
| oneof mode. all\_applicable\_rules | bool                                                                              |          |                                                                               |
| annotation\_options                | [EvaluateRulesAnnotationOptions](#evaluaterulesannotationoptions)                 |          |                                                                               |
| organization\_id                   | string                                                                            |          | Only required if your user belongs to multiple organizations                  |
| report\_name                       | string                                                                            | optional | If this request creates a report, this field will be used as the report name. |

### EvaluateRulesResponse

| Field                      | Type   | Label    | Description                                                                                 |
| :------------------------- | :----- | :------- | :------------------------------------------------------------------------------------------ |
| created\_annotation\_count | int32  |          |                                                                                             |
| report\_id                 | string | optional | A report will be generated if rules were evaluated against a run.                           |
| job\_id                    | string | optional | This will be set if the job has an extended run time and is being processed asynchronously. |

### RunTimeRange

| Field       | Type                                                                              | Label    | Description |
| :---------- | :-------------------------------------------------------------------------------- | :------- | :---------- |
| run         | [sift.common.type.v1.ResourceIdentifier](#sift-common-type-v1-resourceidentifier) |          |             |
| start\_time | google.protobuf.Timestamp                                                         | optional |             |
| end\_time   | google.protobuf.Timestamp                                                         | optional |             |

<a name="sift_rule_evaluation_v1_rule_evaluation-proto-enums" />

## Enums

*Allowed constant values used in message fields.*
