Update Document
POST {{URL_ENDPOINT}}/action/updateOne
You can use the /updateOne
endpoint to update a single record. Use the filter
property in the request body to specify the search criteria. If more than one document matches the criteria, only the first match will be returned. Then use the update
field to specify what should be updated. You should use one of the update operators to update your documents.
Request Body
{"dataSource"=>"{{DATA_SOURCE}}", "database"=>"{{DATABASE}}", "collection"=>"{{COLLECTION}}", "filter"=>{"name"=>"John Sample"}, "update"=>{"$set"=>{"age"=>24}}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Access-Control-Request-Headers | string | ||
api-key | string |