I sent a PUT request to a Confluence page using <ac:task>, but after refreshing the page, when I try to check the checkbox, I get an error saying that the changes cannot be saved. However, if I manually click the "Edit" button in the UI and then update the page, it works fine.
What I want is to create and update the page using the API without needing any manual UI actions.
I suspect that this might be due to the absence of a task ID. So, I checked the following:
- After sending the PUT request, I made a GET request to retrieve the page data, but the task ID was missing.
- To see if publishing would help, I sent a
POST request to ../{page_id}/publish after the PUT request, but even then, the task ID was still missing in the GET response. - However, when I manually edit the page via the UI and inspect the source, I can see that a task ID has been assigned.
Does this mean that the API alone does not generate a task ID?
Is there a way to resolve this?
Here’s the task-related part of my request:
<span><span><<span>ac:task-list</span>></span> </span>
<span><span> <<span>ac:task</span>></span> </span>
<span><span> <<span>ac:task-status</span>></span>incomplete<span></<span>ac:task-status</span>></span> </span>
<span><span> <<span>ac:task-body</span>></span> ... <span></<span>ac:task-body</span>></span> </span>
<span><span> </<span>ac:task</span>></span> </span>
<span><span></<span>ac:task-list</span>></span></span>