You can call ListVectorIndexes to list all vector indexes within a vector bucket.
Important notes
ListVectorIndexes returns up to 500 indexes per call. Use pagination to retrieve the next batch of indexes.
The maximum concurrency for ListVectorIndexes is 16.
Permissions
By default, an Alibaba Cloud account has full permissions. However, RAM users and RAM roles have no permissions. An Alibaba Cloud account or an administrator must grant permissions using a RAM policy or a bucket policy.
API | Action | Description |
ListVectorIndexes |
| List 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 Types | Required | Example | Description |
maxResults | value | No | 100 | Maximum number of indexes to return. Valid values: 0 to 500. If you do not specify this parameter or set it to 0, the default value is 100. |
nextToken | String | No | myindex1 | Start returning results from the first index that comes alphabetically after nextToken. |
prefix | String | No | my | Match vector indexes by prefix. |
Response headers
This operation uses only common response headers. For more information, see Common HTTP headers.
Response elements
Name | Type | Example value | Description |
indexes | Array of objects | - | Array that contains vector index information. |
indexName | String | vectorindex1 | Name of the index. Parent node: index |
createTime | String | 2025-04-17T10:56:21.000Z | Time when the index was created, in GMT format. Parent node: index |
dataType | String | float32 | Data type of the vector. Parent node: index |
dimension | Integer | 1024 | Vector dimensions. Parent node: index |
distanceMetric | String | euclidean | Distance metric function. Parent node: index |
metadata | Container | - | Metadata configuration. Parent node: index |
nonFilterableMetadataKeys | Array of strings | ["category", "timestamp"] | List of non-filterable metadata fields. Parent node: metadata |
status | String | enable | Current status of the index. Valid values:
|
nextToken | String | myindex1 | Pagination token for the next page. If this call does not return all results, the response includes nextToken for the next query. |
Examples
Sample 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"
}Sample 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"
}SDK
SDKs for ListVectorIndexes:
ossutil command
For the ossutil command that corresponds to ListVectorIndexes, see list-vector-indexes.
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:
|