Solved! The issue required addressing all three areas - schema cache invalidation, widget config update, and API metadata sync:
1. Schema Cache Invalidation: Force schema refresh for the data source:
POST /api/v1/datasources/erp_sales/refresh-schema
{
"forceCacheInvalidation": true,
"propagateToCluster": true
}
The forceCacheInvalidation flag is critical - without it, cached schema persists.
2. Widget Config Update: After schema refresh, verify metadata and update widgets:
// Verify new schema is visible
GET /api/v1/datasources/erp_sales/metadata
// Confirms: "total_revenue" field now present
// Update widget with new field names
PUT /api/v1/dashboards/widgets/sales_summary
{
"dataSource": "erp_sales",
"fields": ["total_revenue", "units_sold", "region"],
"forceRefresh": true
}
3. API Metadata Sync: Wait for cluster-wide propagation (5-10 minutes) or check sync status:
GET /api/v1/datasources/erp_sales/sync-status
// Returns: {"syncComplete": true, "lastSyncTime": "2025-06-11T13:15:00Z"}
Key discovery: Widgets using templates required template updates first:
PUT /api/v1/dashboards/templates/sales_template
{
"fields": ["total_revenue", "units_sold", "region"]
}
// Then re-instantiate widgets from updated template
POST /api/v1/dashboards/widgets/from-template
{
"templateId": "sales_template",
"widgetId": "sales_summary"
}
Without forceCacheInvalidation: true and propagateToCluster: true, schema refresh was only partial. Also, template-based widgets ignore direct widget updates - always update templates first. After following this sequence, all widgets now display correct data with updated field names.