> ## Documentation Index
> Fetch the complete documentation index at: https://docs.platinur.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Api Create Semantic Metric

> Create a governed metric and apply it DIRECTLY to both environments (no PR).

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.



## OpenAPI

````yaml /api/openapi.json post /api/semantic/metrics
openapi: 3.1.0
info:
  description: >-
    Environment-aware APIs for Platinur configuration, integrations, operations,
    promotions, scheduling, monitoring, and assistant tasks.
  title: Platinur Control Plane API
  version: 1.0.0-rc3
servers:
  - description: Local Platinur control-plane API
    url: http://localhost:8080
security: []
paths:
  /api/semantic/metrics:
    post:
      tags:
        - Control Plane
      summary: Api Create Semantic Metric
      description: >-
        Create a governed metric and apply it DIRECTLY to both environments (no
        PR).


        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.
      operationId: api_create_semantic_metric_api_semantic_metrics_post
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response

````