rules

Protocol buffer definition for rules

sift/rules/v1/rules.proto

AnnotationActionConfiguration

FieldTypeLabelDescription
tag_idsstringrepeated
annotation_typesift.annotations.v1.AnnotationType
assigned_to_user_idstringoptional

AssetExpressionValidationResult

FieldTypeLabelDescription
asset_idstring
asset_namestring
asset_tag_idstringasset_tag_id is the tag_id that caused this asset to be included in the rule
errorstringoptional

BatchDeleteRulesRequest

BatchDeleteRulesRequest is used to delete a rule by rule_id or client_key. For each rule if both are provided, only rule_id will be used.

FieldTypeLabelDescription
rule_idsstringrepeated
client_keysstringrepeated

BatchDeleteRulesResponse

BatchGetRuleVersionsRequest

FieldTypeLabelDescription
rule_version_idsstringrepeated

BatchGetRuleVersionsResponse

FieldTypeLabelDescription
rulesRulerepeated

BatchGetRulesRequest

BatchGetRulesRequest is used to retrieve rules by rule_ids or client_keys. If both are provided, both will be used to retrieve rules.

FieldTypeLabelDescription
rule_idsstringrepeated
client_keysstringrepeated

BatchGetRulesResponse

FieldTypeLabelDescription
rulesRulerepeated

BatchUndeleteRulesRequest

BatchUndeleteRulesRequest is used to delete a rule by rule_id or client_key. For each rule if both are provided, only rule_id will be used.

FieldTypeLabelDescription
rule_idsstringrepeated
client_keysstringrepeated

BatchUndeleteRulesResponse

BatchUpdateRulesRequest

FieldTypeLabelDescription
rulesUpdateRuleRequestrepeatedrules are limited 1000 rules at a time
validate_onlyboolIf validate_only is true, the request will only validate the request and not save the rules.
override_expression_validationboolIf override_expression_validation is true, the request will save the rules even if the expressions are invalid. This can be useful for multi-asset rules where an invalid expression for one asset should not prevent the rule from being saved.

BatchUpdateRulesResponse

FieldTypeLabelDescription
successbool
rules_created_countint32The total number of rules created in the request. If validate_only is true, this will indicate how many rules would have been created.
rules_updated_countint32The total number of rules updated in the request. If validate_only is true, this will indicate how many rules would have been updated.
validate_onlyboolThis will be true if the request only validated the request and did not save the rules.
validation_resultsValidationResultrepeatedOne ValidationResult per rule in the request will be returned

CalculatedChannelConfig

FieldTypeLabelDescription
channel_referencesCalculatedChannelConfig.ChannelReferencesEntryrepeated
expressionstring

CalculatedChannelConfig.ChannelReferencesEntry

FieldTypeLabelDescription
keystring
valueChannelReference

ChannelReference

FieldTypeLabelDescription
namestring
componentstring

ContextualChannels

FieldTypeLabelDescription
channelsChannelReferencerepeated

CreateRuleRequest

FieldTypeLabelDescription
updateUpdateRuleRequest

CreateRuleResponse

FieldTypeLabelDescription
rule_idstring

DeleteRuleRequest

DeleteRuleRequest is used to delete a rule by rule_id or client_key. If both are provided, only rule_id will be used.

FieldTypeLabelDescription
rule_idstring
client_keystring

DeleteRuleResponse

DryRunAnnotation

FieldTypeLabelDescription
condition_idstring
namestring
start_timegoogle.protobuf.Timestamp
end_timegoogle.protobuf.Timestamp
condition_version_idstring

EvaluateRulesRequest

Deprecated - use RuleEvaluationService instead.

FieldTypeLabelDescription
rule_idsstringrepeated
annotation_optionsEvaluatedAnnotationOptions
run_idstring
time_rangeTimeRangeQuery
dry_runbool

EvaluateRulesResponse

Deprecated - use RuleEvaluationService instead.

FieldTypeLabelDescription
created_annotation_countint32
dry_run_annotationsDryRunAnnotationrepeatedIf dry_run is true, this will be populated with the annotations that would be created
job_idstringoptionaljob_id and report_id will be set if the job has an extended run time and is being processed asynchronously.
report_idstringoptional

EvaluatedAnnotationOptions

FieldTypeLabelDescription
tag_idsstringrepeated

GetRuleRequest

GetRuleRequest is used to retrieve a rule by rule_id or client_key. If both are provided, only rule_id will be used.

FieldTypeLabelDescription
rule_idstring
client_keystring

GetRuleResponse

FieldTypeLabelDescription
ruleRule

GetRuleVersionRequest

FieldTypeLabelDescription
rule_version_idstring

GetRuleVersionResponse

FieldTypeLabelDescription
ruleRule

JsonRulesRequest

FieldTypeLabelDescription
asset_idstring
rules_jsonstring
organization_idstring

JsonRulesResponse

FieldTypeLabelDescription
successbool
total_rules_countint32
rules_created_countint32
rules_updated_countint32
rules_deleted_countint32
error_messagesstringoptional

