---
title: "POST /v1/{+name}:addMeasurement"
method: POST
path: "/v1/{+name}:addMeasurement"
tags: ["projects"]
---

# POST /v1/{+name}:addMeasurement

`POST /v1/{+name}:addMeasurement`

Adds a measurement of the objective metrics to a trial. This measurement is assumed to have been taken before the trial is complete.

## Path parameters

- `name` string, required

## Request body

- GoogleCloudMlV1AddTrialMeasurementRequest — The request message for the AddTrialMeasurement service method.
  - `measurement` GoogleCloudMlV1Measurement — A message representing a measurement.
    - `elapsedTime` string, google-duration — Output only. Time that the trial has been running at the point of this measurement.
    - `metrics` GoogleCloudMlV1MeasurementMetric[] — Provides a list of metrics that act as inputs into the objective function.
      - `value` number, double — Required. The value for this metric.
      - `metric` string — Required. Metric name.
    - `stepCount` string, int64 — The number of steps a machine learning model has been trained for. Must be non-negative.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/ml.md) · [All operations](https://skmtc.net/google/apis/ml/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/ml/versions/2135f4d5ddf1/schema)
