Skip to content

Insert many Documents​

PUT
/mongodb/collections/{collectionName}/documents/many/insert

Insert many documents in given Collection

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

ordered

true (default): the insert stops at the first document that fails (answer 409 for a duplicate key). false: all documents that can be stored are stored, the others are listed in errors of the answer.

Type
boolean
Default
true

Request Body​

application/json
JSON
[
  
{
  
  
"additionalProperties": null
  
}
]

Responses​

application/json
JSON
{
  
"wasAcknowledged": true,
  
"insertedIds": [
  
  
"string"
  
],
  
"insertedCount": 0,
  
"errors": [
  
  
{
  
  
  
"index": 0,
  
  
  
"code": 0,
  
  
  
"message": "string"
  
  
}
  
]
}

Playground​

Authorization
Variables
Key
Value
Body

Samples​

Powered by VitePress OpenAPI

Released under the MIT License.