LastValueThreshold

ListRuleVersionsRequest

FieldTypeLabelDescription
rule_idstring
page_sizeuint32The maximum number of Rule Versions to return. The service may return fewer than this value. If unspecified, at most 50 Rule Versions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
page_tokenstringA page token, received from a previous ListRuleVersions call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListRuleVersions must match the call that provided the page token.
filterstringA Common Expression Language (CEL) filter string. Available fields to filter by are rule_version_id, user_notes, and change_message. For further information about how to use CELs, please refer to this guide. Optional.

ListRuleVersionsResponse

FieldTypeLabelDescription
rule_versionsRuleVersionrepeated
next_page_tokenstring

NotificationActionConfiguration

FieldTypeLabelDescription
recipient_user_idsstringrepeated

Rule

FieldTypeLabelDescription
rule_idstring
asset_idstringDeprecated.
namestring
descriptionstring
is_enabledbool
created_dategoogle.protobuf.Timestamp
modified_dategoogle.protobuf.Timestamp
created_by_user_idstring
modified_by_user_idstring
organization_idstring
conditionsRuleConditionrepeated
rule_versionRuleVersion
client_keystringclient_key is a client provided identifier for the rule. It is immutable after rule creation.
asset_configurationRuleAssetConfiguration
contextual_channelsContextualChannels
deleted_dategoogle.protobuf.Timestamp

RuleAction

FieldTypeLabelDescription
rule_action_idstring
rule_condition_idstring
action_typeActionKind
configurationRuleActionConfiguration
created_dategoogle.protobuf.Timestamp
modified_dategoogle.protobuf.Timestamp
created_by_user_idstring
modified_by_user_idstring
rule_action_version_idstring

RuleActionConfiguration

FieldTypeLabelDescription
notificationNotificationActionConfiguration
annotationAnnotationActionConfiguration

RuleAssetConfiguration

FieldTypeLabelDescription
asset_idsstringrepeated
tag_idsstringrepeated

RuleCondition

FieldTypeLabelDescription
rule_condition_idstring
rule_idstring
expressionRuleConditionExpression
created_dategoogle.protobuf.Timestamp
modified_dategoogle.protobuf.Timestamp
created_by_user_idstring
modified_by_user_idstring
actionsRuleActionrepeated
rule_condition_version_idstring

RuleConditionExpression

FieldTypeLabelDescription
single_channel_comparisonSingleChannelComparisonExpressionDeprecated.
calculated_channelCalculatedChannelConfig

RuleVersion

FieldTypeLabelDescription
rule_idstring
rule_version_idstring
versionstring
created_dategoogle.protobuf.Timestamp
created_by_user_idstring
version_notesstring
generated_change_messagestring
deleted_dategoogle.protobuf.Timestamp

SearchRulesRequest

FieldTypeLabelDescription
limituint32optionalMax number of rules to return (returns all if omitted).
offsetuint32Only applies if limit provided.
orderSearchOrderoptionalOrder to sort results by (defaults to ascending).
name_matchesstring
case_sensitivebool
regexpbool
order_bystringoptional
rule_idsstringrepeatedIf provided, only returns rules with the given ids
asset_idsstringrepeatedIf provided, only returns rules that apply to the given asset ids
include_deletedbool
asset_tagssift.common.type.v1.NamedResourcesIf provided, returns rules with assets that have the given tags

SearchRulesResponse

FieldTypeLabelDescription
countuint32
rulesRulerepeatedConditions are not included in the search response. The latest version of the rule is returned.

SingleChannelComparisonExpression

Deprecated - use CalculatedChannelConfig.

FieldTypeLabelDescription
channel_componentstring
channel_namestring
comparatorConditionComparator
doubledouble
stringstring
last_valueLastValueThreshold

TimeRangeQuery

FieldTypeLabelDescription
start_timegoogle.protobuf.Timestamp
end_timegoogle.protobuf.Timestamp

UndeleteRuleRequest

UndeleteRuleRequest is used to undelete a rule by rule_id or client_key. If both are provided, only rule_id will be used.

FieldTypeLabelDescription
rule_idstring
client_keystring

UndeleteRuleResponse

UpdateActionRequest

FieldTypeLabelDescription
rule_action_idstringoptional
action_typeActionKind
configurationRuleActionConfiguration

UpdateConditionRequest

FieldTypeLabelDescription
rule_condition_idstringoptional
expressionRuleConditionExpression
actionsUpdateActionRequestrepeated

UpdateHumanFriendlyRulesRequest

Deprecated - use UpdateJsonRulesRequest.

FieldTypeLabelDescription
asset_idstring
rules_jsonstring
organization_idstring

UpdateHumanFriendlyRulesResponse

Deprecated - use UpdateJsonRulesResponse.

FieldTypeLabelDescription
successbool
rules_countint32
messagesstring

UpdateJsonRulesRequest

FieldTypeLabelDescription
requestJsonRulesRequest

UpdateJsonRulesResponse

FieldTypeLabelDescription
responseJsonRulesResponse

UpdateRuleRequest

