[英]How do you post a comment to Atlassian confluence using their REST api?
I'm trying to automatically add a comment to a page in confluence using the REST API.我正在尝试使用 REST API 在 confluence 中自动向页面添加评论。
I am testing using Postman, im pointing at this url: https://###########.atlassian.net/wiki/rest/api/content/我正在使用邮递员进行测试,我指向这个网址: https://###########.atlassian.net/wiki/rest/api/content/
using valid headers, and posting this json:使用有效的标头,并发布此 json:
{
"type":"comment",
"container":"72025106",
"body":{
"storage":{
"value":"auto comment 1",
"representation":"storage"
}
}
}
When I do i get this error back:当我这样做时,我又得到了这个错误:
{
"statusCode": 500,
"message": "java.lang.IllegalStateException: Must provide id and type for Content"
}
this should work:这应该有效:
{"type":"comment",
"container":{
"id":"[PARENT_ID]",
"type":"page",
"status":"current"
},
"body":{
"storage":{
"value":"[COMMENT_BODY]",
"representation":"storage"
}
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.