Hi,
I want to realize a non-standard view on one of my created Confluence pages, using the `roadmap planner` macro. the macro looks nice and on the GUI level it can be adjusted with ease. I already successfully read the Confluence page using the provided REST API. And I already wrote back page content, so that Confluence rendered it properly.
Now, when trying to update page content in the format of a `roadmap planner` macro, I was not successful so far. Confluence seems to refuse the roadmap planner portion of the transferred page so that changes made externally are discarded.
Looking at the identified XML, I see the intended structure:
<ac:structured-macro
ac:name="roadmap"
ac:schema-version="1"
ac:macro-id="7163f205-1b64-4f99-8a02-2ca8e502fe3f">
<ac:parameter ac:name="maplinks" />
<ac:parameter ac:name="timeline">true</ac:parameter>
<ac:parameter ac:name="pagelinks" />
<ac:parameter ac:name="source">
%7B%22title%22%3A%22Roadmap%20Planner%22%2C%22timeline%22%3A%7B%22startDate%22%3A%222021-04-24%2000%3A00%3A00
%22%2C%22endDate%22%3A%222022-03-24%2000%3A00%3A00%22%2C%22displayOption%22%3A%22MONTH%22%7D%2C%22lanes%22%3A
%5B%7B%22title%22%3A%22SPUR_01%22%2C%22color%22%3A%7B%22lane%22%3A%22%23f6c342%22%2C%22bar%22%3A%22%23fadb8e%
22%2C%22text%22%3A%22%23594300%22%2C%22count%22%3A1%7D%2C%22bars%22%3A%5B%7B%22title%22%3A%22SPUR_01__AKTIVIT
AET_01%20%C3%A4%C3%B6%C3%BC%22%2C%22description%22%3A%22ein%20kurzer%20Kommentar%20f%C3%BCr%20AKTIVITAET_01%2
2%2C%22startDate%22%3A%222021-04-30%2019%3A21%3A58%22%2C%22duration%22%3A3.0198019801498406%2C%22rowIndex%22%
3A0%2C%22id%22%3A%22a4d328d1-46af-47f5-b95e-0198f171fc55%22%2C%22pageLink%22%3A%7B%7D%7D%2C%7B%22title%22%3A%
22SPUR_01__AKTIVITAET_02%22%2C%22description%22%3A%22ein%20kurzer%20Kommentar%20f%C3%BCr%20AKTIVITAET_02%22%2
C%22startDate%22%3A%222021-06-01%2000%3A00%3A00%22%2C%22duration%22%3A3.009900989969136%2C%22rowIndex%22%3A1%
2C%22id%22%3A%22dcca8a98-cd2b-4c33-aae4-8692490aa584%22%2C%22pageLink%22%3A%7B%7D%7D%5D%7D%2C%7B%22title%22%3
A%22SPUR_02%22%2C%22color%22%3A%7B%22lane%22%3A%22%233b7fc4%22%2C%22bar%22%3A%22%236c9fd3%22%2C%22text%22%3A%
22%23ffffff%22%2C%22count%22%3A1%7D%2C%22bars%22%3A%5B%7B%22title%22%3A%22Leiste%203%22%2C%22description%22%3
A%22dies%20ist%20ein%20extrem%20kurzer%20Kommentar%20f%C3%BCr%20AKTIVITAET_03%22%2C%22startDate%22%3A%222021-
04-01%2007%3A57%3A37%22%2C%22duration%22%3A2.5%2C%22rowIndex%22%3A0%2C%22id%22%3A%22638a8b73-aa22-4b8d-9a13-b
f7f25d57c63%22%2C%22pageLink%22%3A%7B%7D%7D%5D%7D%5D%2C%22markers%22%3A%5B%7B%22title%22%3A%22MARKIERUNG_01%2
2%2C%22markerDate%22%3A%222021-04-15%2000%3A00%3A00%22%7D%5D%7D
</ac:parameter>
<ac:parameter ac:name="title">Roadmap%20Planner</ac:parameter>
<ac:parameter ac:name="hash">4a0a5db3725b7993ffa53e0ad0ffa858</ac:parameter>
</ac:structured-macro>
Here is my analysis of the XML elements which seem relevant form updating the page:
`ac-macro-id`
this seems to be a reference to a Confluence-internal macro location. I would leave it as is, in order to not invalidate any internals. hoping that this values does not change over time but stays stable during lifetime of the chosen confluence page.
`ac:name="source"`
this parameter seems to hold all the user data necessary to display the roadmap planner diagram within the Confluence page. The values look like a JSON structure encoded for usage in HTML pages.
`ac-name="hash"`
this parameter might be calculated from the contents of this XML structure. but I don't see over which part it is calculated or after which further transformations (e.g. JSON pre- or post-encoded, SHA algorithm, ...). I guess, within Confluence this hash value is used to check for correct syntax of the user data before rendering on the Confluence page?
I guess, I had no success so far because I didn't set the "hash" correctly. searching the provided help pages (especially the `storage format`) didn't get me any further.
So, is there a way to use the supported REST API for updating (not just reading) the `roadmap planner` macro contents? What am I missing?
Thank you.