Get Asset Freshness Overview
curl --request GET \
--url http://localhost:8000/api/v1/assets/{asset_id}/freshnesscurl --request GET \
--url http://localhost:8000/api/v1/assets/{asset_id}/freshnessimport requests
url = "http://localhost:8000/api/v1/assets/{asset_id}/freshness"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:8000/api/v1/assets/{asset_id}/freshness', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"data": null,
"message": "<string>",
"error": "<string>",
"meta": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}API Reference
Get Freshness Status
Retrieve freshness status for an asset or data source
GET
/
api
/
v1
/
assets
/
{asset_id}
/
freshness
Get Asset Freshness Overview
curl --request GET \
--url http://localhost:8000/api/v1/assets/{asset_id}/freshnesscurl --request GET \
--url http://localhost:8000/api/v1/assets/{asset_id}/freshnessimport requests
url = "http://localhost:8000/api/v1/assets/{asset_id}/freshness"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:8000/api/v1/assets/{asset_id}/freshness', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"data": null,
"message": "<string>",
"error": "<string>",
"meta": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}For LLM agents: documentation index at /llms.txt, full text at /llms-full.txt. Append .md to any page URL for plain markdown.
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}")
# Check freshness
anomalyarmor freshness check snowflake.prod.public.orders
# Output as JSON
anomalyarmor freshness check snowflake.prod.public.orders --format json
Parameters
| Parameter | Type | Description |
|---|---|---|
asset_id | string | Asset 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
| Field | Description |
|---|---|
status | fresh, stale, or unknown |
last_updated | Timestamp of most recent data in the table |
sla_threshold | Configured freshness SLA (e.g., “2h”, “24h”) |
sla_status | within_sla, warning, or violated |
checked_at | When this freshness check ran |
timestamp_column | Column used to determine freshness |
data_age_minutes | How old the data is in minutes |
Status Values
| Status | Meaning |
|---|---|
fresh | Data updated within SLA threshold |
stale | Data older than SLA threshold |
unknown | No timestamp column configured or no data |
Error Responses
| Status | Meaning |
|---|---|
401 | Invalid or missing API key |
404 | Asset not found |
422 | No freshness configuration for this asset |
429 | Rate limit exceeded |
Headers
Path Parameters
Query Parameters
Maximum tables to return
Required range:
1 <= x <= 100Number of tables to skip
Required range:
x >= 0Comma-separated status filters (ready,not_ready,unknown,error)
Comma-separated schema filters
Comma-separated tag filters
Search query for table names
Was this page helpful?
