RESTHeart PATCH 没有更新文档

RESTHeart PATCH not updating the document

我正在尝试使用 RESTHear api 更新 MongoDB 文档中的一个键,但是该值没有得到更新,但是,我得到 200 OK。

我尝试了 PATCH 和 PUT 两个。以下是我尝试过的 URI。

http PUT "http://localhost:8080/presence/active_watchers?filter={'presentity_uri':'sip:service-1@opensipstest.org'}" event_id=12

http PATCH "http://localhost:8080/presence/active_watchers?filter={'presentity_uri':'sip:service-1@opensipstest.org'}" event_id=12

两次我都收到 200 OK 响应,但值没有更新。

我是不是做错了什么。我找不到任何例子。

我正在使用 Restheart v 2.0.0 Beta。

要批量更新与过滤表达式匹配的文档,请执行 http PATCH "http://localhost:8080/presence/active_watchers/*?filter={'presentity_uri':'sip:service-1@opensipstest.org'}" event_id=12

如果您 PUT/PATCH URI /presence/active_watchers 您实际上更新了集合属性(在 RESTHeart 数据库和集合中有它们自己的属性)。

要更新文档,您需要提供文档 URI /db/coll/docid,对于批量更新,您可以使用通配符 /db/coll/*?filter=[filter expression]

更多信息请参阅文档表格中的Resource URI