- [HTTP request](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/projects.locations.apps/runEvaluation#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/projects.locations.apps/runEvaluation#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/projects.locations.apps/runEvaluation#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/projects.locations.apps/runEvaluation#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/projects.locations.apps/runEvaluation#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/projects.locations.apps/runEvaluation#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/projects.locations.apps/runEvaluation#body.aspect_1)

Runs an evaluation of the app.

### HTTP request

`POST https://ces.googleapis.com/v1beta/{app=projects/*/locations/*/apps/*}:runEvaluation`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `app` | `string` Required. The app to evaluate. Format: `projects/{project}/locations/{location}/apps/{app}` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "evaluations": [ string ], "evaluationDataset": string, "displayName": string, "appVersion": string, "config": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/EvaluationConfig`) }, "personaRunConfigs": [ { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/PersonaRunConfig`) } ], "optimizationConfig": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/OptimizationConfig`) }, "scheduledEvaluationRun": string, "goldenRunMethod": enum (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/GoldenRunMethod`), "generateLatencyReport": boolean, "evaluationRunCachingSettings": { object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/EvaluationRunCachingSettings`) }, "runCount": integer } ``` |

| Fields ||
|---|---|
| `evaluations[]` | `string` Optional. List of evaluations to run. Format: `projects/{project}/locations/{location}/apps/{app}/evaluations/{evaluation}` |
| `evaluationDataset` | `string` Optional. An evaluation dataset to run. Format: `projects/{project}/locations/{location}/apps/{app}/evaluationDatasets/{evaluationDataset}` |
| `displayName` | `string` Optional. The display name of the evaluation run. |
| `appVersion` | `string` Optional. The app version to evaluate. At most one of `appVersion` or `deployment` can be set. Format: `projects/{project}/locations/{location}/apps/{app}/versions/{version}` |
| `config` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/EvaluationConfig`)`` Optional. The configuration to use for the run. |
| `personaRunConfigs[]` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/PersonaRunConfig`)`` Optional. The configuration to use for the run per persona. |
| `optimizationConfig` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/OptimizationConfig`)`` Optional. Configuration for running the optimization step after the evaluation run. If not set, the optimization step will not be run. |
| `scheduledEvaluationRun` | `string` Optional. The resource name of the `ScheduledEvaluationRun` that is triggering this evaluation run. If this field is set, the `scheduledEvaluationRun` field on the created `EvaluationRun` resource will be populated from this value. Format: `projects/{project}/locations/{location}/apps/{app}/scheduledEvaluationRuns/{scheduledEvaluationRun}` |
| `goldenRunMethod` | ``enum (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/GoldenRunMethod`)`` Optional. The method to run the evaluation if it is a golden evaluation. If not set, default to STABLE. |
| `generateLatencyReport` | `boolean` Optional. Whether to generate a latency report for the evaluation run. |
| `evaluationRunCachingSettings` | ``object (`https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/EvaluationRunCachingSettings`)`` Optional. The caching settings to use for the evaluation run. |
| `runCount` | `integer` Optional. The number of times to run the evaluation. If not set, the default value is 1 per golden, and 5 per scenario. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/gemini-enterprise-cx/cx-agent-studio/reference/rest/v1beta/projects.locations.operations#Operation`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `
  https://www.googleapis.com/auth/ces`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `app` resource:

- `ces.apps.runEvaluation`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).