All Products
Search
Document Center

Object Storage Service:list-vectors

Last Updated:Sep 24, 2025

Use the list-vectors command to list all vector data in an index.

Permissions

Alibaba Cloud accounts have all permissions by default. In contrast, Resource Access Management (RAM) users and RAM roles have no permissions by default. The Alibaba Cloud account or an administrator must grant permissions to them using a RAM policy or a bucket policy.

API

Action

Description

ListVectors

oss:ListVectors

Lists vector data.

Command format

ossutil vectors-api list-vectors --bucket value --index-name value [flags]

Parameters

Parameter

Type

Description

--bucket

string

The name of the vector bucket.

--index-name

string

The name of the index.

--max-results

int

The maximum number of results to return in each response. The default value is 500.

  • The maximum value is 1000.

  • The total data size cannot exceed 1 MB.

--next-token

string

The query token. Set this parameter to the `nextToken` value returned in the previous command. The token can be 1 to 512 bytes in length.

--return-data

/

Specifies whether to return vector data. If you leave this parameter empty or set it to true, vector data is returned.

--return-metadata

/

Specifies whether to return metadata. If you leave this parameter empty or set it to true, metadata is returned.

--segment-count

int

The degree of parallelism. The maximum value is 16. For serial processing, set this parameter to 1.

--segment-index

int

The index of the segment. The value must be smaller than the value of `segment-count`.

Note
  • The get-vectors command corresponds to the GetVectors API operation.

  • For information about supported global command-line options, see Global command-line options.

Examples

  • List all vectors in the `index` index of the `examplebucket` vector bucket.

    ossutil vectors-api list-vectors --bucket examplebucket --index-name index
  • List the first 100 vectors in the `index` index of the `examplebucket` vector bucket.

    ossutil vectors-api list-vectors --bucket examplebucket --index-name index --max-results 100
  • List vectors in the `index` index of the `examplebucket` vector bucket, starting from a specified token.

    ossutil vectors-api list-vectors --bucket examplebucket --index-name index --next-token example
  • List all vectors in the `index` index of the `examplebucket` vector bucket. By default, a maximum of 500 results are returned.

    ossutil vectors-api list-vectors --bucket examplebucket --index-name index --return-data
  • List all vectors in the `index` index of the `examplebucket` vector bucket and retrieve their metadata.

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