Use this file to discover all available pages before exploring further.
For LLM agents: documentation index at /llms.txt, full text at /llms-full.txt. Append .md to any page URL for plain markdown.
The Freshness API enables monitoring and validation of data freshness. Use it to check if your data is up-to-date and trigger on-demand freshness checks.
The SDK provides a convenient gate pattern for pipelines:
from anomalyarmor import Clientfrom anomalyarmor.exceptions import StalenessErrorclient = Client()try: # Raises StalenessError if data is stale client.freshness.require_fresh("snowflake.prod.warehouse.orders") print("Data is fresh, proceeding...")except StalenessError as e: print(f"Data is stale: last updated {e.last_updated}") raise # Fail the pipeline
Use require_fresh() in Airflow tasks to automatically fail pipelines when upstream data is stale. See the Airflow Integration guide.
What’s the difference between the async and sync refresh calls?
Without wait=true, POST /freshness/{id}/refresh returns immediately with a job_id and status=pending. With wait=true, the request blocks until the check completes and returns the actual is_fresh result. Use async for fire-and-forget cron triggers and sync when a pipeline needs the answer before proceeding.
How do I gate an Airflow or dbt pipeline on freshness?
In Python, call client.freshness.require_fresh("...") which raises StalenessError when stale, which fails the task cleanly. In shell, run armor freshness check <asset> and rely on exit code 1 for stale. The Airflow integration guide shows the full DAG pattern.
Each asset has a threshold_hours configured from the dashboard (Freshness tab on the asset page) or inferred from historical update cadence. The API response shows the active threshold_hours next to hours_since_update so you can display both in your own UI.
unknown means AnomalyArmor hasn’t yet observed enough update history to decide, typically for newly connected assets or tables that haven’t been written to since the source was connected. Trigger a refresh to get a current read, and give the asset a few update cycles for the baseline to fill in.