Skip to main content

COLLECTION.UPSERT

POST 

To update one or multiple documents if existed, otherwise insert new documents

Request

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

Mutation response

Schema
    data object[]

    Array of documents mutated

Loading...