我需要使用rest api在confluence中创建新的wiki页面的工作示例.我更喜欢在特定空间和特定页面下创建新页面.我阅读了他们的api文档,看了几个他们的例子,但仍然很短.
以下是他们在网站上的示例
curl -u admin:admin -X POST -H 'Content-Type: application/json' -d'{"type":"page","title":"new page","space":{"key":"TST"},"body":{"storage":{"value":"This is a new page
","representation":"storage"}}}' http://localhost:8080/confluence/rest/api/content/ | python -mjson.tool
我尝试使用我的空间名称,新标题并将URL更改为mysite/rest/api/content并返回内容基本上是html页面,说页面不存在或页面存在但您没有权限.我已经确认我可以访问confluence wiki并可以使用我的凭据创建新的wiki.
还不清楚的是,在上面的示例中,如何调用创建页面的特定api?它没有任何意义.
在他们的论坛上提出了类似的问题,但没有合理的答案 https://answers.atlassian.com/questions/149561/simple-confluence-rest-api-usage-what-am-i-missing
(我想我的最终目标是能够自动在汇合处创建新的wiki页面.如果有必要的话,我可以放弃汇总REST API到其他解决方案.