You can call the ListVectorIndexes operation to list all vector indexes in a vector bucket.
Notes
The ListVectorIndexes operation returns a maximum of 500 indexes per call. Use paging to retrieve subsequent batches.
The maximum number of concurrent ListVectorIndexes calls is 16.
Permissions
An Alibaba Cloud account has all permissions by default. By default, Resource Access Management (RAM) users or RAM roles under an Alibaba Cloud account have no permissions. The Alibaba Cloud account owner or an administrator must grant permissions using a RAM policy or a bucket policy.
API | Action | Description |
ListVectorIndexes |
| Lists vector indexes. |
Request syntax
POST /?listVectorIndexes HTTP/1.1
Host: examplebucket-123***456.cn-hangzhou.oss-vectors.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue
Content-type: application/json
{
"maxResults": int,
"nextToken": "string",
"prefix": "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 |
maxResults | Number | No | 100 | The maximum number of indexes to return. Valid values: 0 to 500. If you do not set this parameter or set it to 0, the default value is 100. |
nextToken | String | No | myindex1 | The results start from the first entry that comes after nextToken in alphabetical order. |
prefix | String | No | my | Prefix matching for vector indexes. |
Response headers
This operation uses only common response headers. For more information, see Common HTTP headers.
Response elements
Name | Data type | Example | Description |
indexes | Array of objects | - | An array that contains information about the vector indexes. |
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 GMT. 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 | - | The metadata configuration. Parent node: index |
nonFilterableMetadataKeys | Array of strings | ["category", "timestamp"] | A list of non-filterable metadata fields. Parent node: metadata |
status | String | enable | The current status of the index. Valid values:
|
nextToken | String | myindex1 | The token to use for the next query. If not all results are returned in the current call, this token is included for subsequent queries. |
Examples
Example request
POST /?listVectorIndexes 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
Content-type: application/json
{
"maxResults": 10,
"prefix": "my"
}Example response
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
{
"indexes": [
{
"createTime": "2025-04-17T10:56:21.000Z",
"indexName": "vectorindex1",
"dataType": "float32",
"dimension": 1024,
"distanceMetric": "euclidean",
"metadata": {
"nonFilterableMetadataKeys": ["category", "timestamp"]
},
"status": "enable"
},
{
"createTime": "2025-04-17T11:20:15.000Z",
"indexName": "vectorindex2",
"dataType": "float32",
"dimension": 512,
"distanceMetric": "cosine",
"metadata": {
"nonFilterableMetadataKeys": ["type", "source"]
},
"status": "enable"
}
],
"nextToken": "myindex1"
}Error codes
Error code | HTTP status code | Description |
VectorIndexParameterInvalid | 400 | The vector index parameter in the request is invalid. |
MalformedJson | 400 | The JSON format in the request body is invalid. |
AccessDenied | 403 | Possible causes for this error:
|