List Collections
POST
http://${MILVUS_URI}/v2/vectordb/collections/list
This operation lists all collections in the specified database.
Example
export MILVUS_URI="localhost:19530"
curl --location --request POST "http://${MILVUS_URI}/v2/vectordb/collections/list" \
--header "Content-Type: application/json" \
--data-raw '{
"dbName": "default"
}'
The possible output will be similar to the following:
{
"code": 200,
"data": [
"quick_setup_new",
"customized_setup_1",
"customized_setup_2"
]
}
Request
Parameters
Header parameters
Parameter Description Request-Timeout
integer
The timeout duration for this operation. Setting this to None indicates that this operation times out when any response returns or an error occurs.Authorization
string
The authentication tokenNo query parameters required
No path parameters required
Request Body
{
"dbName": "string"
}
Parameter | Description |
---|---|
dbName | string The name of an existing database. |
Response
This operation lists all collections in the database used in the current connection.
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.
Property | Description |
---|---|
code | integer Indicates whether the request succeeds.
|
data | array A list of collection names. |
data[] | string A collection name. |
message | string Indicates the possible reason for the reported error. |