---
title: "write metrics"
method: PUT
path: "/report/metrics"
tags: ["Report"]
---

# write metrics

`PUT /report/metrics`

Put a metrics object to datastore

## Request body

- Metrics — A single Metrics object
  - `id` string — Object id. Derived from metric properties.
  - `metric_id` string — Specific identifier for this metrics, regardless of point in time. Exact value depends on metric type
  - `metric_type` string — Specific type/class of metric
  - `interval_type` 'event' | 'day' | 'hour' — Description of the interval type
  - `interval_start` integer — interval start time
  - `interval_end` integer — interval end time
  - `organization_id` string — organization this metric is for
  - `appliction_id` string — appication this metric is for
  - `environment_id` string — environment this metric is for
  - `execution_count` integer — Count of executions
  - `failed_count` integer — Count of failures
  - `passed_count` integer — Count of passes
  - `raw_value` integer — Raw value used in anomaly detection
  - `tests_passing` integer — Count of passes
  - `tests_failing` integer — Count of passes
  - `scripts_passing` integer — Count of passes
  - `scripts_failing` integer — Count of passes
  - `run_time_sum_squared` integer — Count of passes
  - `run_time_sum` integer — Count of passes

## Response `200`

Metrics written.

- Metrics — A single Metrics object
  - `id` string — Object id. Derived from metric properties.
  - `metric_id` string — Specific identifier for this metrics, regardless of point in time. Exact value depends on metric type
  - `metric_type` string — Specific type/class of metric
  - `interval_type` 'event' | 'day' | 'hour' — Description of the interval type
  - `interval_start` integer — interval start time
  - `interval_end` integer — interval end time
  - `organization_id` string — organization this metric is for
  - `appliction_id` string — appication this metric is for
  - `environment_id` string — environment this metric is for
  - `execution_count` integer — Count of executions
  - `failed_count` integer — Count of failures
  - `passed_count` integer — Count of passes
  - `raw_value` integer — Raw value used in anomaly detection
  - `tests_passing` integer — Count of passes
  - `tests_failing` integer — Count of passes
  - `scripts_passing` integer — Count of passes
  - `scripts_failing` integer — Count of passes
  - `run_time_sum_squared` integer — Count of passes
  - `run_time_sum` integer — Count of passes

## Other responses

- `default` — Unexpected error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
