Skip to content

Update many in Collection​

PATCH
/mongodb/collections/{collectionName}/documents/many/update

Update many Documents in given Collection. filter of the body is a MongoDB filter, or since 3.0.0 { "$lucene": "<query>" } for a Lucene filter too long for the query parameter filter; one of both.

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
string
Required

Query Parameters

matchAll

Allow an empty filter, that matches all documents of the collection

Type
boolean
Default
false
filter

Filter Query like on the list of documents, as an alternative to the filter of the request body. Use only one of both.

Type
string
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
Examplefalse
Default
false

Request Body​

application/json
JSON
{
  
"document": {
  
  
"additionalProperties": null
  
},
  
"filter": {
  
  
"additionalProperties": null
  
}
}

Responses​

application/json
JSON
{
  
"wasAcknowledged": true,
  
"upsertedIds": [
  
  
"string"
  
],
  
"modifiedCount": 0,
  
"matchedCount": 0
}

Playground​

Authorization
Variables
Key
Value
Body

Samples​

Powered by VitePress OpenAPI

Released under the MIT License.