Get schema changes
curl --request GET \
--url http://localhost:8000/api/v1/assets/{asset_id}/schema-changescurl --request GET \
--url http://localhost:8000/api/v1/assets/{asset_id}/schema-changesimport requests
url = "http://localhost:8000/api/v1/assets/{asset_id}/schema-changes"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:8000/api/v1/assets/{asset_id}/schema-changes', 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 Schema Changes
Retrieve recent schema changes detected for an asset
GET
/
api
/
v1
/
assets
/
{asset_id}
/
schema-changes
Get schema changes
curl --request GET \
--url http://localhost:8000/api/v1/assets/{asset_id}/schema-changescurl --request GET \
--url http://localhost:8000/api/v1/assets/{asset_id}/schema-changesimport requests
url = "http://localhost:8000/api/v1/assets/{asset_id}/schema-changes"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:8000/api/v1/assets/{asset_id}/schema-changes', 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.
Get the history of schema changes for an asset. Use this to track drift, understand what changed, and build change management workflows.
When to Use
- Change tracking: Monitor schema drift over time
- Impact analysis: Understand what changed before troubleshooting
- Compliance: Audit schema modifications
- Integration: Sync changes to external systems
SDK & CLI Examples
from anomalyarmor import Client
client = Client(api_key="aa_live_xxx")
# Get schema changes from last 7 days
changes = client.schema.changes(
"snowflake.prod.public.orders",
days_back=7
)
for change in changes:
print(f"{change.change_type}: {change.object_name}")
print(f" Detected: {change.detected_at}")
if change.old_value:
print(f" Before: {change.old_value}")
if change.new_value:
print(f" After: {change.new_value}")
# Filter by change type
removals = client.schema.changes(
"snowflake.prod.public.orders",
change_type="column_removed"
)
# Get recent changes
anomalyarmor schema changes snowflake.prod.public.orders
# Filter by days
anomalyarmor schema changes snowflake.prod.public.orders --days 7
# Filter by change type
anomalyarmor schema changes snowflake.prod.public.orders --type column_removed
# Output as JSON
anomalyarmor schema changes snowflake.prod.public.orders --format json
Parameters
| Parameter | Type | Description |
|---|---|---|
asset_id | string | Asset ID or qualified name |
days_back | integer | Look back this many days (default: 30) |
change_type | string | Filter by type (see Change Types below) |
limit | integer | Max results (default: 100) |
Response
{
"asset": "snowflake.prod.public.orders",
"changes": [
{
"id": "chg_abc123",
"change_type": "column_removed",
"object_name": "status",
"object_type": "column",
"old_value": {
"name": "status",
"data_type": "varchar(20)",
"nullable": true
},
"new_value": null,
"detected_at": "2024-01-15T08:30:00Z",
"discovery_id": "disc_xyz789"
},
{
"id": "chg_def456",
"change_type": "column_added",
"object_name": "fulfillment_status",
"object_type": "column",
"old_value": null,
"new_value": {
"name": "fulfillment_status",
"data_type": "varchar(50)",
"nullable": true
},
"detected_at": "2024-01-15T08:30:00Z",
"discovery_id": "disc_xyz789"
}
],
"total": 2
}
Response Fields
| Field | Description |
|---|---|
id | Unique change identifier |
change_type | Type of change (see Change Types) |
object_name | Name of changed column or table |
object_type | column or table |
old_value | Previous state (null for additions) |
new_value | New state (null for removals) |
detected_at | When the change was discovered |
discovery_id | Discovery run that found this change |
Change Types
| Type | Description | Impact |
|---|---|---|
column_added | New column appeared | Low - usually safe |
column_removed | Column no longer exists | High - breaks queries |
column_type_changed | Data type modified | Medium - may affect logic |
column_renamed | Detected as remove + add | High - breaks queries |
table_added | New table discovered | Low - informational |
table_removed | Table no longer exists | High - breaks queries |
constraint_changed | PK, FK, or unique modified | Medium - may affect joins |
Error Responses
| Status | Meaning |
|---|---|
401 | Invalid or missing API key |
404 | Asset not found |
429 | Rate limit exceeded |
Headers
Path Parameters
Query Parameters
Days to look back for changes
Required range:
1 <= x <= 365Was this page helpful?
