milvus-logo
LFAI
< Docs
  • RESTful

List Collections

Lists collections in a cluster.

GET
https://${MILVUS_HOST}:${MILVUS_PORT}/v1/vector/collections

Example

List all collections in a cluster:

curl --request GET \
     --url "${MILVUS_HOST}:${MILVUS_PORT}/v1/vector/collections" \
     --header "Authorization: Bearer ${TOKEN}" \
     --header "accept: application/json" \
     --header "content-type: application/json"

Sample response:

{
   code: 200,
   data: [
         "collection1",
         "collection2",
         ...
         "collectionN",
         ]
}

Request

Parameters

  • No query parameters required

  • No path parameters required

Request Body

No request body required

Response

Returns a list of collections in the specified cluster.

Response Bodies

  • Response body if we process your request successfully
{
    "code": 200,
    "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 data array of strings.
messagestring
Indicates the possible reason for the reported error.

Possible Errors

Error CodeDescription
800database not found
1800user hasn't authenticate
Feedback

Was this page helpful?