Internal

Write up to 500 metric values, atomically (#5034)

Changed on

Any refused row refuses the batch, so a replay lands whole or not at all. Single writer: each row's writer must equal its definition's writer and its run's writer, and is never app-compute, the in-app job (wrong_writer); an unknown key, version or run is unknown_metric, unknown_version or unknown_run; a superseded version, or a version below the stored row's, is version_conflict (409). Upsert key (metric_key, grain, period_start, segment): an older source_as_of is ignored (stale_ignored); the same source_as_of and content moves only computed_at and job_run_id (unchanged); anything else replaces the row. The writer colors values; the server checks the state against the lines, n and min_n but never recolors. The writer's Google-signed ID token only.

post/internal/company-metrics/values

Request

  • Base URL
    https://api.medianfi.com/api/v1
  • Auth
    HTTP bearer

Request body

object required
job_run_id, string

When given, every row must name this run.

rows, CompanyMetricValueRow[] required

Response

Accepted

object required
success, true required
data, object required

Changes