Rename Collection
POST
http://${MILVUS_URI}/v2/vectordb/collections/rename
This operation renames an existing collection and optionally moves the collection to a new database.
Example
export MILVUS_URI="localhost:19530"
curl --location --request POST "http://${MILVUS_URI}/v2/vectordb/collections/rename" \
--header "Content-Type: application/json" \
--data-raw '{
"dbName": "default",
"collectionName": "quick_setup"
}'
Possible responses are similar to the following:
{
"code": 200,
"data": {}
}
Request
Parameters
Header parameters
Parameter Description Request-Timeout
integer
The timeout duration for this operation in seconds. Setting this to None indicates that this operation timeouts when any response arrives or any error occurs.Authorization
string
The authentication tokenNo query parameters required
No path parameters required
Request Body
{
"dbName": "string",
"collectionName": "string",
"newDbName": "string",
"newCollectionName": "string"
}
Parameter | Description |
---|---|
dbName | string The name of the database to which the collection belongs. Setting this to a non-existing database results in an error. |
collectionName * | string The name of the target collection. Setting this to a non-existing collection results in an error. |
newDbName | string The name of the database to which the collection belongs after this operation. The value defaults to default. Setting this to a database rather than the one the collection belongs to before this operation moves this collection to the specified database. Setting this to a non-existing database results in an error. |
newCollectionName * | string The name of the target collection after this operation. Setting this to the value of old_collection_name results in an error. |
Response
None
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 | object |
message | string Indicates the possible reason for the reported error. |