Put Document
info
All JSON array responses have been shortened for readability.
PUT/<ApplicationID/collections/<CollectionID>/documents/<DocumentID>
Endpoint Requires Authentication
Example
https://api.weightron.cloud/641c1177ebc8b2f3c195b02c/collections/641c1177ebc8b2f3c195b033/documents
Request Body
{
"filter": {
"name": {
"$eq": "Area 5"
}
},
"update": {
"name": "Area 6",
"block": false,
"_hash": "4f189f73cc42d5f21afb19a1125f2f94edadec3e"
}
}
Description
Replaces a document in the collection with the object in the request body. The returned object is the object now in the database, after all calculations are finished.
Will only update one record per request. The request body must contain the filter
and update
properties.
Returns
{
"timestamp": "2023-03-23T16:17:55.808Z",
"data": {
"_id": "641c75a18fde9d1d8a0e247e",
"name": "Area 6",
"block": false,
"_hash": "044a826af522d8c008f3737f18e442a2723a1513",
"_updatedAt": "2023-03-23T16:17:55.730Z",
"_changedBy": "641c11c7ebc8b2f3c195b098"
}
}