public-api
public-validity

Create Validity Rule

Create a new validity rule.

Requires read-write or admin scope. Accepts asset UUID, qualified name (e.g., "postgresql.mydb"), or asset name.

SDK Usage:

from anomalyarmor import Client
client = Client()
rule = client.validity.create(
    "asset-uuid",
    rule_type="NOT_NULL",
    table_path="catalog.schema.table",
    column_name="email",
    severity="critical",
)
post/api/v1/sdk/validity/{asset_id}

Request

  • Base URL: http://localhost:8000
  • URL: http://localhost:8000/api/v1/sdk/validity/{asset_id}
  • Auth: none declared

Path parameters

asset_idstring required

Headers

Authorizationstring

Request body

table_pathstring required

Fully qualified table path

column_namestring required

Column to validate

rule_type'regex_match' | 'allowed_values' | 'range_bounds' | 'format' | 'length_bounds' required

Types of validity rules.

rule_configobject required

Rule-specific configuration

namestring nullable

Optional rule name

descriptionstring nullable

Optional description

error_messagestring nullable

Custom error message

severity'error' | 'warning'

Severity levels for validity rules.

detection_mode'manual' | 'auto'

'manual' (fixed threshold) or 'auto' (learned baseline)

sensitivityinteger

1-4 stddev threshold for auto mode

operating_period_mode'off' | 'auto' | 'schedule'

Operating-period awareness (TECH-984): 'off' pools all history, 'schedule' segments by operating_schedule_id, 'auto' learns a calendar from history

operating_schedule_idstring uuid nullable

Public UUID of the operating schedule (required for 'schedule' mode)

treat_null_as_validboolean

Whether NULL values pass validation

check_interval'hourly' | 'daily' | 'weekly'

Check interval options for validity rules.

These values match what the scheduler queries for in get_due_for_check.

Response

Successful Response

successboolean required
dataunknown
messagestring nullable
errorstring nullable
metaobject nullable

Changes

No recorded changes to this operation across all 1 revision of this API.