I am trying to update the confluence page with the following code
var bodyData = `{
"id": "${pageId}",
"status": "current",
"title": "${pageTitle}",
"body": {
"representation": "storage",
"value": "${pageValue}"
},
"version": {
"number": ${pageVersion},
"message": "test"
}
}`;
const response = await api.asApp().requestConfluence(route`/wiki/api/v2/pages/${pageId}`, {
method: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
When the pageValue is “<p>test</p>”, the process runs fine, but the following code returns error 400. Please let me know the cause.
Thank you very much for your cooperation.
<ac:structured-macro ac:name="jira" ac:schema-version="1" ac:macro-id="637cece6-9706-4a27-b000-f2fd179c1a0e"><ac:parameter ac:name="key">MWAY-303</ac:parameter><ac:parameter ac:name="serverId">303def5a-dfaa-3ae6-bef9-fb20e9237f66</ac:parameter><ac:parameter ac:name="server">System Jira</ac:parameter></ac:structured-macro>