あなたの質問では、ページの一部を編集したいと思います。そのような場合は、最初にコンテンツを取得して、あなたのコンテンツを編集して、記憶部にごcurl
コマンドにコンテンツを渡す必要があります:curl
以下、ご参考までに
curl -u admin:admin -X PUT -H 'Content-Type: application/json' -d'{"id":"3604482","type":"page","title":"new page","space":{"key":"TST"},"body":{"storage":{"value":"<p>This is the updated text for the new page</p>","representation":"storage"}},"version":{"number":2}}' http://localhost:8080/confluence/rest/api/content/3604482 | python -mjson.tool
はあなたのコンテンツを提供しますページ:
curl -u admin:admin http://localhost:8080/confluence/rest/api/content/3965072?expand=body.storage | python -mjson.tool
ConfluenceのREST APIの詳細については、アトラシアンの公式ドキュメントhereを見てみましょう。