---
title: "POST /v1/projects/{projectsId}/locations/{locationsId}/evaluationSets:import"
method: POST
path: "/v1/projects/{projectsId}/locations/{locationsId}/evaluationSets:import"
tags: ["projects"]
---

# POST /v1/projects/{projectsId}/locations/{locationsId}/evaluationSets:import

`POST /v1/projects/{projectsId}/locations/{locationsId}/evaluationSets:import`

## Request

- Base URL: `https://aiplatform.googleapis.com`
- URL: `https://aiplatform.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/evaluationSets:import`
- Auth: OAuth 2 and OAuth 2
  - Implicit: `https://accounts.google.com/o/oauth2/auth`
  - Scopes: `https://www.googleapis.com/auth/cloud-platform`
  - Authorization code: `https://accounts.google.com/o/oauth2/auth`
  - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`

Imports an Evaluation Set.

## Path parameters

- `projectsId` string, required
- `locationsId` string, required

## Request body

- GoogleCloudAiplatformV1ImportEvaluationSetRequest: Request message for EvaluationManagementService.ImportEvaluationSet.
  - `agentEngineSource` GoogleCloudAiplatformV1ImportEvaluationSetRequestAgentEngineSource: Source for loading Agent Engine sessions.
    - `location` string: Required. Location for the Agent Engine sessions.
    - `projectId` string: Required. Project ID for the Agent Engine sessions.
    - `reasoningEngineId` string: Required. Reasoning Engine ID for the Agent Engine sessions.
    - `sessionIds` string[]: Required. Session IDs for the Agent Engine sessions to retrieve.
  - `bigquerySource` GoogleCloudAiplatformV1BigQueryRequestSet: The request set for the evaluation run.
    - `candidateResponseColumns` object: Optional. Map of candidate name to candidate response column name. The column will be in evaluation_item.CandidateResponse format.
    - `promptColumn` string: Optional. The name of the column that contains the requests to evaluate. This will be in evaluation_item.EvalPrompt format.
    - `rubricsColumn` string: Optional. The name of the column that contains the rubrics. This is in evaluation_rubric.RubricGroup format.
    - `samplingConfig` GoogleCloudAiplatformV1BigQueryRequestSetSamplingConfig: The sampling config.
      - `samplingCount` integer: Optional. The total number of logged data to import. If available data is less than the sampling count, all data will be imported. Default is 100.
      - `samplingDuration` string, google-duration: Optional. How long to wait before sampling data from the BigQuery table. If not specified, defaults to 0.
      - `samplingMethod` 'SAMPLING_METHOD_UNSPECIFIED' | 'RANDOM': Optional. The sampling method to use.
    - `uri` string: Required. The URI of a BigQuery table. e.g. bq://projectId.bqDatasetId.bqTableId
  - `cloudTraceSource` GoogleCloudAiplatformV1ImportEvaluationSetRequestCloudTraceSource: Source for loading traces directly from Cloud Trace.
    - `agentResource` string: Optional. Restricts the imported spans to a single agent. Accepts either of two forms, matching `OnlineEvaluator.agent_resource`: * a project-scoped resource name, matched against the `cloud.resource_id` resource attribute that Vertex AI Agent Engine agents are stamped with; * an Agent Registry agent URN, matched against the `gen_ai.main_agent.id` resource attribute that agents on GKE, and any other runtime that stamps it, are identified by. Scopes `session_ids` selection only. Traces named explicitly in `trace_ids` are imported as given and are NOT filtered by this field, because the caller has already identified them. Setting this field with only `trace_ids` therefore has no effect. When unset, spans are selected by session or trace ID alone. That is the pre-existing behavior and it remains the correct one for a session whose agents run in several deployments, because each deployment stamps its own `gen_ai.main_agent.id` and filtering on one of them would silently truncate the trajectory.
    - `projectId` string: Required. Project ID for the Cloud Trace.
    - `sessionIds` string[]: Optional. Session IDs to import traces for. If both trace_ids and session_ids are specified, the union of the two will be imported.
    - `traceIds` string[]: Optional. Trace IDs to import.
  - `evaluationSet` GoogleCloudAiplatformV1EvaluationSet: EvaluationSet is a collection of related EvaluationItems that are evaluated together.
    - `agentConfigs` object: Optional. Static configurations for each agent associated with the items in this set. Key: `agent_id` (matches the `author` field in `events`). Value: The static configuration of the agent.
    - `createTime` string, google-datetime: Output only. Timestamp when this item was created.
    - `displayName` string: Required. The display name of the EvaluationSet.
    - `encryptionSpec` GoogleCloudAiplatformV1EncryptionSpec: Represents a customer-managed encryption key specification that can be applied to a Vertex AI resource.
      - `kmsKeyName` string: Required. Resource name of the Cloud KMS key used to protect the resource. The Cloud KMS key must be in the same region as the resource. It must have the format `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
    - `evaluationItems` string[]: Required. The EvaluationItems that are part of this dataset.
    - `metadata` unknown
    - `name` string: Identifier. The resource name of the EvaluationSet. Format: `projects/{project}/locations/{location}/evaluationSets/{evaluation_set}`
    - `updateTime` string, google-datetime: Output only. Timestamp when this item was last updated.
  - `gcsDestination` GoogleCloudAiplatformV1GcsDestination: The Google Cloud Storage location where the output is to be written to.
    - `outputUriPrefix` string: Required. Google Cloud Storage URI to output directory. If the uri doesn't end with '/', a '/' will be automatically appended. The directory is created if it doesn't exist.
  - `gcsSource` GoogleCloudAiplatformV1ImportEvaluationSetRequestGcsSource: Source for loading data from Cloud Storage.
    - `gcsUri` string: Required. The Cloud Storage location of the input data.
    - `importSchemaConfig` GoogleCloudAiplatformV1ImportEvaluationSetRequestImportSchemaConfig: Configuration for the input data format.
      - `dataFormat` 'DATA_FORMAT_UNSPECIFIED' | 'OTEL_PROTO' | 'OTEL_JSON' | 'JSONL': Required. The format of the input data.
      - `dataFormatVersion` string: Optional. Version of the data format.
  - `inlineSource` GoogleCloudAiplatformV1ImportEvaluationSetRequestInlineSource: Wrapper for inline data.
    - `content` string, byte: Required. The content of the inline data.
    - `importSchemaConfig` GoogleCloudAiplatformV1ImportEvaluationSetRequestImportSchemaConfig: Configuration for the input data format.
      - `dataFormat` 'DATA_FORMAT_UNSPECIFIED' | 'OTEL_PROTO' | 'OTEL_JSON' | 'JSONL': Required. The format of the input data.
      - `dataFormatVersion` string: Optional. Version of the data format.
  - `interactionsSource` GoogleCloudAiplatformV1ImportEvaluationSetRequestInteractionsSource: Source for importing interactions from the Interactions API into an EvaluationSet. The agent identity is specified once, with a list of interaction IDs to import.
    - `geminiAgentConfig` GoogleCloudAiplatformV1GeminiAgentConfig: Config for scraping a Gemini Agent (a Vertex AI Agent resource scraped via the Vertex Interactions API).
      - `geminiAgent` string: Required. The resource name of the Gemini Agent. Format: `projects/{project}/locations/{location}/agents/{agent}`. For example: `projects/123/locations/us-central1/agents/my-agent`.
    - `interactions` string[]: Required. The interactions to import. Format: `projects/{project}/locations/{location}/interactions/{interaction}`.

## Response `200`

Successful response

- GoogleLongrunningOperation: This resource represents a long-running operation that is the result of a network API call.
  - `done` boolean: If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  - `error` GoogleRpcStatus: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
    - `code` integer: The status code, which should be an enum value of google.rpc.Code.
    - `details` object[]: A list of messages that carry the error details. There is a common set of message types for APIs to use.
    - `message` string: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  - `metadata` object: Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
  - `name` string: The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  - `response` object: The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.

---

[API](https://skmtc.dev/google/apis/aiplatform.md) - [All operations](https://skmtc.dev/google/apis/aiplatform/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/aiplatform/revisions/3aca3b348f0c?raw)
