Skip to main content

Publish Workspace Metric Config Defaults Endpoint

POST 

/workspaces/:workspace_id/metric-config-defaults/

Publish a new default version for each metric in the request. workspace_admin only.

Each item inserts the next config_version for its metric ("1.0.0" → "2.0.0" → …); the version is server-derived, so nothing here can address or overwrite a stored row, and the prior version stays readable and unmodified. All-or-nothing: the commit happens once every item has flushed.

Returns the rows written, in request order. 403 for workspace_editor/workspace_viewer — enforced by the route dependency, not by this handler; 404 for an unknown workspace, which would otherwise surface as the row's foreign key failing mid-insert. 409 if an item's optional base_version no longer matches its lineage's current version — the guard that makes a retried identical request safe instead of silently minting an extra version.

Request​

Responses​

Successful Response