您如何使用他们的REST API向Atlassian合流发布评论? [英] How do you post a comment to Atlassian confluence using their REST api?
本文介绍了您如何使用他们的REST API向Atlassian合流发布评论?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用REST API在页面融合处自动添加注释。
I'm trying to automatically add a comment to a page in confluence using the REST API.
我正在使用Postman进行测试,即时通讯指向此网址:< a href = https://###########.atlassian.net/wiki/rest/api/content/ rel = nofollow> https:// ####### ####。atlassian.net/wiki/rest/api/content/
I am testing using Postman, im pointing at this url: https://###########.atlassian.net/wiki/rest/api/content/
使用有效的标题,并发布此json:
using valid headers, and posting this 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"
}
推荐答案
这应该有效:
{"type":"comment",
"container":{
"id":"[PARENT_ID]",
"type":"page",
"status":"current"
},
"body":{
"storage":{
"value":"[COMMENT_BODY]",
"representation":"storage"
}
}
}
这篇关于您如何使用他们的REST API向Atlassian合流发布评论?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文