---
title: "POST /v1/projects/{projectsId}/locations/{locationsId}/indexEndpoints/{indexEndpointsId}:readIndexDatapoints"
method: POST
path: "/v1/projects/{projectsId}/locations/{locationsId}/indexEndpoints/{indexEndpointsId}:readIndexDatapoints"
tags: ["projects"]
---

# POST /v1/projects/{projectsId}/locations/{locationsId}/indexEndpoints/{indexEndpointsId}:readIndexDatapoints

`POST /v1/projects/{projectsId}/locations/{locationsId}/indexEndpoints/{indexEndpointsId}:readIndexDatapoints`

## Request

- Base URL: `https://aiplatform.googleapis.com`
- URL: `https://aiplatform.googleapis.com/v1/projects/{projectsId}/locations/{locationsId}/indexEndpoints/{indexEndpointsId}:readIndexDatapoints`
- 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`

Reads the datapoints/vectors of the given IDs. A maximum of 1000 datapoints can be retrieved in a batch.

## Path parameters

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

## Request body

- GoogleCloudAiplatformV1ReadIndexDatapointsRequest: The request message for MatchService.ReadIndexDatapoints.
  - `deployedIndexId` string: The ID of the DeployedIndex that will serve the request.
  - `ids` string[]: IDs of the datapoints to be searched for.

## Response `200`

Successful response

- GoogleCloudAiplatformV1ReadIndexDatapointsResponse: The response message for MatchService.ReadIndexDatapoints.
  - `datapoints` GoogleCloudAiplatformV1IndexDatapoint[]: The result list of datapoints.
    - `crowdingTag` GoogleCloudAiplatformV1IndexDatapointCrowdingTag: Crowding tag is a constraint on a neighbor list produced by nearest neighbor search requiring that no more than some value k' of the k neighbors returned have the same value of crowding_attribute.
      - `crowdingAttribute` string: The attribute value used for crowding. The maximum number of neighbors to return per crowding attribute value (per_crowding_attribute_num_neighbors) is configured per-query. This field is ignored if per_crowding_attribute_num_neighbors is larger than the total number of neighbors to return for a given query.
    - `datapointId` string: Required. Unique identifier of the datapoint.
    - `embeddingMetadata` object: Optional. The key-value map of additional metadata for the datapoint.
    - `featureVector` number[]: Required. Feature embedding vector for dense index. An array of numbers with the length of [NearestNeighborSearchConfig.dimensions].
    - `numericRestricts` GoogleCloudAiplatformV1IndexDatapointNumericRestriction[]: Optional. List of Restrict of the datapoint, used to perform "restricted searches" where boolean rule are used to filter the subset of the database eligible for matching. This uses numeric comparisons.
      - `namespace` string: The namespace of this restriction. e.g.: cost.
      - `op` 'OPERATOR_UNSPECIFIED' | 'LESS' | 'LESS_EQUAL' | 'EQUAL' | 'GREATER_EQUAL' | 'GREATER' | 'NOT_EQUAL': This MUST be specified for queries and must NOT be specified for datapoints.
      - `valueDouble` number, double: Represents 64 bit float.
      - `valueFloat` number, float: Represents 32 bit float.
      - `valueInt` string, int64: Represents 64 bit integer.
    - `restricts` GoogleCloudAiplatformV1IndexDatapointRestriction[]: Optional. List of Restrict of the datapoint, used to perform "restricted searches" where boolean rule are used to filter the subset of the database eligible for matching. This uses categorical tokens. See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
      - `allowList` string[]: The attributes to allow in this namespace. e.g.: 'red'
      - `denyList` string[]: The attributes to deny in this namespace. e.g.: 'blue'
      - `namespace` string: The namespace of this restriction. e.g.: color.
    - `sparseEmbedding` GoogleCloudAiplatformV1IndexDatapointSparseEmbedding: Feature embedding vector for sparse index. An array of numbers whose values are located in the specified dimensions.
      - `dimensions` string[]: Required. The list of indexes for the embedding values of the sparse vector.
      - `values` number[]: Required. The list of embedding values of the sparse vector.

---

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