Call the GetVectorIndex operation to obtain the details of a vector index.
Permissions
An Alibaba Cloud account has all permissions by default. In contrast, Resource Access Management (RAM) users and RAM roles do not have any permissions by default. The Alibaba Cloud account owner or an administrator must grant permissions using a RAM policy or a bucket policy.
API | Action | Description |
GetVectorIndex |
| Obtains information about a vector index. |
Request syntax
POST /?getVectorIndex HTTP/1.1
Host: examplebucket-123***456.cn-hangzhou.oss-vectors.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue
{
"indexName": "string"
}Request headers
This operation uses only common request headers. For more information, see Common HTTP headers.
Request parameters
Name | Data type | Required | Example | Description |
indexName | String | Yes | vectorindex1 | The name of the index. |
Response headers
This operation uses only common response headers. For more information, see Common HTTP headers.
Response elements
Name | Data type | Example | Description |
index | Container | - | A container for the vector index information. |
indexName | String | vectorindex1 | The name of the index. Parent node: index |
createTime | String | 2025-04-17T10:56:21.000Z | The time when the index was created. The time is in the GMT format. Parent node: index |
dataType | String | float32 | The data type of the vector. Parent node: index |
dimension | Integer | 1024 | The vector dimensions. Parent node: index |
distanceMetric | String | euclidean | The distance measure function. Parent node: index |
metadata | Container | N/A | The metadata configuration. Parent node: index |
nonFilterableMetadataKeys | Array of strings | ["category", "timestamp"] | The list of non-filterable metadata fields. Parent node: metadata |
status | String | enable | The current status of the index. Valid values:
|
Examples
Request example
POST /?getVectorIndex HTTP/1.1
Host: examplebucket-123***456.cn-hangzhou.oss-vectors.aliyuncs.com
Date: Thu, 17 Apr 2025 01:33:47 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218
{
"indexName": "vectorindex1"
}Response example
HTTP/1.1 200 OK
x-oss-request-id: 534B371674E88A4D8906****
Date: Thu, 17 Apr 2025 01:33:47 GMT
Connection: keep-alive
Server: AliyunOSS
Content-type: application/json
{
"index": {
"createTime": "2025-04-17T10:56:21.000Z",
"dataType": "float32",
"dimension": 1024,
"distanceMetric": "euclidean",
"metadata": {
"nonFilterableMetadataKeys": ["category", "timestamp"]
},
"status": "enable"
}
}Error codes
Error code | HTTP status code | Description |
VectorIndexParameterInvalid | 400 | The vector index parameters provided in the request are invalid. |
MalformedJson | 400 | The JSON format of the request body is invalid. |
AccessDenied | 403 | This error is returned for the following possible reasons:
|
NoSuchVectorIndex | 404 | The specified vector index does not exist. |