This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Updates one or more items in a collection. Items must be completely replaced.
The response array must include the same items that were updated, and each returned item must be added the _createdDate
and _updatedDate
fields.
ID of the collection in which to update the items.
Items to update.
Response must include either the updated item or an error.
curl POST https://external-db.example.com/v3/items/update \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: <AUTH>' \
--d '{
"collectionId": "cities",
"items": [{
"_id": "c285e77c-a86b-4361-a55f-c6b934d70187",
"name": "New York",
"_owner": "facda016-24ef-4909-a90e-70687f17f658"
}]
}'
{
"results": [
{
"item": {
"name": "New York",
"_id": "c285e77c-a86b-4361-a55f-c6b934d70187",
"_owner": "facda016-24ef-4909-a90e-70687f17f658",
"_createdDate": {
"$date": "2021-01-02T03:04:05Z"
},
"_updatedDate": {
"$date": "2021-04-05T06:07:08Z"
}
}
}
]
}