Api Create Semantic Metric
Control Plane
Api Create Semantic Metric
Legacy compatibility API: create a metric directly in both environments (no PR).
The current portal does not use this route; its Metrics catalog is read-only and new metric
work goes through an Assistant staging proposal and release checkpoint. Existing API callers
retain the older dual-environment behavior described below.
Body: {name, label?, description?, mart (ref('mart_x') or 'mart_x'), grain?, agg, expr,
status?}. The definition (agg over expr) is validated by RUNNING it against the staging
marts in the bound warehouse before anything is written; on success the metric (and its measure) are
added to that mart's semantic YAML in both the staging and prod workspaces and committed
directly to both git branches. Requires GitHub configured. Permission: create_proposals.
POST
Api Create Semantic Metric
Response
200 - application/json
Successful Response