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

# POST /v1/{+trialName}:addTrialMeasurement

`POST /v1/{+trialName}:addTrialMeasurement`

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

- `trialName` string, required

## Request body

- GoogleCloudAiplatformV1AddTrialMeasurementRequest — Request message for VizierService.AddTrialMeasurement.
  - `measurement` GoogleCloudAiplatformV1Measurement — A message representing a Measurement of a Trial. A Measurement contains the Metrics got by executing a Trial using suggested hyperparameter values.
    - `elapsedDuration` string, google-duration — Output only. Time that the Trial has been running at the point of this Measurement.
    - `stepCount` string, int64 — Output only. The number of steps the machine learning model has been trained for. Must be non-negative.
    - `metrics` GoogleCloudAiplatformV1MeasurementMetric[] — Output only. A list of metrics got by evaluating the objective functions using suggested Parameter values.
      - `metricId` string — Output only. The ID of the Metric. The Metric should be defined in StudySpec's Metrics.
      - `value` number, double — Output only. The value for this metric.

## Response `200`

Successful response

---

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