APIHow-to guidesEvaluate data

Manage external Rules using the Sift API

Overview

This guide shows how to create and evaluate external Rules in Sift using the API. External Rules are ideal for automated workflows, such as CI/CD pipelines, where Rules need to be defined, updated, and evaluated programmatically. The guide covers how to create external Rules via the BatchUpdateRules endpoint, preview their behavior using EvaluateRulesPreview, and run evaluations that generate Annotations and Reports using EvaluateRules.

Use this guide when you need to automate Rule creation and execution outside the Sift web application, and want to integrate telemetry-based validation directly into your development or testing pipelines.

Note

This guide uses the Sift REST API for all examples. The same functionality is also available through the gRPC API, which supports official client libraries in Python, Go, and Rust.

Instructions

Step 1: Create an external Rule

To create an external Rule, use the BatchUpdateRules endpoint and set the isExternal flag to true. This enables a Rule to be created and evaluated ad hoc and simultaneously, which is ideal for a Rule triggered by CI/CD workflows.

Note

Once an external Rule is created, it cannot be edited through the UI or API. Only non-external Rules can be modified.

Step 2: Preview an external Rule

Before evaluating an external Rule, you can preview what Annotations would be generated using the EvaluateRulesPreview endpoint. This allows you to validate an external Rule's logic without creating a Report or saving any Annotations.

Step 3: Evaluate an external Rule

To apply an external Rule to a specific Run or Asset, use the EvaluateRules endpoint. This evaluates the Rule logic, generating a Report and potential Annotations.

On this page