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

# POST /v1/{+parent}:batchImport

`POST /v1/{+parent}:batchImport`

Imports a list of externally generated EvaluatedAnnotations.

## Path parameters

- `parent` string, required

## Request body

- GoogleCloudAiplatformV1BatchImportEvaluatedAnnotationsRequest — Request message for ModelService.BatchImportEvaluatedAnnotations
  - `evaluatedAnnotations` GoogleCloudAiplatformV1EvaluatedAnnotation[] — Required. Evaluated annotations resource to be imported.
    - `groundTruths` unknown[] — Output only. The ground truth Annotations, i.e. the Annotations that exist in the test data the Model is evaluated on. For true positive, there is one and only one ground truth annotation, which matches the only prediction in predictions. For false positive, there are zero or more ground truth annotations that are similar to the only prediction in predictions, but not enough for a match. For false negative, there is one and only one ground truth annotation, which doesn't match any predictions created by the model. The schema of the ground truth is stored in ModelEvaluation.annotation_schema_uri
      - unknown
    - `explanations` GoogleCloudAiplatformV1EvaluatedAnnotationExplanation[] — Explanations of predictions. Each element of the explanations indicates the explanation for one explanation Method. The attributions list in the EvaluatedAnnotationExplanation.explanation object corresponds to the predictions list. For example, the second element in the attributions list explains the second element in the predictions list.
      - `explanationType` string — Explanation type. For AutoML Image Classification models, possible values are: * `image-integrated-gradients` * `image-xrai`
      - `explanation` GoogleCloudAiplatformV1Explanation — Explanation of a prediction (provided in PredictResponse.predictions) produced by the Model on a given instance.
        - `attributions` GoogleCloudAiplatformV1Attribution[] — Output only. Feature attributions grouped by predicted outputs. For Models that predict only one output, such as regression Models that predict only one score, there is only one attibution that explains the predicted output. For Models that predict multiple outputs, such as multiclass Models that predict multiple classes, each element explains one specific item. Attribution.output_index can be used to identify which output this attribution is explaining. By default, we provide Shapley values for the predicted class. However, you can configure the explanation request to generate Shapley values for any other classes too. For example, if a model predicts a probability of `0.4` for approving a loan application, the model's decision is to reject the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default Shapley values would be computed for rejection decision and not approval, even though the latter might be the positive class. If users set ExplanationParameters.top_k, the attributions are sorted by instance_output_value in descending order. If ExplanationParameters.output_indices is specified, the attributions are stored by Attribution.output_index in the same order as they appear in the output_indices.
          - `approximationError` number, double — Output only. Error of feature_attributions caused by approximation used in the explanation method. Lower value means more precise attributions. * For Sampled Shapley attribution, increasing path_count might reduce the error. * For Integrated Gradients attribution, increasing step_count might reduce the error. * For XRAI attribution, increasing step_count might reduce the error. See [this introduction](/vertex-ai/docs/explainable-ai/overview) for more information.
          - `instanceOutputValue` number, double — Output only. Model predicted output on the corresponding explanation instance. The field name of the output is determined by the key in ExplanationMetadata.outputs. If the Model predicted output has multiple dimensions, this is the value in the output located by output_index.
          - `baselineOutputValue` number, double — Output only. Model predicted output if the input instance is constructed from the baselines of all the features defined in ExplanationMetadata.inputs. The field name of the output is determined by the key in ExplanationMetadata.outputs. If the Model's predicted output has multiple dimensions (rank > 1), this is the value in the output located by output_index. If there are multiple baselines, their output values are averaged.
          - `featureAttributions` unknown
          - `outputName` string — Output only. Name of the explain output. Specified as the key in ExplanationMetadata.outputs.
          - `outputIndex` integer[] — Output only. The index that locates the explained prediction output. If the prediction output is a scalar value, output_index is not populated. If the prediction output has multiple dimensions, the length of the output_index list is the same as the number of dimensions of the output. The i-th element in output_index is the element index of the i-th dimension of the output vector. Indices start from 0.
          - `outputDisplayName` string — Output only. The display name of the output identified by output_index. For example, the predicted class name by a multi-classification Model. This field is only populated iff the Model predicts display names as a separate field along with the explained output. The predicted display name must has the same shape of the explained output, and can be located using output_index.
        - `neighbors` GoogleCloudAiplatformV1Neighbor[] — Output only. List of the nearest neighbors for example-based explanations. For models deployed with the examples explanations feature enabled, the attributions field is empty and instead the neighbors field is populated.
          - `neighborId` string — Output only. The neighbor id.
          - `neighborDistance` number, double — Output only. The neighbor distance.
    - `dataItemPayload` unknown
    - `predictions` unknown[] — Output only. The model predicted annotations. For true positive, there is one and only one prediction, which matches the only one ground truth annotation in ground_truths. For false positive, there is one and only one prediction, which doesn't match any ground truth annotation of the corresponding data_item_view_id. For false negative, there are zero or more predictions which are similar to the only ground truth annotation in ground_truths but not enough for a match. The schema of the prediction is stored in ModelEvaluation.annotation_schema_uri
      - unknown
    - `evaluatedDataItemViewId` string — Output only. ID of the EvaluatedDataItemView under the same ancestor ModelEvaluation. The EvaluatedDataItemView consists of all ground truths and predictions on data_item_payload.
    - `errorAnalysisAnnotations` GoogleCloudAiplatformV1ErrorAnalysisAnnotation[] — Annotations of model error analysis results.
      - `attributedItems` GoogleCloudAiplatformV1ErrorAnalysisAnnotationAttributedItem[] — Attributed items for a given annotation, typically representing neighbors from the training sets constrained by the query type.
        - `annotationResourceName` string — The unique ID for each annotation. Used by FE to allocate the annotation in DB.
        - `distance` number, double — The distance of this item to the annotation.
      - `outlierThreshold` number, double — The threshold used to determine if this annotation is an outlier or not.
      - `queryType` 'QUERY_TYPE_UNSPECIFIED' | 'ALL_SIMILAR' | 'SAME_CLASS_SIMILAR' | 'SAME_CLASS_DISSIMILAR' — The query type used for finding the attributed items.
      - `outlierScore` number, double — The outlier score of this annotated item. Usually defined as the min of all distances from attributed items.
    - `type` 'EVALUATED_ANNOTATION_TYPE_UNSPECIFIED' | 'TRUE_POSITIVE' | 'FALSE_POSITIVE' | 'FALSE_NEGATIVE' — Output only. Type of the EvaluatedAnnotation.

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