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

# POST /v1/{+parent}/trials

`POST /v1/{+parent}/trials`

Adds a user provided Trial to a Study.

## Path parameters

- `parent` string, required

## Request body

- GoogleCloudAiplatformV1Trial — A message representing a Trial. A Trial contains a unique set of Parameters that has been or will be evaluated, along with the objective metrics got by running the Trial.
  - `customJob` string — Output only. The CustomJob name linked to the Trial. It's set for a HyperparameterTuningJob's Trial.
  - `webAccessUris` object — Output only. URIs for accessing [interactive shells](https://cloud.google.com/vertex-ai/docs/training/monitor-debug-interactive-shell) (one URI for each training node). Only available if this trial is part of a HyperparameterTuningJob and the job's trial_job_spec.enable_web_access field is `true`. The keys are names of each node used for the trial; for example, `workerpool0-0` for the primary node, `workerpool1-0` for the first node in the second worker pool, and `workerpool1-1` for the second node in the second worker pool. The values are the URIs for each node's interactive shell.
  - `clientId` string — Output only. The identifier of the client that originally requested this Trial. Each client is identified by a unique client_id. When a client asks for a suggestion, Vertex AI Vizier will assign it a Trial. The client should evaluate the Trial, complete it, and report back to Vertex AI Vizier. If suggestion is asked again by same client_id before the Trial is completed, the same Trial will be returned. Multiple clients with different client_ids can ask for suggestions simultaneously, each of them will get their own Trial.
  - `startTime` string, google-datetime — Output only. Time when the Trial was started.
  - `measurements` GoogleCloudAiplatformV1Measurement[] — Output only. A list of measurements that are strictly lexicographically ordered by their induced tuples (steps, elapsed_duration). These are used for early stopping computations.
    - `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.
  - `endTime` string, google-datetime — Output only. Time when the Trial's status changed to `SUCCEEDED` or `INFEASIBLE`.
  - `name` string — Output only. Resource name of the Trial assigned by the service.
  - `id` string — Output only. The identifier of the Trial assigned by the service.
  - `infeasibleReason` string — Output only. A human readable string describing why the Trial is infeasible. This is set only if Trial state is `INFEASIBLE`.
  - `finalMeasurement` 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.
  - `state` 'STATE_UNSPECIFIED' | 'REQUESTED' | 'ACTIVE' | 'STOPPING' | 'SUCCEEDED' | 'INFEASIBLE' — Output only. The detailed state of the Trial.
  - `parameters` GoogleCloudAiplatformV1TrialParameter[] — Output only. The parameters of the Trial.
    - `value` unknown
    - `parameterId` string — Output only. The ID of the parameter. The parameter should be defined in StudySpec's Parameters.

## 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)
