DB.UPSERT
POST
To update one or multiple documents if existed, otherwise insert new documents
Request
- application/json
Body
action stringrequired
Default value: db.upsert
The action name
collection stringrequired
The collection name
matches objectrequired
The matches criteria
update objectrequired
The data to update with, when matches found
insert objectrequired
the data to insert, when matches not found
Responses
- 200
Mutation response
- application/json
- Schema
- Example (from schema)
Schema
data object[]
Array of documents mutated
{
"data": [
{}
]
}
Loading...