Has Partition
POST
http://${MILVUS_URI}/v2/vectordb/partitions/has
This operation checks whether a partition exists.
Example
export MILVUS_URI="localhost:19530"
curl --location --request POST "http://${MILVUS_URI}/v2/vectordb/partitions/has" \
--header "Content-Type: application/json" \
--data-raw '{
"partitionName": "january",
"collectionName": "test_collection"
}'
Possible response is similar to the following :
{
"code": 200,
"data": {
"has": true
}
}
Request
Parameters
Header parameters
Parameter Description Request-Timeout
integer
The timeout duration for this operation.
Setting this to None indicates that this operation timeouts when any response arrives or any error occurs.Authorization
string
The authentication token.No query parameters required
No path parameters required
Request Body
{
"dbName": "string",
"collectionName": "string",
"partitionName": "string"
}
Parameter | Description |
---|---|
dbName | string The name of an existing database. The value defaults to default. |
collectionName * | string The name of an existing collection. |
partitionName * | string The name of the partition to test. |
Response
A boolean value indicating whether the specified partition exists.
Response Bodies
- Response body if we process your request successfully
{
"code": "integer",
"data": {
"has": "boolean"
}
}
- 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 | object |
data.has | boolean A boolean value indicates whether the specified partition exists. |
message | string Indicates the possible reason for the reported error. |