milvus-logo
LFAI
< Docs
  • RESTful
    • v2
      • Index (v2)

List Indexes

POST
http://${MILVUS_URI}/v2/vectordb/indexes/list

This operation lists all indexes of a specific collection.

Example

export MILVUS_URI="localhost:19530"

curl --location --request POST "http://${MILVUS_URI}/v2/vectordb/indexes/list" \
--header "Content-Type: application/json" \
--data-raw '{
    "collectionName": "quick_setup"
}'

Possible response is as follows:

{
    "code": 200,
    "data": [
        "vector"
    ]
}

Request

Parameters

  • Header parameters

    ParameterDescription
    Request-Timeoutinteger
    The timeout duration for this operation.
    Setting this to None indicates that this operation timeouts when any response arrives or any error occurs.
    Authorizationstring
    The authentication token.
  • No query parameters required

  • No path parameters required

Request Body

{
    "dbName": "string",
    "collectionName": "string"
}
ParameterDescription
dbNamestring
The name of the database to which the collection belongs.
collectionNamestring
The name of an existing collection. Setting this to a non-existing collection leads to an error.

Response

The names of all built indexes in a list.

Response Bodies

  • Response body if we process your request successfully
{
    "code": "integer",
    "data": [
        {}
    ]
}
  • Response body if we failed to process your request
{
    "code": integer,
    "message": string
}

Properties

The properties in the returned response are listed in the following table.

PropertyDescription
codeinteger
Indicates whether the request succeeds.
  • 200: The request succeeds.
  • Others: Some error occurs.
dataarray
A list of index names.
data[]string
A index name.
messagestring
Indicates the possible reason for the reported error.