我坚持使用以下curl脚本创建汇合页面。
curl -v -S -u user:pass -X POST -H 'Content-Type: application/json' -d'{"type":"page","title":"TestPage","space":{"key":"Cloud"},"body":{"storage":{"value":"<p>This is a new page</p>","representation":"storage"}}}' https://Client.atlassian.net/wiki/display/CD/Applications | python -mjson.tool
脚本执行正常并显示成功结果。但是,该页面不会显示在Confluence Wiki页面上。
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 110k 0 110k 100 149 102k 138 0:00:01 0:00:01 --:--:-- 102k
No JSON object could be decoded
任何想法我在这个配置中缺少什么?请帮忙。
答案 0 :(得分:0)
听起来您还没有使用正确的URL通过REST API创建页面。它必须是new page
。例如,如果您要在space key TST
和正文This is a new page
的空白处创建标题为curl -u admin:admin -X POST -H 'Content-Type: application/json' -d'{"type":"page","title":"new page","space":{"key":"TST"},"body":{"storage":{"value":"<p>This is a new page</p>","representation":"storage"}}}' http://<URL>:<port>/confluence/rest/api/content/ | python -mjson.tool
的网页,则需要使用以下内容:
#include <mpi.h>