Skip to main content
GET
/
api
/
v1
/
assets
/
{asset_id}
/
freshness
Get Asset Freshness Overview
curl --request GET \
  --url http://localhost:8000/api/v1/assets/{asset_id}/freshness
{
  "success": true,
  "data": null,
  "message": "<string>",
  "error": "<string>",
  "meta": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.anomalyarmor.ai/llms.txt

Use this file to discover all available pages before exploring further.

Check whether data is fresh or stale. Use this to gate pipelines, build monitoring dashboards, or verify SLA compliance.

When to Use

  • Pipeline gating: Fail jobs if upstream data is stale
  • Dashboards: Show freshness status in monitoring tools
  • SLA tracking: Verify data meets freshness requirements
  • Alerting integration: Build custom alert workflows

SDK & CLI Examples

from anomalyarmor import Client
from anomalyarmor.exceptions import StalenessError

client = Client(api_key="aa_live_xxx")

# Check freshness for a single asset
freshness = client.freshness.get("snowflake.prod.public.orders")
print(f"Status: {freshness.status}")
print(f"Last updated: {freshness.last_updated}")
print(f"SLA threshold: {freshness.sla_threshold}")

# Require fresh data (raises StalenessError if stale)
try:
    client.freshness.require_fresh("snowflake.prod.public.orders")
    print("Data is fresh, safe to proceed")
except StalenessError as e:
    print(f"Data is stale! Last update: {e.last_updated}")

Parameters

ParameterTypeDescription
asset_idstringAsset ID or qualified name

Response

{
  "asset": "snowflake.prod.public.orders",
  "status": "fresh",
  "last_updated": "2024-01-15T08:30:00Z",
  "sla_threshold": "2h",
  "sla_status": "within_sla",
  "checked_at": "2024-01-15T09:00:00Z",
  "timestamp_column": "created_at",
  "data_age_minutes": 30
}

Response Fields

FieldDescription
statusfresh, stale, or unknown
last_updatedTimestamp of most recent data in the table
sla_thresholdConfigured freshness SLA (e.g., “2h”, “24h”)
sla_statuswithin_sla, warning, or violated
checked_atWhen this freshness check ran
timestamp_columnColumn used to determine freshness
data_age_minutesHow old the data is in minutes

Status Values

StatusMeaning
freshData updated within SLA threshold
staleData older than SLA threshold
unknownNo timestamp column configured or no data

Error Responses

StatusMeaning
401Invalid or missing API key
404Asset not found
422No freshness configuration for this asset
429Rate limit exceeded

Headers

Authorization
string

Path Parameters

asset_id
string<uuid>
required

Query Parameters

limit
integer
default:20

Maximum tables to return

Required range: 1 <= x <= 100
offset
integer
default:0

Number of tables to skip

Required range: x >= 0
status_filters
string | null

Comma-separated status filters (ready,not_ready,unknown,error)

schema_filters
string | null

Comma-separated schema filters

tag_filters
string | null

Comma-separated tag filters

search_query
string | null

Search query for table names

Response

Successful Response

Standard API response wrapper.

success
boolean
required
data
unknown
message
string | null
error
string | null
meta
Meta · object