All Products
Search
Document Center

Object Storage Service:list-vectors

Last Updated:Mar 19, 2026

Lists all vectors stored in an index.

Permissions

Alibaba Cloud accounts have full permissions by default. Resource Access Management (RAM) users and RAM roles have no permissions by default. Grant permissions using a RAM policy or a bucket policy.

APIActionDescription
ListVectorsoss:ListVectorsLists vector data.

Command format

ossutil vectors-api list-vectors --bucket <value> --index-name <value> [--max-results <int>] [--next-token <string>] [--return-data | --no-return-data] [--return-metadata | --no-return-metadata] [--segment-count <int> --segment-index <int>]

Parameters

ParameterTypeRequiredDescription
--bucketstringYesThe name of the vector bucket.
--index-namestringYesThe name of the index.
--max-resultsintNoThe maximum number of results to return per response. Default: 500. Maximum: 1000. The total data size per response cannot exceed 1 MB.
--next-tokenstringNoThe pagination token. Set this to the nextToken value from the previous response to retrieve the next page. The token must be 1–512 bytes.
--return-dataNoReturns vector data when present or set to true.
--return-metadataNoReturns metadata when present or set to true.
--segment-countintNoThe total number of parallel segments. Maximum value: 16. Set to 1 for serial processing.
--segment-indexintNoThe index of the segment to scan. Must be less than the value of --segment-count.
Note

The list-vectors command corresponds to the ListVectors API operation. For global command-line options, see Global command-line options.

Examples

List all vectors in an index

ossutil vectors-api list-vectors --bucket examplebucket --index-name index

Limit the number of results

Return the first 100 vectors:

ossutil vectors-api list-vectors --bucket examplebucket --index-name index --max-results 100

Paginate through results

Pass the nextToken from each response as --next-token in the next request:

ossutil vectors-api list-vectors --bucket examplebucket --index-name index --next-token <nextToken>

Return vector data

ossutil vectors-api list-vectors --bucket examplebucket --index-name index --return-data

Return metadata

ossutil vectors-api list-vectors --bucket examplebucket --index-name index --return-metadata