Copy Collection
POST
/mongodb/collections/{collectionName}/copy
Copy a Collection in the database, optionally only the documents that match a Lucene filter, with its indices (withIndexes, true by default). The target is a name in the database of the Collection. The read grant for the Collection and the write grant for the target are needed. An existing target is a conflict (409), unless dropTarget is true and the user has the administrate grant for it: it is replaced when the copy is complete. The copy is made in one request, a big collection takes its time.
Authorizations
httpAuth
Type
HTTP (bearer)
or
httpAuth1
Type
HTTP (basic)
or
apiKeyAuth
Type
API Key (header: X-AUTH-APIKEY)
Parameters
Path Parameters
collectionName*
The name of your MongoDb Collection
Type
Requiredstring
Query Parameters
filterCaseInsensitive
true: wildcards and prefixes of the Lucene filter ignore the case (the behaviour before 2.0.0). By default they are case-sensitive, so an index on the field serves a prefix like name:abc*
Type
boolean
Example
falseDefault
falseRequest Body
application/json
JSON "target": "string", "filter": "string", "withIndexes": true, "dropTarget": true
{
}
Responses
application/json
JSON "name": "string", "count": 0, "indexes": 0, "skippedIndexes": 0
{
}
