【发布时间】:2018-05-22 15:30:54
【问题描述】:
我有一个使用 K15t Scroll Version 插件发布 Atlassian Confluence 空间的 curl 命令:
curl -v -H "Accept:application/json" -H "Content-Type:application/json" -X POST "http://<server>/rest/scroll-versions/1.0/publish/<spacekey>/to_new/publish?os_username=myusername&os_password=mypassword" --data {"versionId":"9C8CC11601610D3E794E334A746E61SD","targetSpaceKey":"pro60", "targetSpaceName":"Pro 60", "treeProviderName":"Pro 2017", "languageKey":"all", "copyLabels":"false", "keepAuthorsAndDates":"false", "removeAttachments":"false", "sendEmail":"false", "keepPermalinks":"false", "onlyPagesInFinalState":"false", "onlyPagesInFinalStateProcessChildren":"false", "publishHierarchy":"false"}
此命令返回响应代码 202,其中包含正在发生的事情的摘要。然后,我需要继续检查下面的 URL 以了解活动何时完成。我不断收到代码 202,最后,我收到了代码 201。然后,我保存了我在下面调用 URL 的响应。
http://<server>/rest/scroll-versions/1.0/async-tasks/<alphanumeric id generated when 202 is returned>
在我执行 curl 然后调用上面的 URL 后,我应该怎么做才能将响应保存到日志文件?
【问题讨论】:
标签: rest api asynchronous curl confluence