Skip to main content
GET
/
api
/
v1
/
assets
/
{asset_id}
/
schema-changes
Get Asset Schema Changes
curl --request GET \
  --url https://api.anomalyarmor.ai/api/v1/assets/{asset_id}/schema-changes
{
  "success": true,
  "data": null,
  "message": "<string>",
  "error": {},
  "meta": {}
}
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"
)

Parameters

ParameterTypeDescription
asset_idstringAsset ID or qualified name
days_backintegerLook back this many days (default: 30)
change_typestringFilter by type (see Change Types below)
limitintegerMax 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

FieldDescription
idUnique change identifier
change_typeType of change (see Change Types)
object_nameName of changed column or table
object_typecolumn or table
old_valuePrevious state (null for additions)
new_valueNew state (null for removals)
detected_atWhen the change was discovered
discovery_idDiscovery run that found this change

Change Types

TypeDescriptionImpact
column_addedNew column appearedLow - usually safe
column_removedColumn no longer existsHigh - breaks queries
column_type_changedData type modifiedMedium - may affect logic
column_renamedDetected as remove + addHigh - breaks queries
table_addedNew table discoveredLow - informational
table_removedTable no longer existsHigh - breaks queries
constraint_changedPK, FK, or unique modifiedMedium - may affect joins

Error Responses

StatusMeaning
401Invalid or missing API key
404Asset not found
429Rate limit exceeded

Path Parameters

asset_id
string<uuid>
required

Query Parameters

days_back
integer | null
default:7
Required range: x >= 1
show_dismissed
boolean
default:false
limit
integer
default:50

Number of items to return

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

Number of items to skip

Required range: x >= 0

Response

Successful Response

Standard API response format.

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