【发布时间】:2016-08-02 18:48:17
【问题描述】:
我正在编写一个脚本来通过 REST API 更新汇合页面,使用:
curl -u user:password -X PUT -H 'Content-Type: application/json' -d'{"id":173390846,"type":"page","title":"test4","body":{"storage":{"value":"hello world","representation":"storage"}},"version":{"number":10}}' http://confluence.private.com/rest/api/content/173390846
但有时我会收到以下错误。
{"statusCode":500,"message":"java.lang.IllegalArgumentException: Property with name sync-rev is not a String"}
如果我手动编辑并保存了页面,可能会发生这种情况,或者在没有手动编辑页面的情况下会发生这种情况。
有时,如果我再次运行更新,它会起作用,有时它会持续存在并给出相同的错误。
我编写的脚本比 hello world 示例大,但如果我创建了一个新的空白页面,通过 REST API 对其进行更新,手动编辑它,并尝试再次更新它(版本递增)我得到了上述错误。
除了这个doc 之外,我没有发现任何关于属性sync-rev 的提及,但它并没有帮助我解决我的问题。
我们的 confluence 版本是 5.9.6
为什么我会收到此错误,我可以做什么/更改以使其消失?
【问题讨论】:
标签: rest confluence confluence-rest-api