COLLECTION.UPSERT
POST
To update one or multiple documents if existed, otherwise insert new documents
Request
- application/json
Body
op stringrequired
Default value: collection.upsert
The operation name
collection stringrequired
The collection name
match object
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...