UpdateRuleRequest is used to create or update a rule. If the rule_id or client_key is provided, the rule will be updated. If not, a new rule will be created.

FieldTypeLabelDescription
rule_idstringoptional
namestring
descriptionstring
asset_idstringDeprecated. Deprecated - use asset_configuration instead.
is_enabledbool
conditionsUpdateConditionRequestrepeated
organization_idstring
version_notesstring
client_keystringoptionalclient_key is a client provided identifier for the rule. It is immutable after being set
asset_configurationRuleAssetConfiguration
contextual_channelsContextualChannels

UpdateRuleResponse

FieldTypeLabelDescription
rule_idstring

ValidateJsonRulesRequest

FieldTypeLabelDescription
requestJsonRulesRequest

ValidateJsonRulesResponse

FieldTypeLabelDescription
responseJsonRulesResponse

ValidationResult

FieldTypeLabelDescription
rule_idstring
client_keystring
asset_expression_validation_resultsAssetExpressionValidationResultrepeatedIf the expression is invalid for an asset, one or more AssetExpressionValidationResult will be returned. This may block saving if the override_expression_validation flag is not set.
errorstringoptionalIf the rule is invalid and unable to be saved, this will contain the error message. Expression errors will be returned in the asset_expression_validation_results.

ViewHumanFriendlyRulesRequest

Deprecated - use ViewJsonRulesRequest.

FieldTypeLabelDescription
asset_idstring

ViewHumanFriendlyRulesResponse

Deprecated - use ViewJsonRulesResponse.

FieldTypeLabelDescription
rules_jsonstring

ViewJsonRulesRequest

FieldTypeLabelDescription
asset_idstring

ViewJsonRulesResponse

FieldTypeLabelDescription
rules_jsonstring

ActionKind

NameNumberDescription
ACTION_KIND_UNSPECIFIED0
NOTIFICATION1
ANNOTATION2

ConditionComparator

NameNumberDescription
CONDITION_COMPARATOR_UNSPECIFIED0
LESS_THAN1
LESS_THAN_OR_EQUAL2
GREATER_THAN3
GREATER_THAN_OR_EQUAL4
EQUAL5
NOT_EQUAL6

SearchOrder

NameNumberDescription
SEARCH_ORDER_UNSPECIFIED0
SEARCH_ORDER_ASC1
SEARCH_ORDER_DESC2

RuleService

Method NameRequest TypeResponse TypeDescription
SearchRulesSearchRulesRequestSearchRulesResponseQueries rules based on provided search parameters.
GetRuleGetRuleRequestGetRuleResponseRetrieves the latest version of a rule.
BatchGetRulesBatchGetRulesRequestBatchGetRulesResponseRetrieve multiple rules.
CreateRuleCreateRuleRequestCreateRuleResponseCreates a rule.
UpdateRuleUpdateRuleRequestUpdateRuleResponseUpdates an existing rule.
BatchUpdateRulesBatchUpdateRulesRequestBatchUpdateRulesResponseUpdates existing rules or creates rules that do not exist.
DeleteRuleDeleteRuleRequestDeleteRuleResponseDeletes a rule
BatchDeleteRulesBatchDeleteRulesRequestBatchDeleteRulesResponseDeletes multiple rules
UndeleteRuleUndeleteRuleRequestUndeleteRuleResponseUndeletes a rule
BatchUndeleteRulesBatchUndeleteRulesRequestBatchUndeleteRulesResponseUndeletes multiple rules
EvaluateRulesEvaluateRulesRequestEvaluateRulesResponseDeprecated - use RuleEvaluationService instead.
ViewHumanFriendlyRulesViewHumanFriendlyRulesRequestViewHumanFriendlyRulesResponseDeprecated - use ViewJsonRules instead. Retrieve a JSON object containing all of the rules for a given asset.
ViewJsonRulesViewJsonRulesRequestViewJsonRulesResponseDeprecated - use BatchGetRules instead. Retrieve a JSON object containing all of the rules for a given asset.
UpdateHumanFriendlyRulesUpdateHumanFriendlyRulesRequestUpdateHumanFriendlyRulesResponseDeprecated - use BatchUpdateRules instead. Batch update rules given the rules_json which is a JSON list of rules.
ValidateJsonRulesValidateJsonRulesRequestValidateJsonRulesResponseDeprecated - use BatchUpdateRules with validate_only flag instead. Validate a batch update for rules given the rules_json which is a JSON list of rules. This is a dry-run operation.
UpdateJsonRulesUpdateJsonRulesRequestUpdateJsonRulesResponseDeprecated - use BatchUpdateRules instead. Batch update rules given the rules_json which is a JSON list of rules.
ListRuleVersionsListRuleVersionsRequestListRuleVersionsResponseRetrieves a list of rule versions for the given rule.
GetRuleVersionGetRuleVersionRequestGetRuleVersionResponseRetrieves a specific version of a rule.
BatchGetRuleVersionsBatchGetRuleVersionsRequestBatchGetRuleVersionsResponseRetrieves multiple rules by rule versions.

On this page