Lists all vector indexes in a vector bucket.
Usage notes
-
The
ListVectorIndexesoperation returns a maximum of 500 indexes per call. To retrieve the next page of results, use the pagination token from the current response. -
The
ListVectorIndexesoperation supports a maximum of 16 concurrent calls.
Permissions
An Alibaba Cloud account has full permissions to access all API operations. By default, RAM users and RAM roles cannot call this operation. You must create and attach a RAM policy or a bucket policy to grant the required permissions.
|
API |
Action |
Description |
|
ListVectorIndexes |
|
Lists vector indexes. |
Request syntax
POST /?listVectorIndexes HTTP/1.1
Host: examplebucket-123***456.cn-hangzhou-internal.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
|
Parameter |
Type |
Required |
Example |
Description |
|
maxResults |
Integer |
No |
100 |
The maximum number of indexes to return. Valid values: 0 to 500. If this parameter is not specified or is set to 0, the default value is 100. |
|
nextToken |
String |
No |
myindex1 |
The pagination token used to retrieve the next page of results. To continue listing, set this parameter to the |
|
prefix |
String |
No |
my |
Filters results to include only indexes whose names begin with this prefix. |
Response headers
This operation uses only common response headers. For more information, see Common HTTP headers.
Response elements
|
Parameter |
Type |
Example |
Description |
|
indexes |
Array of objects |
- |
A container for the vector indexes. |
|
indexName |
String |
vectorindex1 |
The name of the vector index. parent node: |
|
createTime |
String |
2025-04-17T10:56:21.000Z |
The time when the vector index was created, in UTC. parent node: |
|
dataType |
String |
float32 |
The data type of the vector. parent node: |
|
dimension |
Integer |
1024 |
The vector dimension. parent node: |
|
distanceMetric |
String |
euclidean |
The distance metric. parent node: |
|
metadata |
Container |
- |
The metadata configuration. parent node: |
|
nonFilterableMetadataKeys |
Array of strings |
["category", "timestamp"] |
A list of metadata fields that cannot be used for filtering. parent node: |
|
status |
String |
enable |
The status of the vector index. Valid values:
|
|
nextToken |
String |
myindex1 |
A pagination token. If the response is truncated, use this token in the next request to retrieve more results. |
Examples
Example request
POST /?listVectorIndexes HTTP/1.1
Host: examplebucket-123***456.cn-hangzhou-internal.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"
}
SDK
Call this operation by using the following SDKs:
ossutil CLI
For the corresponding ossutil command, see list-vector-indexes.
Error codes
|
Error code |
HTTP status code |
Description |
|
VectorIndexParameterInvalid |
400 |
The vector index parameter provided in the request is invalid. |
|
MalformedJson |
400 |
The request body is not in valid JSON format. |
|
AccessDenied |
403 |
Access denied. Possible causes:
|